Address Contract Partially Verified
Address
0x1396D6F2e9056954DFc2775204bB3e2Eb8ab8a5B
Balance
0 ETH
Nonce
1
Code Size
10431 bytes
Creator
0x5D8c0d6C...D6d8 at tx 0x4d7b0876...dc1885
Indexed Transactions
0
Contract Bytecode
10431 bytes
0x6080604052600436106102b25760003560e01c80638a8c523c11610175578063bbc0c742116100dc578063d85ba06311610095578063f11a24d31161006f578063f11a24d314610888578063f2fde38b1461089e578063f6374342146108be578063f8b45b05146108d457600080fd5b8063d85ba06314610816578063dd62ed3e1461082c578063e2f456051461087257600080fd5b8063bbc0c74214610761578063c024666814610780578063c17b5b8c146107a0578063c18bc195146107c0578063c8c8ebe4146107e0578063d257b34f146107f657600080fd5b80639c3b4fdc1161012e5780639c3b4fdc146106bf5780639fccce32146106d5578063a0d82dc5146106eb578063a457c2d714610701578063a9059cbb14610721578063aacebbe31461074157600080fd5b80638a8c523c146106115780638da5cb5b146106265780639213691314610644578063924de9b71461065a57806395c336521461067a57806395d89b41146106aa57600080fd5b8063395093511161021957806370a08231116101d257806370a082311461055b578063715018a614610591578063751039fc146105a65780637571336a146105bb5780637bce5a04146105db5780638095d564146105f157600080fd5b8063395093511461047e57806349bd5a5e1461049e5780634a62bb65146104d25780634fbee193146104ec5780636a486a8e146105255780636ddd17131461053b57600080fd5b80631a8145bb1161026b5780631a8145bb146103d65780631a89e947146103ec5780631f3fed8f1461040c578063203e727e1461042257806323b872dd14610442578063313ce5671461046257600080fd5b806306fdde03146102be578063095ea7b3146102e957806310d5de53146103195780631694505e1461034957806318160ddd146103955780631816467f146103b457600080fd5b366102b957005b600080fd5b3480156102ca57600080fd5b506102d36108ea565b6040516102e0919061240a565b60405180910390f35b3480156102f557600080fd5b50610309610304366004612470565b61097c565b60405190151581526020016102e0565b34801561032557600080fd5b5061030961033436600461249c565b60196020526000908152604090205460ff1681565b34801561035557600080fd5b5061037d7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020016102e0565b3480156103a157600080fd5b506002545b6040519081526020016102e0565b3480156103c057600080fd5b506103d46103cf36600461249c565b610993565b005b3480156103e257600080fd5b506103a660155481565b3480156103f857600080fd5b506103d46104073660046124c9565b610a23565b34801561041857600080fd5b506103a660145481565b34801561042e57600080fd5b506103d461043d3660046124fe565b610aed565b34801561044e57600080fd5b5061030961045d366004612517565b610bca565b34801561046e57600080fd5b50604051601281526020016102e0565b34801561048a57600080fd5b50610309610499366004612470565b610c33565b3480156104aa57600080fd5b5061037d7f0000000000000000000000004305bcc56bb35faf3edf13421f8d3167df32fab381565b3480156104de57600080fd5b50600b546103099060ff1681565b3480156104f857600080fd5b5061030961050736600461249c565b6001600160a01b031660009081526018602052604090205460ff1690565b34801561053157600080fd5b506103a660105481565b34801561054757600080fd5b50600b546103099062010000900460ff1681565b34801561056757600080fd5b506103a661057636600461249c565b6001600160a01b031660009081526020819052604090205490565b34801561059d57600080fd5b506103d4610c69565b3480156105b257600080fd5b50610309610cdd565b3480156105c757600080fd5b506103d46105d63660046124c9565b610d1a565b3480156105e757600080fd5b506103a6600d5481565b3480156105fd57600080fd5b506103d461060c366004612558565b610d6f565b34801561061d57600080fd5b506103d4610e17565b34801561063257600080fd5b506005546001600160a01b031661037d565b34801561065057600080fd5b506103a660115481565b34801561066657600080fd5b506103d4610675366004612584565b610e58565b34801561068657600080fd5b5061030961069536600461249c565b601a6020526000908152604090205460ff1681565b3480156106b657600080fd5b506102d3610e9e565b3480156106cb57600080fd5b506103a6600f5481565b3480156106e157600080fd5b506103a660165481565b3480156106f757600080fd5b506103a660135481565b34801561070d57600080fd5b5061030961071c366004612470565b610ead565b34801561072d57600080fd5b5061030961073c366004612470565b610efc565b34801561074d57600080fd5b506103d461075c36600461249c565b610f09565b34801561076d57600080fd5b50600b5461030990610100900460ff1681565b34801561078c57600080fd5b506103d461079b3660046124c9565b610f90565b3480156107ac57600080fd5b506103d46107bb366004612558565b611019565b3480156107cc57600080fd5b506103d46107db3660046124fe565b6110bc565b3480156107ec57600080fd5b506103a660085481565b34801561080257600080fd5b506103096108113660046124fe565b61118d565b34801561082257600080fd5b506103a6600c5481565b34801561083857600080fd5b506103a661084736600461259f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561087e57600080fd5b506103a660095481565b34801561089457600080fd5b506103a6600e5481565b3480156108aa57600080fd5b506103d46108b936600461249c565b6112e4565b3480156108ca57600080fd5b506103a660125481565b3480156108e057600080fd5b506103a6600a5481565b6060600380546108f9906125d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610925906125d8565b80156109725780601f1061094757610100808354040283529160200191610972565b820191906000526020600020905b81548152906001019060200180831161095557829003601f168201915b5050505050905090565b6000610989338484611435565b5060015b92915050565b6005546001600160a01b031633146109c65760405162461bcd60e51b81526004016109bd90612612565b60405180910390fd5b6007546040516001600160a01b03918216918316907f90b8024c4923d3873ff5b9fcb43d0360d4b9217fa41225d07ba379993552e74390600090a3600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610a4d5760405162461bcd60e51b81526004016109bd90612612565b7f0000000000000000000000004305bcc56bb35faf3edf13421f8d3167df32fab36001600160a01b0316826001600160a01b031603610adf5760405162461bcd60e51b815260206004820152602860248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d20604482015267706172746e65727360c01b60648201526084016109bd565b610ae9828261155a565b5050565b6005546001600160a01b03163314610b175760405162461bcd60e51b81526004016109bd90612612565b670de0b6b3a76400006103e8610b2c60025490565b610b3790600161265d565b610b419190612674565b610b4b9190612674565b811015610bb25760405162461bcd60e51b815260206004820152602f60248201527f43616e6e6f7420736574206d61785472616e73616374696f6e416d6f756e742060448201526e6c6f776572207468616e20302e312560881b60648201526084016109bd565b610bc481670de0b6b3a764000061265d565b60085550565b6000610bd78484846115ae565b610c298433610c248560405180606001604052806028815260200161283d602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190611cb9565b611435565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610989918590610c2490866113cf565b6005546001600160a01b03163314610c935760405162461bcd60e51b81526004016109bd90612612565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546000906001600160a01b03163314610d0a5760405162461bcd60e51b81526004016109bd90612612565b50600b805460ff19169055600190565b6005546001600160a01b03163314610d445760405162461bcd60e51b81526004016109bd90612612565b6001600160a01b03919091166000908152601960205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610d995760405162461bcd60e51b81526004016109bd90612612565b600f839055600e829055600d81905580610db38385612696565b610dbd9190612696565b600c819055600a1015610e125760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420313025206f72206c65737300000060448201526064016109bd565b505050565b6005546001600160a01b03163314610e415760405162461bcd60e51b81526004016109bd90612612565b600b805462ffff0019166201010017905543601755565b6005546001600160a01b03163314610e825760405162461bcd60e51b81526004016109bd90612612565b600b8054911515620100000262ff000019909216919091179055565b6060600480546108f9906125d8565b60006109893384610c2485604051806060016040528060258152602001612865602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190611cb9565b60006109893384846115ae565b6005546001600160a01b03163314610f335760405162461bcd60e51b81526004016109bd90612612565b6006546040516001600160a01b03918216918316907fa751787977eeb3902e30e1d19ca00c6ad274a1f622c31a206e32366700b0567490600090a3600680546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610fba5760405162461bcd60e51b81526004016109bd90612612565b6001600160a01b038216600081815260186020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b031633146110435760405162461bcd60e51b81526004016109bd90612612565b6013839055601282905560118190558061105d8385612696565b6110679190612696565b6010819055605a1015610e125760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420393025206f72206c65737300000060448201526064016109bd565b6005546001600160a01b031633146110e65760405162461bcd60e51b81526004016109bd90612612565b670de0b6b3a76400006103e86110fb60025490565b61110690600561265d565b6111109190612674565b61111a9190612674565b8110156111755760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e20604482015263302e352560e01b60648201526084016109bd565b61118781670de0b6b3a764000061265d565b600a5550565b6005546000906001600160a01b031633146111ba5760405162461bcd60e51b81526004016109bd90612612565b620186a06111c760025490565b6111d290600161265d565b6111dc9190612674565b8210156112495760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b60648201526084016109bd565b6103e861125560025490565b61126090600561265d565b61126a9190612674565b8211156112d65760405162461bcd60e51b815260206004820152603460248201527f5377617020616d6f756e742063616e6e6f742062652068696768657220746861604482015273371018171a92903a37ba30b61039bab838363c9760611b60648201526084016109bd565b50600981905560015b919050565b6005546001600160a01b0316331461130e5760405162461bcd60e51b81526004016109bd90612612565b6001600160a01b0381166113735760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109bd565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000806113dc8385612696565b90508381101561142e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016109bd565b9392505050565b6001600160a01b0383166114975760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109bd565b6001600160a01b0382166114f85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109bd565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0382166000818152601a6020526040808220805460ff191685151590811790915590519092917f86866eb41d8e92d6c25444e7c64d1afbb6521f9f48efd135bf4299ef7f9ce47591a35050565b6001600160a01b0383166115d45760405162461bcd60e51b81526004016109bd906126a9565b6001600160a01b0382166115fa5760405162461bcd60e51b81526004016109bd906126ee565b8060000361160e57610e1283836000611cf3565b600b5460ff1615611984576005546001600160a01b0384811691161480159061164557506005546001600160a01b03838116911614155b801561165957506001600160a01b03821615155b801561167057506001600160a01b03821661dead14155b80156116865750600554600160a01b900460ff16155b1561198457600b54610100900460ff1661171e576001600160a01b03831660009081526018602052604090205460ff16806116d957506001600160a01b03821660009081526018602052604090205460ff165b61171e5760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b60448201526064016109bd565b6001600160a01b0383166000908152601a602052604090205460ff16801561175f57506001600160a01b03821660009081526019602052604090205460ff16155b15611843576008548111156117d45760405162461bcd60e51b815260206004820152603560248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201527436b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760591b60648201526084016109bd565b600a546001600160a01b0383166000908152602081905260409020546117fa9083612696565b111561183e5760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016109bd565b611984565b6001600160a01b0382166000908152601a602052604090205460ff16801561188457506001600160a01b03831660009081526019602052604090205460ff16155b156118fa5760085481111561183e5760405162461bcd60e51b815260206004820152603660248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152751036b0bc2a3930b739b0b1ba34b7b720b6b7bab73a1760511b60648201526084016109bd565b6001600160a01b03821660009081526019602052604090205460ff1661198457600a546001600160a01b0383166000908152602081905260409020546119409083612696565b11156119845760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016109bd565b30600090815260208190526040902054600954811080159081906119b05750600b5462010000900460ff165b80156119c65750600554600160a01b900460ff16155b80156119eb57506001600160a01b0385166000908152601a602052604090205460ff16155b8015611a1057506001600160a01b03851660009081526018602052604090205460ff16155b8015611a3557506001600160a01b03841660009081526018602052604090205460ff16155b15611a63576005805460ff60a01b1916600160a01b179055611a55611dfc565b6005805460ff60a01b191690555b6005546001600160a01b03861660009081526018602052604090205460ff600160a01b909204821615911680611ab157506001600160a01b03851660009081526018602052604090205460ff165b15611aba575060005b60008115611ca5576001600160a01b0386166000908152601a602052604090205460ff168015611aec57506000601054115b15611baa57611b116064611b0b6010548861203690919063ffffffff16565b906120b8565b905060105460125482611b24919061265d565b611b2e9190612674565b60156000828254611b3f9190612696565b9091555050601054601354611b54908361265d565b611b5e9190612674565b60166000828254611b6f9190612696565b9091555050601054601154611b84908361265d565b611b8e9190612674565b60146000828254611b9f9190612696565b90915550611c879050565b6001600160a01b0387166000908152601a602052604090205460ff168015611bd457506000600c54115b15611c8757611bf36064611b0b600c548861203690919063ffffffff16565b9050600c54600e5482611c06919061265d565b611c109190612674565b60156000828254611c219190612696565b9091555050600c54600f54611c36908361265d565b611c409190612674565b60166000828254611c519190612696565b9091555050600c54600d54611c66908361265d565b611c709190612674565b60146000828254611c819190612696565b90915550505b8015611c9857611c98873083611cf3565b611ca28186612731565b94505b611cb0878787611cf3565b50505050505050565b60008184841115611cdd5760405162461bcd60e51b81526004016109bd919061240a565b506000611cea8486612731565b95945050505050565b6001600160a01b038316611d195760405162461bcd60e51b81526004016109bd906126a9565b6001600160a01b038216611d3f5760405162461bcd60e51b81526004016109bd906126ee565b611d7c81604051806060016040528060268152602001612817602691396001600160a01b0386166000908152602081905260409020549190611cb9565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611dab90826113cf565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910161154d565b3060009081526020819052604081205490506000601654601454601554611e239190612696565b611e2d9190612696565b90506000821580611e3c575081155b15611e4657505050565b600954611e5490601461265d565b831115611e6c57600954611e6990601461265d565b92505b600060028360155486611e7f919061265d565b611e899190612674565b611e939190612674565b90506000611ea185836120fa565b905047611ead8261213c565b6000611eb947836120fa565b90506000611ed687611b0b6014548561203690919063ffffffff16565b90506000611ef388611b0b6016548661203690919063ffffffff16565b9050600081611f028486612731565b611f0c9190612731565b60006015819055601481905560168190556007546040519293506001600160a01b031691849181818185875af1925050503d8060008114611f69576040519150601f19603f3d011682016040523d82523d6000602084013e611f6e565b606091505b50909850508615801590611f825750600081115b15611fd557611f9187826122fc565b601554604080518881526020810184905280820192909252517f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619181900360600190a15b6006546040516001600160a01b03909116904790600081818185875af1925050503d8060008114612022576040519150601f19603f3d011682016040523d82523d6000602084013e612027565b606091505b50505050505050505050505050565b6000826000036120485750600061098d565b6000612054838561265d565b9050826120618583612674565b1461142e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016109bd565b600061142e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506123dc565b600061142e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cb9565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061217157612171612744565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612213919061275a565b8160018151811061222657612226612744565b60200260200101906001600160a01b031690816001600160a01b031681525050612271307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611435565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac947906122c6908590600090869030904290600401612777565b600060405180830381600087803b1580156122e057600080fd5b505af11580156122f4573d6000803e3d6000fd5b505050505050565b612327307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611435565b60405163f305d71960e01b8152306004820181905260248201849052600060448301819052606483015260848201524260a48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03169063f305d71990839060c40160606040518083038185885af11580156123b0573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906123d591906127e8565b5050505050565b600081836123fd5760405162461bcd60e51b81526004016109bd919061240a565b506000611cea8486612674565b600060208083528351808285015260005b818110156124375785810183015185820160400152820161241b565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461246d57600080fd5b50565b6000806040838503121561248357600080fd5b823561248e81612458565b946020939093013593505050565b6000602082840312156124ae57600080fd5b813561142e81612458565b803580151581146112df57600080fd5b600080604083850312156124dc57600080fd5b82356124e781612458565b91506124f5602084016124b9565b90509250929050565b60006020828403121561251057600080fd5b5035919050565b60008060006060848603121561252c57600080fd5b833561253781612458565b9250602084013561254781612458565b929592945050506040919091013590565b60008060006060848603121561256d57600080fd5b505081359360208301359350604090920135919050565b60006020828403121561259657600080fd5b61142e826124b9565b600080604083850312156125b257600080fd5b82356125bd81612458565b915060208301356125cd81612458565b809150509250929050565b600181811c908216806125ec57607f821691505b60208210810361260c57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761098d5761098d612647565b60008261269157634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561098d5761098d612647565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b8181038181111561098d5761098d612647565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561276c57600080fd5b815161142e81612458565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156127c75784516001600160a01b0316835293830193918301916001016127a2565b50506001600160a01b03969096166060850152505050608001529392505050565b6000806000606084860312156127fd57600080fd5b835192506020840151915060408401519050925092509256fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122052295470cec6cc5ebeccd453a44877cadb22fd9a04a36a25770512224165c08d64736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: Yes (200 runs)
Cicada.sol 1263 lines
// ..:^^^^^^^^^^^::.. .:^~:. ...::::^^^^^^^:::.
// .!::^7^ :7^^^:.:^J?7!77!^.. ^Y7^^.!7!. ..:^^~~77^^~:::~^^::Y~.!?J?.
// 7~:^:^::..^::..^^^~:~~!7!77J??~^..J~^^.~:..:^!!!!~^:^^..:^^~?^:: ^?!!!?!^
// ::~::::::!. .^^:::^~^^^^^~~~::7!!^^..:^^~~^^~~~!~^~~^!~^~::^ .:!?~!7:.
// .:^^:::..!!..:^^:^:.... .^~..!:.!^ ..::^.:~^^^~!^^~:..:^^~^:^.
// .^:.^^ ..:::.^. ^~:...:... ^!^:^^^::^:^..
// :::..^^. :^ .. .. .^...:^^.
// .::::^: .: ... .. : .:^^:
// .:::::.::. : .. : .. :::.:::
// ... .: . . ......
// ..
// :.
// ..
//
// -.-. .. -.-. .- -.. .- ...-- ...-- ----- .----
//
// .-- . -... https://cicada3301.xyz
// - --. https://t.me/C636963616461
// -..- https://x.com/CicadaERC
//SPDX-License-Identifier: 3301
pragma solidity 0.8.17;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface 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);
}
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 allowance 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 {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_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");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(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);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(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 to 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 {}
}
library SafeMath {
/**
* @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) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @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 sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @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) {
// 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 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) {
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;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts 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 mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
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 Cicada is ERC20, Ownable {
using SafeMath for uint256;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
bool private swapping;
address private marketingWallet;
address private devWallet;
uint256 public maxTransactionAmount;
uint256 public swapTokensAtAmount;
uint256 public maxWallet;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = true;
uint256 public buyTotalFees;
uint256 public buyMarketingFee;
uint256 public buyLiquidityFee;
uint256 public buyDevFee;
uint256 public sellTotalFees;
uint256 public sellMarketingFee;
uint256 public sellLiquidityFee;
uint256 public sellDevFee;
uint256 public tokensForMarketing;
uint256 public tokensForLiquidity;
uint256 public tokensForDev;
// block number of opened trading
uint256 launchedAt;
/******************/
// 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 partners;
event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event ExcludeFromFees(address indexed account, bool isExcluded);
event Setpartner(address indexed pair, bool indexed value);
event marketingWalletUpdated(address indexed newWallet, address indexed oldWallet);
event devWalletUpdated(address indexed newWallet, address indexed oldWallet);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoNukeLP();
event ManualNukeLP();
constructor() ERC20("CICADA","CICADA") {
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
excludeFromMaxTransaction(address(_uniswapV2Router), true);
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
excludeFromMaxTransaction(address(uniswapV2Pair), true);
_setpartner(address(uniswapV2Pair), true);
uint256 _buyMarketingFee = 1;
uint256 _buyLiquidityFee = 0;
uint256 _buyDevFee = 0;
uint256 _sellMarketingFee = 1;
uint256 _sellLiquidityFee = 0;
uint256 _sellDevFee = 0;
uint256 totalSupply = 1 * 1e9 * 1e18;
maxTransactionAmount = totalSupply * 10 / 1000; // 1%
maxWallet = totalSupply * 10 / 1000; // 1%
swapTokensAtAmount = totalSupply * 5 / 10000; // 0.1%
buyMarketingFee = _buyMarketingFee;
buyLiquidityFee = _buyLiquidityFee;
buyDevFee = _buyDevFee;
buyTotalFees = buyMarketingFee + buyLiquidityFee + buyDevFee;
sellMarketingFee = _sellMarketingFee;
sellLiquidityFee = _sellLiquidityFee;
sellDevFee = _sellDevFee;
sellTotalFees = sellMarketingFee + sellLiquidityFee + sellDevFee;
marketingWallet = 0x524E064767047239fd7C773fC963c6c80d4E6e7d; // set as marketing wallet
devWallet = 0x1Ab5ddF9F0a28612Ab48EEA6EFC13dBdB1BFd8Be; // set as dev wallet
// exclude from paying fees or having max transaction amount
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 {
}
// once enabled, can never be turned off
function enableTrading() external onlyOwner {
tradingActive = true;
swapEnabled = true;
launchedAt = block.number;
}
// remove limits after token is stable
function removeLimits() external onlyOwner returns (bool){
limitsInEffect = false;
return true;
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool){
require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply.");
require(newAmount <= totalSupply() * 5 / 1000, "Swap amount cannot be higher than 0.5% total supply.");
swapTokensAtAmount = newAmount;
return true;
}
function updateMaxTxnAmount(uint256 newNum) external onlyOwner {
require(newNum >= (totalSupply() * 1 / 1000)/1e18, "Cannot set maxTransactionAmount lower than 0.1%");
maxTransactionAmount = newNum * (10**18);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(newNum >= (totalSupply() * 5 / 1000)/1e18, "Cannot set maxWallet lower than 0.5%");
maxWallet = newNum * (10**18);
}
function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner {
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
function updateBuyFees(
uint256 _devFee,
uint256 _liquidityFee,
uint256 _marketingFee
) external onlyOwner {
buyDevFee = _devFee;
buyLiquidityFee = _liquidityFee;
buyMarketingFee = _marketingFee;
buyTotalFees = buyDevFee + buyLiquidityFee + buyMarketingFee;
require(buyTotalFees <= 10, "Must keep fees at 10% or less");
}
function updateSellFees(
uint256 _devFee,
uint256 _liquidityFee,
uint256 _marketingFee
) external onlyOwner {
sellDevFee = _devFee;
sellLiquidityFee = _liquidityFee;
sellMarketingFee = _marketingFee;
sellTotalFees = sellDevFee + sellLiquidityFee + sellMarketingFee;
require(sellTotalFees <= 90, "Must keep fees at 90% or less");
}
// only use to disable contract sales if absolutely necessary (emergency use only)
function updateSwapEnabled(bool enabled) external onlyOwner(){
swapEnabled = enabled;
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function setpartner(address pair, bool value) public onlyOwner {
require(pair != uniswapV2Pair, "The pair cannot be removed from partners");
_setpartner(pair, value);
}
function _setpartner(address pair, bool value) private {
partners[pair] = value;
emit Setpartner(pair, value);
}
function updateMarketingWallet(address newMarketingWallet) external onlyOwner {
emit marketingWalletUpdated(newMarketingWallet, marketingWallet);
marketingWallet = newMarketingWallet;
}
function updateDevWallet(address newWallet) external onlyOwner {
emit devWalletUpdated(newWallet, devWallet);
devWallet = newWallet;
}
function isExcludedFromFees(address account) public view returns(bool) {
return _isExcludedFromFees[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");
if(amount == 0) {
super._transfer(from, to, 0);
return;
}
if(limitsInEffect){
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!swapping
){
if(!tradingActive){
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
//when buy
if (partners[from] && !_isExcludedMaxTransactionAmount[to]) {
require(amount <= maxTransactionAmount, "Buy transfer amount exceeds the maxTransactionAmount.");
require(amount + balanceOf(to) <= maxWallet, "Max wallet exceeded");
}
else if (partners[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 &&
!partners[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){
// on sell
if (partners[to] && sellTotalFees > 0){
fees = amount.mul(sellTotalFees).div(100);
tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees;
tokensForDev += fees * sellDevFee / sellTotalFees;
tokensForMarketing += fees * sellMarketingFee / sellTotalFees;
}
// on buy
else if(partners[from] && buyTotalFees > 0) {
fees = amount.mul(buyTotalFees).div(100);
tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees;
tokensForDev += fees * buyDevFee / buyTotalFees;
tokensForMarketing += fees * buyMarketingFee / 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
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
address(this),
block.timestamp
);
}
function swapBack() private {
uint256 contractBalance = balanceOf(address(this));
uint256 totalTokensToSwap = tokensForLiquidity + tokensForMarketing + tokensForDev;
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.sub(liquidityTokens);
uint256 initialETHBalance = address(this).balance;
swapTokensForEth(amountToSwapForETH);
uint256 ethBalance = address(this).balance.sub(initialETHBalance);
uint256 ethForMarketing = ethBalance.mul(tokensForMarketing).div(totalTokensToSwap);
uint256 ethForDev = ethBalance.mul(tokensForDev).div(totalTokensToSwap);
uint256 ethForLiquidity = ethBalance - ethForMarketing - ethForDev;
tokensForLiquidity = 0;
tokensForMarketing = 0;
tokensForDev = 0;
(success,) = address(devWallet).call{value: ethForDev}("");
if(liquidityTokens > 0 && ethForLiquidity > 0){
addLiquidity(liquidityTokens, ethForLiquidity);
emit SwapAndLiquify(amountToSwapForETH, ethForLiquidity, tokensForLiquidity);
}
(success,) = address(marketingWallet).call{value: address(this).balance}("");
}
}
Read Contract
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyDevFee 0x9c3b4fdc → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyMarketingFee 0x7bce5a04 → uint256
buyTotalFees 0xd85ba063 → uint256
decimals 0x313ce567 → uint8
isExcludedFromFees 0x4fbee193 → bool
limitsInEffect 0x4a62bb65 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
partners 0x95c33652 → bool
sellDevFee 0xa0d82dc5 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellMarketingFee 0x92136913 → uint256
sellTotalFees 0x6a486a8e → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
tokensForDev 0x9fccce32 → uint256
tokensForLiquidity 0x1a8145bb → uint256
tokensForMarketing 0x1f3fed8f → uint256
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 20 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
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeLimits 0x751039fc
No parameters
returns: bool
renounceOwnership 0x715018a6
No parameters
setpartner 0x1a89e947
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
updateBuyFees 0x8095d564
uint256 _devFee
uint256 _liquidityFee
uint256 _marketingFee
updateDevWallet 0x1816467f
address newWallet
updateMarketingWallet 0xaacebbe3
address newMarketingWallet
updateMaxTxnAmount 0x203e727e
uint256 newNum
updateMaxWalletAmount 0xc18bc195
uint256 newNum
updateSellFees 0xc17b5b8c
uint256 _devFee
uint256 _liquidityFee
uint256 _marketingFee
updateSwapEnabled 0x924de9b7
bool enabled
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
returns: bool
Recent Transactions
No transactions found for this address