Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xA2fe5E51729BE71261BcF42854012827BC44c044
Balance 0 ETH
Nonce 1
Code Size 13622 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

13622 bytes
0x60806040526004361061037a5760003560e01c806372ac2486116101d1578063a9059cbb11610102578063dd62ed3e116100a0578063eb62b5341161006f578063eb62b53414610af6578063ee1fae3c14610b0b578063eee1c12b14610b2b578063f2fde38b14610b4b57600080fd5b8063dd62ed3e14610a5a578063e7873b5814610aa0578063ea1644d514610ab6578063ea2f0b3714610ad657600080fd5b8063bc3e0739116100dc578063bc3e0739146109e2578063bffe2a2214610a02578063ce31a06b14610a22578063d1d7d7ef14610a2a57600080fd5b8063a9059cbb14610982578063a9e59da3146109a2578063b030b34a146109c257600080fd5b80638f3fa8601161016f5780639f27b657116101495780639f27b657146108f2578063a19e6ac214610912578063a457c2d714610942578063a8602fea1461096257600080fd5b80638f3fa860146108a757806395d89b41146108bd5780639d0014b1146108d257600080fd5b80637cf14024116101ab5780637cf140241461082957806385320beb146108495780638da5cb5b146108695780638dc644391461088757600080fd5b806372ac2486146107b9578063768dc710146107d957806379cc67901461080957600080fd5b806339509351116102ab57806357376198116102495780635bcbe877116102235780635bcbe8771461072e5780636adf68181461074e57806370a082311461076e578063715018a6146107a457600080fd5b806357376198146106ce578063576d2414146106ee5780635b700d911461070e57600080fd5b8063437823ec11610285578063437823ec14610622578063470624021461064257806349bd5a5e1461067b5780634a74bb02146106af57600080fd5b806339509351146105c25780633f33e909146105e257806342966c681461060257600080fd5b80631d7ef8791161031857806328b13b61116102f257806328b13b61146104f95780632b14ca561461050f578063313ce5671461057657806332a710b91461059257600080fd5b80631d7ef8791461049957806323b872dd146104b9578063269d1faa146104d957600080fd5b806314669b8b1161035457806314669b8b146104015780631694505e1461041657806318160ddd146104625780631d0adc071461047757600080fd5b80630445b6671461038657806306fdde03146103af578063095ea7b3146103d157600080fd5b3661038157005b600080fd5b34801561039257600080fd5b5061039c600c5481565b6040519081526020015b60405180910390f35b3480156103bb57600080fd5b506103c4610b6b565b6040516103a69190612fbb565b3480156103dd57600080fd5b506103f16103ec366004613025565b610bfd565b60405190151581526020016103a6565b34801561040d57600080fd5b50600e5461039c565b34801561042257600080fd5b5061044a7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020016103a6565b34801561046e57600080fd5b5060025461039c565b34801561048357600080fd5b50610497610492366004613051565b610c15565b005b3480156104a557600080fd5b506104976104b4366004613051565b610cf9565b3480156104c557600080fd5b506103f16104d4366004613075565b610de0565b3480156104e557600080fd5b5060075461044a906001600160a01b031681565b34801561050557600080fd5b5061039c600b5481565b34801561051b57600080fd5b506014546105489061ffff80821691620100008104821691600160201b8204811691600160301b90041684565b6040805161ffff958616815293851660208501529184169183019190915290911660608201526080016103a6565b34801561058257600080fd5b50604051601281526020016103a6565b34801561059e57600080fd5b506103f16105ad366004613051565b60116020526000908152604090205460ff1681565b3480156105ce57600080fd5b506103f16105dd366004613025565b610ee2565b3480156105ee57600080fd5b506104976105fd366004613051565b610f21565b34801561060e57600080fd5b5061049761061d3660046130b6565b611016565b34801561062e57600080fd5b5061049761063d366004613051565b61103a565b34801561064e57600080fd5b506013546105489061ffff80821691620100008104821691600160201b8204811691600160301b90041684565b34801561068757600080fd5b5061044a7f000000000000000000000000f464dca6c58bdebe8f01b80de3d50023a862bbc981565b3480156106bb57600080fd5b50600d546103f190610100900460ff1681565b3480156106da57600080fd5b506104976106e9366004613025565b61112d565b3480156106fa57600080fd5b506104976107093660046130b6565b6111cd565b34801561071a57600080fd5b50610497610729366004613051565b6112a3565b34801561073a57600080fd5b506104976107493660046130e6565b61139e565b34801561075a57600080fd5b50610497610769366004613051565b61148c565b34801561077a57600080fd5b5061039c610789366004613051565b6001600160a01b031660009081526020819052604090205490565b3480156107b057600080fd5b50610497611586565b3480156107c557600080fd5b506104976107d4366004613051565b6115bc565b3480156107e557600080fd5b506103f16107f4366004613051565b60106020526000908152604090205460ff1681565b34801561081557600080fd5b50610497610824366004613025565b61168a565b34801561083557600080fd5b50610497610844366004613051565b6116ba565b34801561085557600080fd5b5060085461044a906001600160a01b031681565b34801561087557600080fd5b506005546001600160a01b031661044a565b34801561089357600080fd5b506104976108a23660046130e6565b6117ba565b3480156108b357600080fd5b5061039c600a5481565b3480156108c957600080fd5b506103c46118a8565b3480156108de57600080fd5b506104976108ed3660046130b6565b6118b7565b3480156108fe57600080fd5b5061049761090d3660046130b6565b611916565b34801561091e57600080fd5b506103f161092d366004613051565b600f6020526000908152604090205460ff1681565b34801561094e57600080fd5b506103f161095d366004613025565b61194c565b34801561096e57600080fd5b5061049761097d366004613051565b6119e9565b34801561098e57600080fd5b506103f161099d366004613025565b611ab7565b3480156109ae57600080fd5b506104976109bd3660046130b6565b611ba8565b3480156109ce57600080fd5b506104976109dd366004613051565b611c07565b3480156109ee57600080fd5b5060095461044a906001600160a01b031681565b348015610a0e57600080fd5b50610497610a1d36600461313a565b611cea565b610497611d36565b348015610a3657600080fd5b506103f1610a45366004613051565b60126020526000908152604090205460ff1681565b348015610a6657600080fd5b5061039c610a753660046131d1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b348015610aac57600080fd5b5061039c60065481565b348015610ac257600080fd5b50610497610ad13660046130b6565b611d8c565b348015610ae257600080fd5b50610497610af1366004613051565b611deb565b348015610b0257600080fd5b50610497611ed9565b348015610b1757600080fd5b50610497610b2636600461320a565b611f65565b348015610b3757600080fd5b50610497610b463660046130b6565b6120c3565b348015610b5757600080fd5b50610497610b66366004613051565b6120f8565b606060038054610b7a90613253565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba690613253565b8015610bf35780601f10610bc857610100808354040283529160200191610bf3565b820191906000526020600020905b815481529060010190602001808311610bd657829003601f168201915b5050505050905090565b600033610c0b818585612190565b5060019392505050565b6005546001600160a01b03163314610c485760405162461bcd60e51b8152600401610c3f9061328d565b60405180910390fd5b6001600160a01b038116610c9e5760405162461bcd60e51b815260206004820152601c60248201527f4275796261636b2077616c6c65742063616e6e6f7420626520307830000000006044820152606401610c3f565b600980546001600160a01b0319166001600160a01b0383811691909117909155600754604051911681527f18394055aecb36f3c545d0980ebf59504a93b9cbd03d149c1ff28d5573e25ec5906020015b60405180910390a150565b6005546001600160a01b03163314610d235760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b0381166000908152600f602052604090205460ff1615610d8c5760405162461bcd60e51b815260206004820152601e60248201527f4163636f756e7420697320616c726561647920626c61636b6c697374656400006044820152606401610c3f565b6001600160a01b0381166000818152600f6020908152604091829020805460ff1916600117905590519182527f6cf65f3ff491cb358bea0efd5ee0fe0340757225d38a096d09c637ba897a679f9101610cee565b6000338180610def87876122b4565b91509150610dff8787878561239a565b610e0a8784876125a4565b8115610eca5730600090815260208190526040902054600c548110801590610e355750600d5460ff16155b8015610e485750600d54610100900460ff165b8015610e8657507f000000000000000000000000f464dca6c58bdebe8f01b80de3d50023a862bbc96001600160a01b0316886001600160a01b031614155b15610e9657610e96600c54612630565b6000610ea287846128d3565b9050610eaf8930836129bf565b610ec38989610ebe848b6132d8565b6129bf565b5050610ed5565b610ed58787876129bf565b5060019695505050505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190610c0b9082908690610f1c9087906132ef565b612190565b6005546001600160a01b03163314610f4b5760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b03811660009081526012602052604090205460ff16610fc55760405162461bcd60e51b815260206004820152602960248201527f4163636f756e7420697320616c726561647920696e636c7564656420696e206d604482015268185e081dd85b1b195d60ba1b6064820152608401610c3f565b6001600160a01b038116600081815260126020908152604091829020805460ff1916905590519182527f0146ecf0f3e959e006d0380e7d8a829b041286e7cdb8fe2c017a9374ac9ba9bc9101610cee565b6110203382612b8d565b806006600082825461103291906132ef565b909155505050565b6005546001600160a01b031633146110645760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b03811660009081526010602052604090205460ff16156110d95760405162461bcd60e51b8152602060048201526024808201527f4163636f756e7420697320616c7265616479206578636c756465642066726f6d6044820152632066656560e01b6064820152608401610c3f565b6001600160a01b038116600081815260106020908152604091829020805460ff1916600117905590519182527f85ecafd7b8cfcceb72ea6978547a39f89631bf423eea19a63ce8d3881ec51e039101610cee565b6005546001600160a01b031633146111575760405162461bcd60e51b8152600401610c3f9061328d565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156111a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c89190613307565b505050565b6005546001600160a01b031633146111f75760405162461bcd60e51b8152600401610c3f9061328d565b600e54421161126e5760405162461bcd60e51b815260206004820152603b60248201527f4e6577206c6971756964697479206c6f636b2074696d65206d7573742062652060448201527f6166746572207468652063757272656e74206c6f636b2074696d6500000000006064820152608401610c3f565b600e8190556040518181527f71e05a7562da8b8e418a7169f15237ae67eb8811d1f3ffb1235f35837fd7926a90602001610cee565b6005546001600160a01b031633146112cd5760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b03811660009081526012602052604090205460ff161561134a5760405162461bcd60e51b815260206004820152602b60248201527f4163636f756e7420697320616c7265616479206578636c756465642066726f6d60448201526a081b585e081dd85b1b195d60aa1b6064820152608401610c3f565b6001600160a01b038116600081815260126020908152604091829020805460ff1916600117905590519182527f7d99f9a4158245b2d0ffb50768db33ed6d5e4146f7e27db2b1c87133148b907a9101610cee565b6005546001600160a01b031633146113c85760405162461bcd60e51b8152600401610c3f9061328d565b6103e881836113d78688613329565b6113e19190613329565b6113eb9190613329565b61ffff16106114345760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964206665652073747275637475726560581b6044820152606401610c3f565b6014805461ffff928316600160301b0267ffff00000000000019948416600160201b0265ffff0000ffff1996851662010000029690961665ffffffffffff199092169190911795909216949094179290921716179055565b6005546001600160a01b031633146114b65760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b03811660009081526011602052604090205460ff166115355760405162461bcd60e51b815260206004820152602e60248201527f4163636f756e7420697320616c726561647920696e636c7564656420696e206d60448201526d30bc103a3930b739b0b1ba34b7b760911b6064820152608401610c3f565b6001600160a01b038116600081815260116020908152604091829020805460ff1916905590519182527f628f9fc26f194733f0575c94bd0ac205c2c61093f83b9ed913762ca6a5142efd9101610cee565b6005546001600160a01b031633146115b05760405162461bcd60e51b8152600401610c3f9061328d565b6115ba6000612cdb565b565b6005546001600160a01b031633146115e65760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b03811661163c5760405162461bcd60e51b815260206004820181905260248201527f446576656c6f706d656e742077616c6c65742063616e6e6f74206265203078306044820152606401610c3f565b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f3de80392900a85a257c33c60def3bf626743ce3bd0221318559b8bfae76b1fb890602001610cee565b6116958233836125a4565b61169f8282612b8d565b80600660008282546116b191906132ef565b90915550505050565b6005546001600160a01b031633146116e45760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b03811660009081526011602052604090205460ff16156117665760405162461bcd60e51b815260206004820152603060248201527f4163636f756e7420697320616c7265616479206578636c756465642066726f6d60448201526f1036b0bc103a3930b739b0b1ba34b7b760811b6064820152608401610c3f565b6001600160a01b038116600081815260116020908152604091829020805460ff1916600117905590519182527f926ada6c4eef2af9b9880421dcf6e88d1a21f645e07a0b0c219347090ff95bb59101610cee565b6005546001600160a01b031633146117e45760405162461bcd60e51b8152600401610c3f9061328d565b6103e881836117f38688613329565b6117fd9190613329565b6118079190613329565b61ffff16106118505760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964206665652073747275637475726560581b6044820152606401610c3f565b6013805461ffff928316600160301b0267ffff00000000000019948416600160201b0265ffff0000ffff1996851662010000029690961665ffffffffffff199092169190911795909216949094179290921716179055565b606060048054610b7a90613253565b6005546001600160a01b031633146118e15760405162461bcd60e51b8152600401610c3f9061328d565b600c8190556040518181527f674515d9dd103f6dd90c092a960b3a3905ecfc07da656d2ede6512afbffa091990602001610cee565b6005546001600160a01b031633146119405760405162461bcd60e51b8152600401610c3f9061328d565b61194981612630565b50565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156119d15760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610c3f565b6119de8286868403612190565b506001949350505050565b6005546001600160a01b03163314611a135760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b038116611a695760405162461bcd60e51b815260206004820152601d60248201527f54726561737572792077616c6c65742063616e6e6f74206265203078300000006044820152606401610c3f565b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527fa11ce8775af13e1c057faa2b212c232da798ac6a9746a38765b4099dcff9251490602001610cee565b6000338180611ac683876122b4565b91509150611ad68387878561239a565b8115611b915730600090815260208190526040902054600c548110801590611b015750600d5460ff16155b8015611b145750600d54610100900460ff165b8015611b5257507f000000000000000000000000f464dca6c58bdebe8f01b80de3d50023a862bbc96001600160a01b0316846001600160a01b031614155b15611b6257611b62600c54612630565b6000611b6e87846128d3565b9050611b7b8530836129bf565b611b8a8589610ebe848b6132d8565b5050611b9c565b611b9c8387876129bf565b50600195945050505050565b6005546001600160a01b03163314611bd25760405162461bcd60e51b8152600401610c3f9061328d565b600b8190556040518181527fabeac71da1b5e23c49ce9f7f04cf66b34293f56665d9a80a2e66a1851c2bbe1c90602001610cee565b6005546001600160a01b03163314611c315760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b0381166000908152600f602052604090205460ff16611c995760405162461bcd60e51b815260206004820152601a60248201527f4163636f756e74206973206e6f7420626c61636b6c69737465640000000000006044820152606401610c3f565b6001600160a01b0381166000818152600f6020908152604091829020805460ff1916905590519182527fbbde34c13f8f74d401949e0eb9a888308ee89bb0887791bba7e8dd0bced470419101610cee565b6005546001600160a01b03163314611d145760405162461bcd60e51b8152600401610c3f9061328d565b611d20888888886117ba565b611d2c8484848461139e565b5050505050505050565b6005546001600160a01b03163314611d605760405162461bcd60e51b8152600401610c3f9061328d565b60405133904780156108fc02916000818181858888f19350505050158015611949573d6000803e3d6000fd5b6005546001600160a01b03163314611db65760405162461bcd60e51b8152600401610c3f9061328d565b600a8190556040518181527ffb1fe1002b7550e87616e67793dbb7d3f437a79c2688c372c66dc170dbcb0efd90602001610cee565b6005546001600160a01b03163314611e155760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b03811660009081526010602052604090205460ff16611e885760405162461bcd60e51b815260206004820152602260248201527f4163636f756e7420697320616c726561647920696e636c7564656420696e2066604482015261656560f01b6064820152608401610c3f565b6001600160a01b038116600081815260106020908152604091829020805460ff1916905590519182527f711fdef8f2d84ec32e12306df0559e86006affdb2b1be5484928b6810406048f9101610cee565b6005546001600160a01b03163314611f035760405162461bcd60e51b8152600401610c3f9061328d565b600d805460ff610100808304821615810261ff001990931692909217928390556040517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc15993611f5b9390049091161515815260200190565b60405180910390a1565b6005546001600160a01b03163314611f8f5760405162461bcd60e51b8152600401610c3f9061328d565b600e544211611fe05760405162461bcd60e51b815260206004820152601b60248201527f4c69717569646974792072656d6f76616c206973206c6f636b656400000000006044820152606401610c3f565b6000807f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03166302751cec3089898989896040518763ffffffff1660e01b81526004016120399695949392919061334f565b60408051808303816000875af1158015612057573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207b919061338a565b60408051838152602081018390529294509092507f06e61ce293536045b3c3e50f6afa3f3275782981dc5d17bb8a2c03a92c4bfd8f910160405180910390a150505050505050565b6005546001600160a01b031633146120ed5760405162461bcd60e51b8152600401610c3f9061328d565b6119493033836129bf565b6005546001600160a01b031633146121225760405162461bcd60e51b8152600401610c3f9061328d565b6001600160a01b0381166121875760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c3f565b61194981612cdb565b6001600160a01b0383166121f25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610c3f565b6001600160a01b0382166122535760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610c3f565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000807f000000000000000000000000f464dca6c58bdebe8f01b80de3d50023a862bbc96001600160a01b0316846001600160a01b031614801561231157506001600160a01b03831660009081526010602052604090205460ff16155b1561232157506001905080612393565b7f000000000000000000000000f464dca6c58bdebe8f01b80de3d50023a862bbc96001600160a01b0316836001600160a01b031614801561237b57506001600160a01b03841660009081526010602052604090205460ff16155b1561238c5750600190506002612393565b5060009050805b9250929050565b6001600160a01b0384166000908152600f602052604090205460ff1615806123db57506001600160a01b0383166000908152600f602052604090205460ff16155b61241d5760405162461bcd60e51b8152602060048201526013602482015272165bdd48185c9948189b1858dadb1a5cdd1959606a1b6044820152606401610c3f565b7f000000000000000000000000f464dca6c58bdebe8f01b80de3d50023a862bbc96001600160a01b0316836001600160a01b03161461250157600a5482612479856001600160a01b031660009081526020819052604090205490565b61248391906132ef565b10806124a757506001600160a01b03831660009081526012602052604090205460ff165b6125015760405162461bcd60e51b815260206004820152602560248201527f4578636565647320726563656976657273206d6178696d756d2077616c6c65746044820152642073697a6560d81b6064820152608401610c3f565b801561259e57600b548211158061255257506001600160a01b03841660009081526011602052604090205460ff168061255257506001600160a01b03831660009081526011602052604090205460ff165b61259e5760405162461bcd60e51b815260206004820152601f60248201527f5472616e73616374696f6e206c6172676572207468616e20616c6c6f776564006044820152606401610c3f565b50505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461259e57818110156126235760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610c3f565b61259e8484848403612190565b600d805460ff1916600117905560135460009061ffff600160301b8204811691600160201b810482169161266f91818116916201000090910416613329565b6126799190613329565b6126839190613329565b60135461ffff9182169250600091839161269e9116856133ae565b6126a891906133e3565b90506126c76126b86002836133e3565b6126c290856132d8565b612d2d565b601354479060009061ffff600160301b8204811691600160201b81048216916126f391600291166133f7565b60135461270a919062010000900461ffff16613329565b6127149190613329565b61271e9190613329565b60135461ffff91821692506000918391612740916201000090910416856133ae565b61274a91906133e3565b60135490915060009083906127659060029061ffff166133f7565b6127739061ffff16866133ae565b61277d91906133e3565b601354909150600090849061279d90600160301b900461ffff16876133ae565b6127a791906133e3565b905081156127c3576127c36127bd6002886133e3565b83612eed565b6007546040516001600160a01b039091169084156108fc029085906000818181858888f193505050501580156127fd573d6000803e3d6000fd5b506009546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015612838573d6000803e3d6000fd5b506008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015612872573d6000803e3d6000fd5b507f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb56188866128a160028a6133e3565b6040805193845260208401929092529082015260600160405180910390a15050600d805460ff19169055505050505050565b60008060018360028111156128ea576128ea613418565b0361293d5760135461ffff600160301b8204811691600160201b810482169161291e91818116916201000090910416613329565b6129289190613329565b6129329190613329565b61ffff1690506129a0565b600283600281111561295157612951613418565b036129a05760145461ffff600160301b8204811691600160201b810482169161298591818116916201000090910416613329565b61298f9190613329565b6129999190613329565b61ffff1690505b6103e86129ad82866133ae565b6129b791906133e3565b949350505050565b6001600160a01b038316612a235760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610c3f565b6001600160a01b038216612a855760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610c3f565b6001600160a01b03831660009081526020819052604090205481811015612afd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610c3f565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290612b349084906132ef565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612b8091815260200190565b60405180910390a361259e565b6001600160a01b038216612bed5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610c3f565b6001600160a01b03821660009081526020819052604090205481811015612c615760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610c3f565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612c909084906132d8565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110612d6257612d6261342e565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612de0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e049190613444565b81600181518110612e1757612e1761342e565b60200260200101906001600160a01b031690816001600160a01b031681525050612e62307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84612190565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac94790612eb7908590600090869030904290600401613461565b600060405180830381600087803b158015612ed157600080fd5b505af1158015612ee5573d6000803e3d6000fd5b505050505050565b612f18307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84612190565b60405163f305d71960e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063f305d719908390612f71903090879060009081908490429060040161334f565b60606040518083038185885af1158015612f8f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612fb491906134d2565b5050505050565b600060208083528351808285015260005b81811015612fe857858101830151858201604001528201612fcc565b81811115612ffa576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461194957600080fd5b6000806040838503121561303857600080fd5b823561304381613010565b946020939093013593505050565b60006020828403121561306357600080fd5b813561306e81613010565b9392505050565b60008060006060848603121561308a57600080fd5b833561309581613010565b925060208401356130a581613010565b929592945050506040919091013590565b6000602082840312156130c857600080fd5b5035919050565b803561ffff811681146130e157600080fd5b919050565b600080600080608085870312156130fc57600080fd5b613105856130cf565b9350613113602086016130cf565b9250613121604086016130cf565b915061312f606086016130cf565b905092959194509250565b600080600080600080600080610100898b03121561315757600080fd5b613160896130cf565b975061316e60208a016130cf565b965061317c60408a016130cf565b955061318a60608a016130cf565b945061319860808a016130cf565b93506131a660a08a016130cf565b92506131b460c08a016130cf565b91506131c260e08a016130cf565b90509295985092959890939650565b600080604083850312156131e457600080fd5b82356131ef81613010565b915060208301356131ff81613010565b809150509250929050565b600080600080600060a0868803121561322257600080fd5b853594506020860135935060408601359250606086013561324281613010565b949793965091946080013592915050565b600181811c9082168061326757607f821691505b60208210810361328757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156132ea576132ea6132c2565b500390565b60008219821115613302576133026132c2565b500190565b60006020828403121561331957600080fd5b8151801515811461306e57600080fd5b600061ffff808316818516808303821115613346576133466132c2565b01949350505050565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b6000806040838503121561339d57600080fd5b505080516020909101519092909150565b60008160001904831182151516156133c8576133c86132c2565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826133f2576133f26133cd565b500490565b600061ffff8084168061340c5761340c6133cd565b92169190910492915050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006020828403121561345657600080fd5b815161306e81613010565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156134b15784516001600160a01b03168352938301939183019160010161348c565b50506001600160a01b03969096166060850152505050608001529392505050565b6000806000606084860312156134e757600080fd5b835192506020840151915060408401519050925092509256fea26469706673582212200c0664ba523ea92ee8daafebee0216a4d1b696b0e9fd237fee49b0e8db305e4364736f6c634300080d0033

Verified Source Code Full Match

Compiler: v0.8.13+commit.abaa5c0e EVM: london Optimization: Yes (200 runs)
BurnTokenX.sol 679 lines
// SPDX-License-Identifier: Unlicensed

/**

Telegram Portal: https://t.me/ShibaDoge_Portal
Website: https://deflationary.com / https://burn.realshibadoge.com / https://realshibadoge.com
Twitter: https://twitter.com/RealShibaDoge
Medium: https://realshibadoge.medium.com
Discord: https://discord.gg/realshibadoge

                        MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMMMMMMMMMMMMWWNXK0OOkkOOOOO00KXNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMMMMMMMWN0kdlc:,,,'',;;;;;;;;;:cloxk0XWMMMMMMMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMMMWX0dl;,',,;::cclllodooooooollc::;;:lxOXWMMMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMWXko;'',:clloooooooooodddddddddddddolc:;;:okKWMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMN0o;'';cloooooooooooooocclodddddddddddddddoc;;:oONWMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMNOc,';cloooooooooooooooool;;:coddddddddddddddddoc;;ckXWMMMMMMMMMMMMM
                        MMMMMMMMMMNOc'';cooooooooooooooooolloo:,,,:oddddddddddddddddddc;,ckXWMMMMMMMMMMM
                        MMMMMMMMWKo'';looooooooooooooooool:;lo:;,,,:ldddddddddddddddddddc;,l0WMMMMMMMMMM
                        MMMMMMMNk;.,coooooooooooooooooool:,,cl:,,,,,:odddooddddddddddddddo:,;xXMMMMMMMMM
                        MMMMMMNd,.;loooooooooooooooooool:,,;cc;,,,,,;cdddl:coddddddddddddddl,,oKWMMMMMMM
                        MMMMMXo'':looooooooooooooooooool:,;:l:,,,,,,,codol;,:lddddddddddddddl;'lKWMMMMMM
                        MMMMNd'':oooooooooooooooooooolclc:cl:,,,,,,,;:c:cl:,,,codddddddddddddl;'lKMMMMMM
                        MMMWx,.:oooooooooooooooooool:,;looc;,,,,,,,,,;,,;ll;,,,cdddddddddddoddl,'oXMMMMM
                        MMM0:.;looooooooooooooooooc;',:ll:,,,,,,,,,,,,,,,;cl:;,codddddddddooodoc',kWMMMM
                        MMNd.'cooooooooooooooooool;',,;;,,,,,,,,,,,,,,,,,,;cllclodddddddoooooooo;.cKMMMM
                        MMK:.;ooooooooooooooooool:,,,,,,,,,,,,,,,,,,,,,,,,,,:lddoddddddoooooooooc.,kWMMM
                        MWk,.:oooooooooooooooolll:,,,,,,,,,,,,,,,,,,,,,,,,,,,;colcoddddoooooooool,.oNMMM
                        MWd''coooooooooooooooc;:l:;,,;;;;;;;;;;:::::::::::;;,,,::,:odoooooooooool,.cXMMM
                        MNd.'cooooooooooooooc;',;:;,;cloooooooooooooddddoool:;,,,,,:ooooooooooooo;.cKMMM
                        MNd.'coooooooooooool;,,,,,,,:oddddddddddddddddddddddo:,,,,,;coooooooooooo;.cKMMM
                        MWx''cooooooooooool:,,,,,,,;coddddddddddddddddddddddoc;,,,,,:oooooooooool,.lXMMM
                        MWO;.:ooooooooooool;,,,,,,,;cddddddddo:;;;;codddddddo:;,,,,,:looooooooooc''dWMMM
                        MMXl.,loooooooooooc;,,,,,,,;lddddddddl;,,,,:oddddddoc;,,,,,,;loooooooooo:.;0WMMM
                        MMWk,':oooooooooooc;,,,,,,,:oddddddddlcccclodddddol:,,,,,,,,;loooooooool'.oNMMMM
                        MMMXl.,cooooooddddc;,,,,,,;coddddddddddddddddddol:,,,,,,,,,,:looooooooo;.:0WMMMM
                        MMMW0:.,loodddddddl;,,,,,,;ldddddddddddddddddddoolc:;,,,,,,;cloooooooo:.,kWMMMMM
                        MMMMWO:':oddddddddoc;,,,,,:ldddddddddoooooodddddoool:;,,,,,:loooooooo:.'xNMMMMMM
                        MMMMMW0c,:oddddddddl:;,,,,:odddddddoc;,,,,;lddooooooc;,,,,;coooooool;.,xNMMMMMMM
                        MMMMMMWKo,;lddddddddoc;,,;codddddddo:,,,,,;looooooool;,,,:coooooool,.;kNMMMMMMMM
                        MMMMMMMMXx:,:odddddddol:;;lddddddddoc::cccloooooooolc;,;:looooool:''l0WMMMMMMMMM
                        MMMMMMMMMW0o;;codddddddolcoddddddddddddddddooooooooc;;:cloooool:'.;kNMMMMMMMMMMM
                        MMMMMMMMMMMNOl;;codddddddddddddddddddddddoooooooolc::lloooool:'.;dXWMMMMMMMMMMMM
                        MMMMMMMMMMMMMN0o;,:coddddddddddddddddddoooooooooolloooooolc;'':xXWMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMWKxc;;:clodddddddddddddooooooooooooooolc:;'';oONMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMWN0xl:,;:ccloodddddddoooooooooolcc:;'',:dOXWMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMMMMMWXOxl:;,,;;;:::::::::::;;,,'',:ldkKNMMMMMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMMMMMMMMMWNK0kxolcc::;;;;::ccloxk0KNWMMMMMMMMMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWNNNNNNNNNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
                        MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

    88888888ba   88        88  88888888ba   888b      88     888888888888  ,ad8888ba,    88      a8P   88888888888  888b      88
    88      "8b  88        88  88      "8b  8888b     88          88      d8"'    `"8b   88    ,88'    88           8888b     88
    88      ,8P  88        88  88      ,8P  88 `8b    88          88     d8'        `8b  88  ,88"      88           88 `8b    88
    88aaaaaa8P'  88        88  88aaaaaa8P'  88  `8b   88          88     88          88  88,d88'       88aaaaa      88  `8b   88
    88""""""8b,  88        88  88""""88'    88   `8b  88          88     88          88  8888"88,      88"""""      88   `8b  88
    88      `8b  88        88  88    `8b    88    `8b 88          88     Y8,        ,8P  88P   Y8b     88           88    `8b 88
    88      a8P  Y8a.    .a8P  88     `8b   88     `8888          88      Y8a.    .a8P   88     "88,   88           88     `8888
    88888888P"    `"Y8888Y"'   88      `8b  88      `888          88       `"Y8888Y"'    88       Y8b  88888888888  88      `888

 */

pragma solidity 0.8.13;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";

import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";

import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

contract BurnTokenX is ERC20Burnable, Ownable {
    uint256 constant _initial_supply = 1 * (10**12) * (10**18); // 1 trillion tokens, 18 decimals

    uint256 public tokensBurned;

    address payable public _treasuryWallet;
    address payable public _developmentWallet;
    address payable public _buybackWallet;

    uint256 public maxWalletSize = (_initial_supply * 15) / 10000; // .15% of totalsupply
    uint256 public maxTransactionSize = (_initial_supply * 15) / 100000; // .015% of totalsupply
    uint256 public swapThreshold = (_initial_supply * 135) / 1000000; // .0135% of totalsupply

    IUniswapV2Router02 public immutable uniswapV2Router;
    address public immutable uniswapV2Pair;

    bool inSwapAndLiquify;
    bool public swapAndLiquifyEnabled = true;

    uint256 liquidityLockTime = 0;

    mapping(address => bool) public _isBlackListedBot;

    mapping(address => bool) public _isExcludedFromFee;
    mapping(address => bool) public _isExcludedFromMaxTransaction;
    mapping(address => bool) public _isExcludedFromMaxWallet;

    enum FeeType {
        None,
        Buy,
        Sell
    }

    struct BuyFee {
        uint16 liquidity;
        uint16 treasury;
        uint16 dev;
        uint16 buyback;
    }

    struct SellFee {
        uint16 liquidity;
        uint16 treasury;
        uint16 dev;
        uint16 buyback;
    }

    BuyFee public buyFee;
    SellFee public sellFee;

    uint256 constant FEE_DENOM = 1000; // smallest fee unit is 0.1%

    event botAddedToBlacklist(address account);
    event botRemovedFromBlacklist(address account);

    event excludedFromFee(address account);
    event excludedFromMaxTransaction(address account);
    event excludedFromMaxWallet(address account);

    event includedInFee(address account);
    event includedInMaxTransaction(address account);
    event includedInMaxWallet(address account);

    event treasuryWalletUpdated(address treasuryWallet);
    event developmentWalletUpdated(address developmentWallet);
    event buybackWalletUpdated(address buybackWallet);

    event liquidityRemoved(uint256 amountToken, uint256 amountETH);

    event swapThresholdUpdated(uint256 minTokensBeforeSwap);
    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiquidity
    );

    event MaxWalletSizeUpdated(uint256 maxWalletSize);
    event MaxTransactionSizeUpdated(uint256 maxTransactionSize);

    event LiquidityLockTimeUpdated(uint256 lockTime);

    modifier lockTheSwap() {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }

    constructor(
        string memory name__,
        string memory symbol__,
        address treasury,
        address development,
        address buyback,
        address[8] memory teamWallets
    ) ERC20(name__, symbol__) {
        // set fees to max
        setSellFee(470, 0, 480, 0);
        setBuyFee(470, 0, 480, 0);

        require(treasury != address(0), "Treasury wallet cannot be 0x0");
        require(development != address(0), "Development wallet cannot be 0x0");
        require(buyback != address(0), "Buyback wallet cannot be 0x0");

        _treasuryWallet = payable(treasury);
        _developmentWallet = payable(development);
        _buybackWallet = payable(buyback);

        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
        );

        // Create a uniswap pair for this new token
        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());

        // set the rest of the contract variables
        uniswapV2Router = _uniswapV2Router;

        _mint(msg.sender, (_initial_supply * 14) / 100); // 14% for deployer
        _mint(msg.sender, (_initial_supply * 5) / 100); // for liquidity pool

        _mint(teamWallets[0], (_initial_supply * 15) / 10000); // .15% for team 1
        _mint(teamWallets[1], (_initial_supply * 15) / 10000); // .15% for team 2
        _mint(teamWallets[2], (_initial_supply * 15) / 10000); // .15% for team 3
        _mint(teamWallets[3], (_initial_supply * 15) / 10000); // .15% for team 4
        _mint(teamWallets[4], (_initial_supply * 10) / 10000); // .1% for team 5
        _mint(teamWallets[5], (_initial_supply * 10) / 10000); // .1% for team 6
        _mint(teamWallets[6], (_initial_supply * 10) / 10000); // .1% for team 7
        _mint(teamWallets[7], (_initial_supply * 10) / 10000); // .1% for team 8

        _mint(
            0x000000000000000000000000000000000000dEaD,
            (_initial_supply * 80) / 100
        ); // burn baby burnnnnn it's a crypto inferno

        _isExcludedFromFee[msg.sender] = true;
        _isExcludedFromMaxTransaction[msg.sender] = true;
        _isExcludedFromMaxWallet[msg.sender] = true;

        _isExcludedFromFee[address(this)] = true;
        _isExcludedFromMaxTransaction[address(this)] = true;
        _isExcludedFromMaxWallet[address(this)] = true;

        _isExcludedFromFee[_treasuryWallet] = true;
        _isExcludedFromMaxTransaction[_treasuryWallet] = true;
        _isExcludedFromMaxWallet[_treasuryWallet] = true;

        _isExcludedFromFee[_developmentWallet] = true;
        _isExcludedFromMaxTransaction[_developmentWallet] = true;
        _isExcludedFromMaxWallet[_developmentWallet] = true;

        _isExcludedFromFee[_buybackWallet] = true;
        _isExcludedFromMaxTransaction[_buybackWallet] = true;
        _isExcludedFromMaxWallet[_buybackWallet] = true;
    }

    //to receive ETH from uniswapV2Router when swapping
    receive() external payable {}

    // public functions

    function transfer(address to, uint256 amount)
        public
        override
        returns (bool)
    {
        address _owner = _msgSender();
        (bool takeFee, FeeType feeType) = checkFeeRequired(_owner, to);

        checkTransferAllowed(_owner, to, amount, takeFee);

        if (takeFee) {
            //check for swapAndLiquify available
            uint256 contractBalance = balanceOf(address(this));
            if (
                contractBalance >= swapThreshold &&
                !inSwapAndLiquify &&
                swapAndLiquifyEnabled &&
                _owner != uniswapV2Pair
            ) {
                //perform swapAndLiquify
                swapAndLiquify(swapThreshold);
            }

            uint256 fee = calculateFee(amount, feeType);
            _transfer(_owner, address(this), fee);
            _transfer(_owner, to, amount - fee);
        } else {
            _transfer(_owner, to, amount);
        }

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public override returns (bool) {
        address spender = _msgSender();

        (bool takeFee, FeeType feeType) = checkFeeRequired(from, to);
        checkTransferAllowed(from, to, amount, takeFee);

        _spendAllowance(from, spender, amount);

        if (takeFee) {
            //check for swapAndLiquify available
            uint256 contractBalance = balanceOf(address(this));
            if (
                contractBalance >= swapThreshold &&
                !inSwapAndLiquify &&
                swapAndLiquifyEnabled &&
                from != uniswapV2Pair
            ) {
                //perform swapAndLiquify
                swapAndLiquify(swapThreshold);
            }

            uint256 fee = calculateFee(amount, feeType);
            _transfer(from, address(this), fee);
            _transfer(from, to, amount - fee);
        } else {
            _transfer(from, to, amount);
        }

        return true;
    }

    function burn(uint256 amount) public override {
        _burn(_msgSender(), amount);
        tokensBurned += amount;
    }

    function burnFrom(address account, uint256 amount) public override {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
        tokensBurned += amount;
    }

    function liquidityLockedUntil() external view returns (uint256) {
        return liquidityLockTime;
    }

    // internal functions

    function checkTransferAllowed(
        address from,
        address to,
        uint256 amount,
        bool takeFee
    ) internal view {
        require(
            !_isBlackListedBot[from] || !_isBlackListedBot[to],
            "You are blacklisted"
        );
        if (to != uniswapV2Pair) {
            require(
                balanceOf(to) + amount < maxWalletSize ||
                    _isExcludedFromMaxWallet[to],
                "Exceeds receivers maximum wallet size"
            );
        }
        if (takeFee) {
            require(
                amount <= maxTransactionSize ||
                    (_isExcludedFromMaxTransaction[from] ||
                        _isExcludedFromMaxTransaction[to]),
                "Transaction larger than allowed"
            );
        }
    }

    function checkFeeRequired(address from, address to)
        internal
        view
        returns (bool, FeeType)
    {
        if (from == uniswapV2Pair && !_isExcludedFromFee[to]) {
            return (true, FeeType.Buy);
        } else if (to == uniswapV2Pair && !_isExcludedFromFee[from]) {
            return (true, FeeType.Sell);
        } else {
            return (false, FeeType.None);
        }
    }

    function calculateFee(uint256 amount, FeeType feeType)
        internal
        view
        returns (uint256 fee)
    {
        uint256 feePercentage = 0;
        if (feeType == FeeType.Buy) {
            feePercentage =
                buyFee.treasury +
                buyFee.liquidity +
                buyFee.dev +
                buyFee.buyback;
        } else if (feeType == FeeType.Sell) {
            feePercentage =
                sellFee.treasury +
                sellFee.liquidity +
                sellFee.dev +
                sellFee.buyback;
        }
        fee = (amount * feePercentage) / FEE_DENOM;

        return fee;
    }

    function swapAndLiquify(uint256 tokens) internal lockTheSwap {
        // split tokens by buy fee ratio
        uint256 feeDenominator = buyFee.treasury +
            buyFee.liquidity +
            buyFee.dev +
            buyFee.buyback;

        uint256 liquidityFee = (tokens * buyFee.liquidity) / feeDenominator;

        // sell tokens minus half of liquidity cut for eth
        swapTokensForEth(tokens - (liquidityFee / 2));

        // split resulting eth balance of contract by ratio, giving liquidity half weight
        uint256 contractEth = address(this).balance;

        uint256 ethDenominator = buyFee.treasury +
            (buyFee.liquidity / 2) +
            buyFee.dev +
            buyFee.buyback;

        uint256 treasuryEth = (contractEth * buyFee.treasury) / ethDenominator;
        uint256 liquidityEth = (contractEth * (buyFee.liquidity / 2)) /
            ethDenominator;
        uint256 buybackEth = (contractEth * buyFee.buyback) / ethDenominator;

        // provide liquidity with eth portion and remaining tokens

        if (liquidityEth > 0) {
            // Add liquidity to uniswap
            addLiquidity(liquidityFee / 2, liquidityEth);
        }

        _treasuryWallet.transfer(treasuryEth);

        _buybackWallet.transfer(buybackEth);

        // send all remaining eth to dev wallet (in case of rounding)
        _developmentWallet.transfer(address(this).balance); 

        emit SwapAndLiquify(tokens, contractEth, liquidityFee / 2);
    }

    function swapTokensForEth(uint256 tokenAmount) internal {
        // 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) internal {
        // 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
        );
    }

    // admin functions

    function setTreasuryWallet(address treasury) external onlyOwner {
        require(treasury != address(0), "Treasury wallet cannot be 0x0");
        _treasuryWallet = payable(treasury);
        emit treasuryWalletUpdated(_treasuryWallet);
    }

    function setDevelopmentWallet(address development) external onlyOwner {
        require(development != address(0), "Development wallet cannot be 0x0");
        _developmentWallet = payable(development);
        emit developmentWalletUpdated(_developmentWallet);
    }

    function setBuybackWallet(address buyback) external onlyOwner {
        require(buyback != address(0), "Buyback wallet cannot be 0x0");
        _buybackWallet = payable(buyback);
        emit buybackWalletUpdated(_treasuryWallet);
    }

    function setSellFee(
        uint16 liquidity,
        uint16 treasury,
        uint16 dev,
        uint16 buyback
    ) public onlyOwner {
        require(
            liquidity + treasury + dev + buyback < FEE_DENOM,
            "invalid fee structure"
        );

        sellFee.treasury = treasury;
        sellFee.liquidity = liquidity;
        sellFee.dev = dev;
        sellFee.buyback = buyback;
    }

    function setBuyFee(
        uint16 liquidity,
        uint16 treasury,
        uint16 dev,
        uint16 buyback
    ) public onlyOwner {
        require(
            liquidity + treasury + dev + buyback < FEE_DENOM,
            "invalid fee structure"
        );

        buyFee.treasury = treasury;
        buyFee.liquidity = liquidity;
        buyFee.dev = dev;
        buyFee.buyback = buyback;
    }

    function setBothFees(
        uint16 buy_liquidity,
        uint16 buy_treasury,
        uint16 buy_dev,
        uint16 buy_buyback,
        uint16 sell_liquidity,
        uint16 sell_treasury,
        uint16 sell_dev,
        uint16 sell_buyback
    ) external onlyOwner {
        setBuyFee(buy_liquidity, buy_treasury, buy_dev, buy_buyback);

        setSellFee(sell_liquidity, sell_treasury, sell_dev, sell_buyback);
    }

    function setSwapThreshold(uint256 newSwapThreshold) external onlyOwner {
        swapThreshold = newSwapThreshold;
        emit swapThresholdUpdated(newSwapThreshold);
    }

    function setMaxTransactionSize(uint256 maxTxSize) external onlyOwner {
        maxTransactionSize = maxTxSize;
        emit MaxTransactionSizeUpdated(maxTransactionSize);
    }

    function setMaxWalletSize(uint256 maxWallet) external onlyOwner {
        maxWalletSize = maxWallet;
        emit MaxWalletSizeUpdated(maxWalletSize);
    }

    function addBotToBlacklist(address account) external onlyOwner {
        require(!_isBlackListedBot[account], "Account is already blacklisted");
        _isBlackListedBot[account] = true;

        emit botAddedToBlacklist(account);
    }

    function removeBotFromBlacklist(address account) external onlyOwner {
        require(_isBlackListedBot[account], "Account is not blacklisted");
        _isBlackListedBot[account] = false;

        emit botRemovedFromBlacklist(account);
    }

    function excludeFromFee(address account) external onlyOwner {
        require(
            !_isExcludedFromFee[account],
            "Account is already excluded from fee"
        );
        _isExcludedFromFee[account] = true;

        emit excludedFromFee(account);
    }

    function excludeFromMaxTransaction(address account) external onlyOwner {
        require(
            !_isExcludedFromMaxTransaction[account],
            "Account is already excluded from max transaction"
        );
        _isExcludedFromMaxTransaction[account] = true;

        emit excludedFromMaxTransaction(account);
    }

    function excludeFromMaxWallet(address account) external onlyOwner {
        require(
            !_isExcludedFromMaxWallet[account],
            "Account is already excluded from max wallet"
        );
        _isExcludedFromMaxWallet[account] = true;

        emit excludedFromMaxWallet(account);
    }

    function includeInFee(address account) external onlyOwner {
        require(
            _isExcludedFromFee[account],
            "Account is already included in fee"
        );
        _isExcludedFromFee[account] = false;

        emit includedInFee(account);
    }

    function includeInMaxTransaction(address account) external onlyOwner {
        require(
            _isExcludedFromMaxTransaction[account],
            "Account is already included in max transaction"
        );
        _isExcludedFromMaxTransaction[account] = false;

        emit includedInMaxTransaction(account);
    }

    function includeInMaxWallet(address account) external onlyOwner {
        require(
            _isExcludedFromMaxWallet[account],
            "Account is already included in max wallet"
        );
        _isExcludedFromMaxWallet[account] = false;

        emit includedInMaxWallet(account);
    }

    function updateLiquidityLock(uint256 lockTime) external onlyOwner {
        require(
            block.timestamp > liquidityLockTime,
            "New liquidity lock time must be after the current lock time"
        );
        liquidityLockTime = lockTime;
        emit LiquidityLockTimeUpdated(lockTime);
    }

    // wrapper for Uniswap removeLiquidity, can only be called if not locked
    function removeLiquidityETH(
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external onlyOwner {
        require(
            block.timestamp > liquidityLockTime,
            "Liquidity removal is locked"
        );

        (uint256 amountToken, uint256 amountETH) = uniswapV2Router
            .removeLiquidityETH(
                address(this),
                liquidity,
                amountTokenMin,
                amountETHMin,
                to,
                deadline
            );

        emit liquidityRemoved(amountToken, amountETH);
    }

    function toggleSwapAndLiquifyEnabled() external onlyOwner {
        swapAndLiquifyEnabled = !swapAndLiquifyEnabled;
        emit SwapAndLiquifyEnabledUpdated(swapAndLiquifyEnabled);
    }

    function adminSwapAndLiquify(uint256 swapBalance) external onlyOwner {
        swapAndLiquify(swapBalance);
    }

    // Recovery functions

    function rescueEth() external payable onlyOwner {
        payable(msg.sender).transfer(address(this).balance);
    }

    function rescueTokens(address _stuckToken, uint256 _amount)
        external
        onlyOwner
    {
        IERC20(_stuckToken).transfer(msg.sender, _amount);
    }

    function rescueBurn(uint256 _amount) external onlyOwner {
        _transfer(address(this), msg.sender, _amount);
    }
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}
Ownable.sol 76 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
ERC20.sol 383 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, 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}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}
IERC20.sol 82 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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);
}
IUniswapV2Pair.sol 52 lines
pragma solidity >=0.5.0;

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 Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    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;
}
IUniswapV2Factory.sol 17 lines
pragma solidity >=0.5.0;

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;
}
ERC20Burnable.sol 39 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;

import "../ERC20.sol";
import "../../../utils/Context.sol";

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;

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);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

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

Read Contract

_buybackWallet 0xbc3e0739 → address
_developmentWallet 0x85320beb → address
_isBlackListedBot 0xa19e6ac2 → bool
_isExcludedFromFee 0x768dc710 → bool
_isExcludedFromMaxTransaction 0x32a710b9 → bool
_isExcludedFromMaxWallet 0xd1d7d7ef → bool
_treasuryWallet 0x269d1faa → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyFee 0x47062402 → uint16, uint16, uint16, uint16
decimals 0x313ce567 → uint8
liquidityLockedUntil 0x14669b8b → uint256
maxTransactionSize 0x28b13b61 → uint256
maxWalletSize 0x8f3fa860 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellFee 0x2b14ca56 → uint16, uint16, uint16, uint16
swapAndLiquifyEnabled 0x4a74bb02 → bool
swapThreshold 0x0445b667 → uint256
symbol 0x95d89b41 → string
tokensBurned 0xe7873b58 → uint256
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address

Write Contract 33 functions

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

addBotToBlacklist 0x1d7ef879
address account
adminSwapAndLiquify 0x9f27b657
uint256 swapBalance
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFee 0x437823ec
address account
excludeFromMaxTransaction 0x7cf14024
address account
excludeFromMaxWallet 0x5b700d91
address account
includeInFee 0xea2f0b37
address account
includeInMaxTransaction 0x6adf6818
address account
includeInMaxWallet 0x3f33e909
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeBotFromBlacklist 0xb030b34a
address account
removeLiquidityETH 0xee1fae3c
uint256 liquidity
uint256 amountTokenMin
uint256 amountETHMin
address to
uint256 deadline
renounceOwnership 0x715018a6
No parameters
rescueBurn 0xeee1c12b
uint256 _amount
rescueEth 0xce31a06b
No parameters
rescueTokens 0x57376198
address _stuckToken
uint256 _amount
setBothFees 0xbffe2a22
uint16 buy_liquidity
uint16 buy_treasury
uint16 buy_dev
uint16 buy_buyback
uint16 sell_liquidity
uint16 sell_treasury
uint16 sell_dev
uint16 sell_buyback
setBuyFee 0x8dc64439
uint16 liquidity
uint16 treasury
uint16 dev
uint16 buyback
setBuybackWallet 0x1d0adc07
address buyback
setDevelopmentWallet 0x72ac2486
address development
setMaxTransactionSize 0xa9e59da3
uint256 maxTxSize
setMaxWalletSize 0xea1644d5
uint256 maxWallet
setSellFee 0x5bcbe877
uint16 liquidity
uint16 treasury
uint16 dev
uint16 buyback
setSwapThreshold 0x9d0014b1
uint256 newSwapThreshold
setTreasuryWallet 0xa8602fea
address treasury
toggleSwapAndLiquifyEnabled 0xeb62b534
No parameters
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateLiquidityLock 0x576d2414
uint256 lockTime

Recent Transactions

No transactions found for this address