Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x9e366318f8151FeF10308c191352cb2D68326F39
Balance 0 ETH
Nonce 1
Code Size 9687 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

9687 bytes
0x6080604052600436106102295760003560e01c80638da5cb5b11610123578063c0246668116100ab578063dd62ed3e1161006f578063dd62ed3e14610732578063e16830a814610778578063f2fde38b14610798578063f5b3c3bf146107b8578063f887ea40146107e857600080fd5b8063c024666814610606578063c16dd4a414610626578063c18bc19514610646578063d212a69a14610666578063d3f6a1571461071257600080fd5b80639fccce32116100f25780639fccce321461057b578063a457c2d714610591578063a9059cbb146105b1578063b8863115146105d1578063b9e418e7146105f157600080fd5b80638da5cb5b146104f85780638ea5220f1461051657806395d89b411461053657806396880b171461054b57600080fd5b8063313ce567116101b1578063555467a111610175578063555467a11461044e5780636ddd17131461046e57806370a082311461048d578063715018a6146104c35780637571336a146104d857600080fd5b8063313ce5671461036d5780633265e8461461038957806339509351146103a957806349bd5a5e146103c95780634fbee1931461041557600080fd5b806318160ddd116101f857806318160ddd146102e25780631a8145bb146103015780631c6e8a75146103175780631f3fed8f1461033757806323b872dd1461034d57600080fd5b806306fdde0314610235578063095ea7b31461026057806310d5de531461029057806311a582c3146102c057600080fd5b3661023057005b600080fd5b34801561024157600080fd5b5061024a61081c565b60405161025791906120f1565b60405180910390f35b34801561026c57600080fd5b5061028061027b36600461215e565b6108ae565b6040519015158152602001610257565b34801561029c57600080fd5b506102806102ab36600461218a565b60136020526000908152604090205460ff1681565b3480156102cc57600080fd5b506102e06102db3660046121a7565b6108c5565b005b3480156102ee57600080fd5b506002545b604051908152602001610257565b34801561030d57600080fd5b506102f3600f5481565b34801561032357600080fd5b506102e06103323660046121d9565b610a64565b34801561034357600080fd5b506102f3600e5481565b34801561035957600080fd5b506102806103683660046121f4565b610aa8565b34801561037957600080fd5b5060405160128152602001610257565b34801561039557600080fd5b506102e06103a4366004612246565b610b11565b3480156103b557600080fd5b506102806103c436600461215e565b610cf9565b3480156103d557600080fd5b506103fd7f000000000000000000000000af59f979ffdb78c70cd018a7435f91bcb6ef0e6a81565b6040516001600160a01b039091168152602001610257565b34801561042157600080fd5b5061028061043036600461218a565b6001600160a01b031660009081526012602052604090205460ff1690565b34801561045a57600080fd5b506102806104693660046122ba565b610d2f565b34801561047a57600080fd5b50600c5461028090610100900460ff1681565b34801561049957600080fd5b506102f36104a836600461218a565b6001600160a01b031660009081526020819052604090205490565b3480156104cf57600080fd5b506102e0610d6a565b3480156104e457600080fd5b506102e06104f33660046122d3565b610dde565b34801561050457600080fd5b506005546001600160a01b03166103fd565b34801561052257600080fd5b506006546103fd906001600160a01b031681565b34801561054257600080fd5b5061024a610e33565b34801561055757600080fd5b5061028061056636600461218a565b60146020526000908152604090205460ff1681565b34801561058757600080fd5b506102f360105481565b34801561059d57600080fd5b506102806105ac36600461215e565b610e42565b3480156105bd57600080fd5b506102806105cc36600461215e565b610e91565b3480156105dd57600080fd5b50600c546102809062010000900460ff1681565b3480156105fd57600080fd5b506102e0610e9e565b34801561061257600080fd5b506102e06106213660046122d3565b610ee7565b34801561063257600080fd5b506102e06106413660046122d3565b610f3c565b34801561065257600080fd5b506102e06106613660046122ba565b611013565b34801561067257600080fd5b50600d546106c69060ff80821691610100810482169162010000820481169163010000008104821691600160201b8204811691650100000000008104821691600160301b8204811691600160381b90041688565b6040805160ff998a16815297891660208901529588169587019590955292861660608601529085166080850152841660a0840152831660c083015290911660e082015261010001610257565b34801561071e57600080fd5b506102e061072d366004612308565b6110f3565b34801561073e57600080fd5b506102f361074d366004612308565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561078457600080fd5b506102e06107933660046122d3565b61114b565b3480156107a457600080fd5b506102e06107b336600461218a565b6111a0565b3480156107c457600080fd5b506102806107d336600461218a565b60156020526000908152604090205460ff1681565b3480156107f457600080fd5b506103fd7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b60606003805461082b90612341565b80601f016020809104026020016040519081016040528092919081815260200182805461085790612341565b80156108a45780601f10610879576101008083540402835291602001916108a4565b820191906000526020600020905b81548152906001019060200180831161088757829003601f168201915b5050505050905090565b60006108bb3384846112f1565b5060015b92915050565b6005546001600160a01b031633146108f85760405162461bcd60e51b81526004016108ef9061237c565b60405180910390fd5b606461090360025490565b61090d91906123c7565b6103e88361091a60025490565b61092491906123e9565b61092e91906123c7565b10156109885760405162461bcd60e51b815260206004820152602360248201527f6d6178427579416d6f756e74206d75737420626520686967686572207468616e60448201526220312560e81b60648201526084016108ef565b606461099360025490565b61099d91906123c7565b6103e8826109aa60025490565b6109b491906123e9565b6109be91906123c7565b1015610a185760405162461bcd60e51b8152602060048201526024808201527f6d617853656c6c416d6f756e74206d75737420626520686967686572207468616044820152636e20312560e01b60648201526084016108ef565b6103e882610a2560025490565b610a2f91906123e9565b610a3991906123c7565b6008556103e881610a4960025490565b610a5391906123e9565b610a5d91906123c7565b6009555050565b6005546001600160a01b03163314610a8e5760405162461bcd60e51b81526004016108ef9061237c565b600c80549115156101000261ff0019909216919091179055565b6000610ab5848484611353565b610b078433610b028560405180606001604052806028815260200161257a602891396001600160a01b038a16600090815260016020908152604080832033845290915290205491906119e0565b6112f1565b5060019392505050565b6005546001600160a01b03163314610b3b5760405162461bcd60e51b81526004016108ef9061237c565b600d805463ff00ff00191661010060ff898116820263ff000000191692909217630100000089841681029190911762ff0000191662010000898516810291909117948590558404831693610b9793918104821692900416612408565b610ba19190612408565b600d805460ff92831665ff00000000ff19909116176501000000000086841681029190911767ffff0000000000001916600160381b868516810266ff000000000000191691909117600160301b868616810291909117938490558304841693610c139391820481169290910416612408565b610c1d9190612408565b600d805460ff928316600160201b0264ff000000001982168117909255601e9183169216919091171115610c935760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420333025206f72206c65737300000060448201526064016108ef565b600d54601e600160201b90910460ff161115610cf15760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420333025206f72206c65737300000060448201526064016108ef565b505050505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916108bb918590610b02908661128b565b6005546000906001600160a01b03163314610d5c5760405162461bcd60e51b81526004016108ef9061237c565b50600b81905560015b919050565b6005546001600160a01b03163314610d945760405162461bcd60e51b81526004016108ef9061237c565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546001600160a01b03163314610e085760405162461bcd60e51b81526004016108ef9061237c565b6001600160a01b03919091166000908152601360205260409020805460ff1916911515919091179055565b60606004805461082b90612341565b60006108bb3384610b028560405180606001604052806025815260200161252f602591393360009081526001602090815260408083206001600160a01b038d16845290915290205491906119e0565b60006108bb338484611353565b6005546001600160a01b03163314610ec85760405162461bcd60e51b81526004016108ef9061237c565b600c805461ffff1916610101179055610ee243600061242d565b601155565b6005546001600160a01b03163314610f115760405162461bcd60e51b81526004016108ef9061237c565b6001600160a01b03919091166000908152601260205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610f665760405162461bcd60e51b81526004016108ef9061237c565b7f000000000000000000000000af59f979ffdb78c70cd018a7435f91bcb6ef0e6a6001600160a01b0316826001600160a01b03161415610fe85760405162461bcd60e51b815260206004820152601760248201527f4d757374206b65657020756e697377617056325061697200000000000000000060448201526064016108ef565b6001600160a01b03919091166000908152601560205260409020805460ff1916911515919091179055565b6005546001600160a01b0316331461103d5760405162461bcd60e51b81526004016108ef9061237c565b606461104860025490565b61105291906123c7565b6103e88261105f60025490565b61106991906123e9565b61107391906123c7565b10156110cc5760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e20604482015261312560f01b60648201526084016108ef565b6103e8816110d960025490565b6110e391906123e9565b6110ed91906123c7565b600a5550565b6005546001600160a01b0316331461111d5760405162461bcd60e51b81526004016108ef9061237c565b600780546001600160a01b039384166001600160a01b03199182161790915560068054929093169116179055565b6005546001600160a01b031633146111755760405162461bcd60e51b81526004016108ef9061237c565b6001600160a01b03919091166000908152601460205260409020805460ff1916911515919091179055565b6005546001600160a01b031633146111ca5760405162461bcd60e51b81526004016108ef9061237c565b6001600160a01b03811661122f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108ef565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b600080611298838561242d565b9050838110156112ea5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016108ef565b9392505050565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b806113695761136483836000611a1a565b505050565b6005546001600160a01b0384811691161480159061139557506005546001600160a01b03838116911614155b80156113aa5750600c5462010000900460ff16155b156115fc57600c5460ff1661143d576001600160a01b03831660009081526012602052604090205460ff16806113f857506001600160a01b03821660009081526012602052604090205460ff165b61143d5760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b60448201526064016108ef565b6001600160a01b03831660009081526015602052604090205460ff16801561147e57506001600160a01b03821660009081526013602052604090205460ff16155b156114da576008548111156114d55760405162461bcd60e51b815260206004820152601c60248201527f627579207472616e73666572206f766572206d617820616d6f756e740000000060448201526064016108ef565b611572565b6001600160a01b03821660009081526015602052604090205460ff16801561151b57506001600160a01b03831660009081526013602052604090205460ff16155b15611572576009548111156115725760405162461bcd60e51b815260206004820152601d60248201527f53656c6c207472616e73666572206f766572206d617820616d6f756e7400000060448201526064016108ef565b6001600160a01b03821660009081526014602052604090205460ff166115fc57600a546001600160a01b0383166000908152602081905260409020546115b8908361242d565b11156115fc5760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016108ef565b30600090815260208190526040902054600b54811080159081906116275750600c54610100900460ff165b801561163c5750600c5462010000900460ff16155b801561166057506001600160a01b03841660009081526015602052604090205460ff165b801561168557506001600160a01b03851660009081526012602052604090205460ff16155b80156116aa57506001600160a01b03841660009081526012602052604090205460ff16155b156116d557600c805462ff00001916620100001790556116c8611ad7565b600c805462ff0000191690555b600c546001600160a01b03861660009081526012602052604090205460ff6201000090920482161591168061172257506001600160a01b03851660009081526012602052604090205460ff165b1561172b575060005b80156119d55760006011544310156117b657611753606461174d876063611d0a565b90611d89565b9050606361176282605e6123e9565b61176c91906123c7565b600e600082825461177d919061242d565b90915550606390506117908260056123e9565b61179a91906123c7565b601060008282546117ab919061242d565b909155506119b69050565b6001600160a01b03861660009081526015602052604090205460ff1680156117e95750600d54600160201b900460ff1615155b156118b857600d5461180d9060649061174d908890600160201b900460ff16611d0a565b600d5490915060ff600160201b820481169161183291600160381b90910416836123e9565b61183c91906123c7565b600f600082825461184d919061242d565b9091555050600d5460ff600160201b8204811691611876916501000000000090910416836123e9565b61188091906123c7565b600e6000828254611891919061242d565b9091555050600d5460ff600160201b820481169161179091600160301b90910416836123e9565b6001600160a01b03871660009081526015602052604090205460ff1680156118e45750600d5460ff1615155b156119b657600d546119019060649061174d90889060ff16611d0a565b600d5490915060ff8082169161192091630100000090910416836123e9565b61192a91906123c7565b600f600082825461193b919061242d565b9091555050600d5460ff8082169161195a9161010090910416836123e9565b61196491906123c7565b600e6000828254611975919061242d565b9091555050600d5460ff80821691611995916201000090910416836123e9565b61199f91906123c7565b601060008282546119b0919061242d565b90915550505b80156119c7576119c7873083611a1a565b6119d18186612445565b9450505b610cf1868686611a1a565b60008184841115611a045760405162461bcd60e51b81526004016108ef91906120f1565b506000611a118486612445565b95945050505050565b611a5781604051806060016040528060268152602001612554602691396001600160a01b03861660009081526020819052604090205491906119e0565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611a86908261128b565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611346565b3060009081526020819052604081205490506000601054600e54600f54611afe919061242d565b611b08919061242d565b90506000821580611b17575081155b15611b2157505050565b600b54611b2f9060146123e9565b831115611b4757600b54611b449060146123e9565b92505b6000600283600f5486611b5a91906123e9565b611b6491906123c7565b611b6e91906123c7565b90506000611b7c8583611dcb565b905047611b8882611e0d565b6000611b944783611dcb565b90506000611bb18761174d600e5485611d0a90919063ffffffff16565b90506000611bce8861174d60105486611d0a90919063ffffffff16565b90506000611bdc828461242d565b611be69085612445565b6000600f819055600e81905560105590508615801590611c065750600081115b15611c4f57611c158782611fd4565b60408051878152602081018390527f28fc98272ce761178794ad6768050fea1648e07f1e2ffe15afd3a290f8381486910160405180910390a15b6006546001600160a01b0316611c658447612445565b604051600081818185875af1925050503d8060008114611ca1576040519150601f19603f3d011682016040523d82523d6000602084013e611ca6565b606091505b50506007546040519199506001600160a01b0316904790600081818185875af1925050503d8060008114611cf6576040519150601f19603f3d011682016040523d82523d6000602084013e611cfb565b606091505b50505050505050505050505050565b600082611d19575060006108bf565b6000611d2583856123e9565b905082611d3285836123c7565b146112ea5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016108ef565b60006112ea83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120c3565b60006112ea83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506119e0565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611e4257611e4261245c565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611ebb57600080fd5b505afa158015611ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef39190612472565b81600181518110611f0657611f0661245c565b60200260200101906001600160a01b031690816001600160a01b031681525050611f51307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d846112f1565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac94790611fa690859060009086903090429060040161248f565b600060405180830381600087803b158015611fc057600080fd5b505af1158015610cf1573d6000803e3d6000fd5b611fff307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d846112f1565b60405163f305d71960e01b8152306004820181905260248201849052600060448301819052606483015260848201524260a48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03169063f305d71990839060c4016060604051808303818588803b15801561208357600080fd5b505af1158015612097573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906120bc9190612500565b5050505050565b600081836120e45760405162461bcd60e51b81526004016108ef91906120f1565b506000611a1184866123c7565b600060208083528351808285015260005b8181101561211e57858101830151858201604001528201612102565b81811115612130576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461215b57600080fd5b50565b6000806040838503121561217157600080fd5b823561217c81612146565b946020939093013593505050565b60006020828403121561219c57600080fd5b81356112ea81612146565b600080604083850312156121ba57600080fd5b50508035926020909101359150565b80358015158114610d6557600080fd5b6000602082840312156121eb57600080fd5b6112ea826121c9565b60008060006060848603121561220957600080fd5b833561221481612146565b9250602084013561222481612146565b929592945050506040919091013590565b803560ff81168114610d6557600080fd5b60008060008060008060c0878903121561225f57600080fd5b61226887612235565b955061227660208801612235565b945061228460408801612235565b935061229260608801612235565b92506122a060808801612235565b91506122ae60a08801612235565b90509295509295509295565b6000602082840312156122cc57600080fd5b5035919050565b600080604083850312156122e657600080fd5b82356122f181612146565b91506122ff602084016121c9565b90509250929050565b6000806040838503121561231b57600080fd5b823561232681612146565b9150602083013561233681612146565b809150509250929050565b600181811c9082168061235557607f821691505b6020821081141561237657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000826123e457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612403576124036123b1565b500290565b600060ff821660ff84168060ff03821115612425576124256123b1565b019392505050565b60008219821115612440576124406123b1565b500190565b600082821015612457576124576123b1565b500390565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561248457600080fd5b81516112ea81612146565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156124df5784516001600160a01b0316835293830193918301916001016124ba565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561251557600080fd5b835192506020840151915060408401519050925092509256fe45524332303a206465637265617365642063616e6e6f742062652062656c6f77207a65726f45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122061026296c00955a0037671f1ccaa3df6fca26cab9b39ece6468dabf1dd03896c64736f6c63430008090033

Verified Source Code Partial Match

Compiler: v0.8.9+commit.e5eed63a EVM: london Optimization: Yes (200 runs)
Secrethereum.sol 1017 lines
/**
https://t.me/SECRETHEREUMERC
https://www.secrethereum.org/
*/
// SPDX-License-Identifier: MIT

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

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

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

abstract contract Context {
    function _msgSender() internal view virtual returns(address) {
        return msg.sender;
    }

}

 
contract ERC20 is Context, IERC20, IERC20Metadata {
    using SafeMath for uint256;

        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);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        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].add(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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased cannot be below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is 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 {
        
        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(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");

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, 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 {
        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    
}
 
library SafeMath {
   
    function add(uint256 a, uint256 b) internal pure returns(uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

   
    function sub(uint256 a, uint256 b) internal pure returns(uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

   
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns(uint256) {
    
        if (a == 0) {
            return 0;
        }
 
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

 
    function div(uint256 a, uint256 b) internal pure returns(uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

  
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns(uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    
}
 
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() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}
 
 
 
library SafeMathInt {
    int256 private constant MIN_INT256 = int256(1) << 255;
    int256 private constant MAX_INT256 = ~(int256(1) << 255);

    /**
     * @dev Multiplies two int256 variables and fails on overflow.
     */
    function mul(int256 a, int256 b) internal pure returns(int256) {
        int256 c = a * b;

        // Detect overflow when multiplying MIN_INT256 with -1
        require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
        require((b == 0) || (c / b == a));
        return c;
    }

    /**
     * @dev Division of two int256 variables and fails on overflow.
     */
    function div(int256 a, int256 b) internal pure returns(int256) {
        // Prevent overflow when dividing MIN_INT256 by -1
        require(b != -1 || a != MIN_INT256);

        // Solidity already throws when dividing by 0.
        return a / b;
    }

    /**
     * @dev Subtracts two int256 variables and fails on overflow.
     */
    function sub(int256 a, int256 b) internal pure returns(int256) {
        int256 c = a - b;
        require((b >= 0 && c <= a) || (b < 0 && c > a));
        return c;
    }

    /**
     * @dev Adds two int256 variables and fails on overflow.
     */
    function add(int256 a, int256 b) internal pure returns(int256) {
        int256 c = a + b;
        require((b >= 0 && c >= a) || (b < 0 && c < a));
        return c;
    }

    /**
     * @dev Converts to absolute value, and fails on overflow.
     */
    function abs(int256 a) internal pure returns(int256) {
        require(a != MIN_INT256);
        return a < 0 ? -a : a;
    }


    function toUint256Safe(int256 a) internal pure returns(uint256) {
        require(a >= 0);
        return uint256(a);
    }
}
 
library SafeMathUint {
    function toInt256Safe(uint256 a) internal pure returns(int256) {
    int256 b = int256(a);
        require(b >= 0);
        return b;
    }
}


interface IUniswapV2Router01 {
    function factory() external pure returns(address);
    function WETH() external pure returns(address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns(uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns(uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns(uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns(uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns(uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns(uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns(uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns(uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    payable
    returns(uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
    external
    returns(uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    returns(uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
    external
    payable
    returns(uint[] memory amounts);

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

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

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}
 
contract Secrethereum is ERC20, Ownable {
    using SafeMath for uint256;

    IUniswapV2Router02 public immutable router;
    address public immutable uniswapV2Pair;


    // addresses
    address public  devWallet;
    address private marketingWallet;

    // limits 
    uint256 private maxBuyAmount;
    uint256 private maxSellAmount;   
    uint256 private maxWalletAmount;
 
    uint256 private thresholdSwapAmount;

    // status flags
    bool private isTrading = false;
    bool public swapEnabled = false;
    bool public isSwapping;


    struct Fees {
        uint8 buyTotalFees;
        uint8 buyMarketingFee;
        uint8 buyDevFee;
        uint8 buyLiquidityFee;

        uint8 sellTotalFees;
        uint8 sellMarketingFee;
        uint8 sellDevFee;
        uint8 sellLiquidityFee;
    }  

    Fees public _fees = Fees({
        buyTotalFees: 0,
        buyMarketingFee: 0,
        buyDevFee:0,
        buyLiquidityFee: 0,

        sellTotalFees: 0,
        sellMarketingFee: 0,
        sellDevFee:0,
        sellLiquidityFee: 0
    });
    
    

    uint256 public tokensForMarketing;
    uint256 public tokensForLiquidity;
    uint256 public tokensForDev;
    uint256 private taxTill;
    // exclude from fees and max transaction amount
    mapping(address => bool) private _isExcludedFromFees;
    mapping(address => bool) public _isExcludedMaxTransactionAmount;
    mapping(address => bool) public _isExcludedMaxWalletAmount;

    // 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 marketPair;

 
  
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived
    );


    constructor() ERC20("SECRETHEREUM", "SECRETHEREUM") {
 
        router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);


        uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH());

        _isExcludedMaxTransactionAmount[address(router)] = true;
        _isExcludedMaxTransactionAmount[address(uniswapV2Pair)] = true;        
        _isExcludedMaxTransactionAmount[owner()] = true;
        _isExcludedMaxTransactionAmount[address(this)] = true;

        _isExcludedFromFees[owner()] = true;
        _isExcludedFromFees[address(this)] = true;

        _isExcludedMaxWalletAmount[owner()] = true;
        _isExcludedMaxWalletAmount[address(this)] = true;
        _isExcludedMaxWalletAmount[address(uniswapV2Pair)] = true;


        marketPair[address(uniswapV2Pair)] = true;

        approve(address(router), type(uint256).max);
        uint256 totalSupply = 1e9 * 1e18;

        maxBuyAmount = totalSupply * 5 / 100; // 3% maxTransactionAmountTxn
        maxSellAmount = totalSupply * 5 / 100; // 3% maxTransactionAmountTxn
        maxWalletAmount = totalSupply * 5 / 100; // 3% maxWallet
        thresholdSwapAmount = totalSupply * 1 / 1000; // 0.01% swap wallet

        _fees.buyMarketingFee = 0;
        _fees.buyLiquidityFee = 0;
        _fees.buyDevFee = 0;
        _fees.buyTotalFees = _fees.buyMarketingFee + _fees.buyLiquidityFee + _fees.buyDevFee;

        _fees.sellMarketingFee = 8;
        _fees.sellLiquidityFee = 0;
        _fees.sellDevFee = 0;
        _fees.sellTotalFees = _fees.sellMarketingFee + _fees.sellLiquidityFee + _fees.sellDevFee;


        marketingWallet = address(0x126aA42eaF17F730F55Ab0C9A540590aA7D353a3);
        devWallet = address(0x126aA42eaF17F730F55Ab0C9A540590aA7D353a3);

        // exclude from paying fees or having max transaction amount

        /*
            _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 {

    }

    // once enabled, can never be turned off
    function swapTrading() external onlyOwner {
        isTrading = true;
        swapEnabled = true;
        taxTill = block.number + 0;
    }



    // change the minimum amount of tokens to sell from fees
    function updateThresholdSwapAmount(uint256 newAmount) external onlyOwner returns(bool){
        thresholdSwapAmount = newAmount;
        return true;
    }


    function updateMaxTxnAmount(uint256 newMaxBuy, uint256 newMaxSell) external onlyOwner {
        require(((totalSupply() * newMaxBuy) / 1000) >= (totalSupply() / 100), "maxBuyAmount must be higher than 1%");
        require(((totalSupply() * newMaxSell) / 1000) >= (totalSupply() / 100), "maxSellAmount must be higher than 1%");
        maxBuyAmount = (totalSupply() * newMaxBuy) / 1000;
        maxSellAmount = (totalSupply() * newMaxSell) / 1000;
    }


    function updateMaxWalletAmount(uint256 newPercentage) external onlyOwner {
        require(((totalSupply() * newPercentage) / 1000) >= (totalSupply() / 100), "Cannot set maxWallet lower than 1%");
        maxWalletAmount = (totalSupply() * newPercentage) / 1000;
    }

    // only use to disable contract sales if absolutely necessary (emergency use only)
    function toggleSwapEnabled(bool enabled) external onlyOwner(){
        swapEnabled = enabled;
 
    }

    function updateFees(uint8 _marketingFeeBuy, uint8 _liquidityFeeBuy,uint8 _devFeeBuy,uint8 _marketingFeeSell, uint8 _liquidityFeeSell,uint8 _devFeeSell) external onlyOwner{
        _fees.buyMarketingFee = _marketingFeeBuy;
        _fees.buyLiquidityFee = _liquidityFeeBuy;
        _fees.buyDevFee = _devFeeBuy;
        _fees.buyTotalFees = _fees.buyMarketingFee + _fees.buyLiquidityFee + _fees.buyDevFee;

        _fees.sellMarketingFee = _marketingFeeSell;
        _fees.sellLiquidityFee = _liquidityFeeSell;
        _fees.sellDevFee = _devFeeSell;
        _fees.sellTotalFees = _fees.sellMarketingFee + _fees.sellLiquidityFee + _fees.sellDevFee;
        require(_fees.buyTotalFees <= 30, "Must keep fees at 30% or less");   
        require(_fees.sellTotalFees <= 30, "Must keep fees at 30% or less");
     
    }
    
    function excludeFromFees(address account, bool excluded) public onlyOwner {
        _isExcludedFromFees[account] = excluded;
    }
    function excludeFromWalletLimit(address account, bool excluded) public onlyOwner {
        _isExcludedMaxWalletAmount[account] = excluded;
    }
    function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
        _isExcludedMaxTransactionAmount[updAds] = isEx;
    }


    function setMarketPair(address pair, bool value) public onlyOwner {
        require(pair != uniswapV2Pair, "Must keep uniswapV2Pair");
        marketPair[pair] = value;
    }


    function setWallets(address _marketingWallet,address _devWallet) external onlyOwner{
        marketingWallet = _marketingWallet;
        devWallet = _devWallet;
    }

    function isExcludedFromFees(address account) public view returns(bool) {
        return _isExcludedFromFees[account];
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
        
    ) internal override {
        
        if (amount == 0) {
            super._transfer(sender, recipient, 0);
            return;
        }

        if (
            sender != owner() &&
            recipient != owner() &&
            !isSwapping
        ) {

            if (!isTrading) {
                require(_isExcludedFromFees[sender] || _isExcludedFromFees[recipient], "Trading is not active.");
            }
            if (marketPair[sender] && !_isExcludedMaxTransactionAmount[recipient]) {
                require(amount <= maxBuyAmount, "buy transfer over max amount");
            } 
            else if (marketPair[recipient] && !_isExcludedMaxTransactionAmount[sender]) {
                require(amount <= maxSellAmount, "Sell transfer over max amount");
            }

            if (!_isExcludedMaxWalletAmount[recipient]) {
                require(amount + balanceOf(recipient) <= maxWalletAmount, "Max wallet exceeded");
            }
        }
 
        
 
        uint256 contractTokenBalance = balanceOf(address(this));
 
        bool canSwap = contractTokenBalance >= thresholdSwapAmount;

        if (
            canSwap &&
            swapEnabled &&
            !isSwapping &&
            marketPair[recipient] &&
            !_isExcludedFromFees[sender] &&
            !_isExcludedFromFees[recipient]
        ) {
            isSwapping = true;
            swapBack();
            isSwapping = false;
        }
 
        bool takeFee = !isSwapping;

        // if any account belongs to _isExcludedFromFee account then remove the fee
        if (_isExcludedFromFees[sender] || _isExcludedFromFees[recipient]) {
            takeFee = false;
        }
 
        
        // only take fees on buys/sells, do not take on wallet transfers
        if (takeFee) {
            uint256 fees = 0;
            if(block.number < taxTill) {
                fees = amount.mul(99).div(100);
                tokensForMarketing += (fees * 94) / 99;
                tokensForDev += (fees * 5) / 99;
            } else if (marketPair[recipient] && _fees.sellTotalFees > 0) {
                fees = amount.mul(_fees.sellTotalFees).div(100);
                tokensForLiquidity += fees * _fees.sellLiquidityFee / _fees.sellTotalFees;
                tokensForMarketing += fees * _fees.sellMarketingFee / _fees.sellTotalFees;
                tokensForDev += fees * _fees.sellDevFee / _fees.sellTotalFees;
            }
            // on buy
            else if (marketPair[sender] && _fees.buyTotalFees > 0) {
                fees = amount.mul(_fees.buyTotalFees).div(100);
                tokensForLiquidity += fees * _fees.buyLiquidityFee / _fees.buyTotalFees;
                tokensForMarketing += fees * _fees.buyMarketingFee / _fees.buyTotalFees;
                tokensForDev += fees * _fees.buyDevFee / _fees.buyTotalFees;
            }

            if (fees > 0) {
                super._transfer(sender, address(this), fees);
            }

            amount -= fees;

        }

        super._transfer(sender, recipient, amount);
    }

    function swapTokensForEth(uint256 tAmount) private {

        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = router.WETH();

        _approve(address(this), address(router), tAmount);

        // make the swap
        router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );

    }

    function addLiquidity(uint256 tAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(router), tAmount);

        // add the liquidity
        router.addLiquidityETH{ value: ethAmount } (address(this), tAmount, 0, 0 , address(this), block.timestamp);
    }

    function swapBack() private {
        uint256 contractTokenBalance = balanceOf(address(this));
        uint256 toSwap = tokensForLiquidity + tokensForMarketing + tokensForDev;
        bool success;

        if (contractTokenBalance == 0 || toSwap == 0) { return; }

        if (contractTokenBalance > thresholdSwapAmount * 20) {
            contractTokenBalance = thresholdSwapAmount * 20;
        }

        // Halve the amount of liquidity tokens
        uint256 liquidityTokens = contractTokenBalance * tokensForLiquidity / toSwap / 2;
        uint256 amountToSwapForETH = contractTokenBalance.sub(liquidityTokens);
 
        uint256 initialETHBalance = address(this).balance;

        swapTokensForEth(amountToSwapForETH); 
 
        uint256 newBalance = address(this).balance.sub(initialETHBalance);
 
        uint256 ethForMarketing = newBalance.mul(tokensForMarketing).div(toSwap);
        uint256 ethForDev = newBalance.mul(tokensForDev).div(toSwap);
        uint256 ethForLiquidity = newBalance - (ethForMarketing + ethForDev);


        tokensForLiquidity = 0;
        tokensForMarketing = 0;
        tokensForDev = 0;


        if (liquidityTokens > 0 && ethForLiquidity > 0) {
            addLiquidity(liquidityTokens, ethForLiquidity);
            emit SwapAndLiquify(amountToSwapForETH, ethForLiquidity);
        }

        (success,) = address(devWallet).call{ value: (address(this).balance - ethForMarketing) } ("");
        (success,) = address(marketingWallet).call{ value: address(this).balance } ("");
    }

}

Read Contract

_fees 0xd212a69a → uint8, uint8, uint8, uint8, uint8, uint8, uint8, uint8
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
_isExcludedMaxWalletAmount 0x96880b17 → bool
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
devWallet 0x8ea5220f → address
isExcludedFromFees 0x4fbee193 → bool
isSwapping 0xb8863115 → bool
marketPair 0xf5b3c3bf → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
router 0xf887ea40 → address
swapEnabled 0x6ddd1713 → bool
symbol 0x95d89b41 → string
tokensForDev 0x9fccce32 → uint256
tokensForLiquidity 0x1a8145bb → uint256
tokensForMarketing 0x1f3fed8f → uint256
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address

Write Contract 18 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
excludeFromWalletLimit 0xe16830a8
address account
bool excluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
setMarketPair 0xc16dd4a4
address pair
bool value
setWallets 0xd3f6a157
address _marketingWallet
address _devWallet
swapTrading 0xb9e418e7
No parameters
toggleSwapEnabled 0x1c6e8a75
bool enabled
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateFees 0x3265e846
uint8 _marketingFeeBuy
uint8 _liquidityFeeBuy
uint8 _devFeeBuy
uint8 _marketingFeeSell
uint8 _liquidityFeeSell
uint8 _devFeeSell
updateMaxTxnAmount 0x11a582c3
uint256 newMaxBuy
uint256 newMaxSell
updateMaxWalletAmount 0xc18bc195
uint256 newPercentage
updateThresholdSwapAmount 0x555467a1
uint256 newAmount
returns: bool

Recent Transactions

No transactions found for this address