Address Contract Partially Verified
Address
0x53D7a6B2F020bF3E1fd3991a532a9B94b5Ee087e
Balance
0 ETH
Nonce
1
Code Size
21135 bytes
Creator
0xEF391fd4...7595 at tx 0x755ef5a7...5118f4
Indexed Transactions
0
Contract Bytecode
21135 bytes
0x6080604052600436106104c45760003560e01c806388e765ff11610276578063c18bc1951161014f578063ea4cfe12116100c1578063f5648a4f11610085578063f5648a4f14610e0e578063f5f4a97d14610e23578063f637434214610e39578063f8b45b0514610e4f578063fb002c9714610e65578063fe72b27a14610e7b57600080fd5b8063ea4cfe1214610d82578063eb472fc414610da2578063ee40166e14610dc2578063f11a24d314610dd8578063f2fde38b14610dee57600080fd5b8063d85ba06311610113578063d85ba06314610cc5578063dc3f0d0f14610cdb578063dd62ed3e14610cfb578063e1ade1fe14610d41578063e2f4560514610d57578063e884f26014610d6d57600080fd5b8063c18bc19514610c35578063c876d0b914610c55578063d0d41fe114610c6f578063d0e7d33f14610c8f578063d257b34f14610ca557600080fd5b8063a4c82a00116101e8578063b9e9d1aa116101ac578063b9e9d1aa14610b81578063bbc0c74214610ba1578063bd5fb92014610bc0578063c024666814610be0578063c077ab4b14610c00578063c17b5b8c14610c1557600080fd5b8063a4c82a0014610ae5578063a62068ce14610afb578063a9059cbb14610b11578063b3e4c17914610b31578063b62496f514610b5157600080fd5b80639c3b4fdc1161023a5780639c3b4fdc14610a575780639e93ad8e14610a6d5780639ec22c0e14610a835780639fccce3214610a99578063a0d82dc514610aaf578063a457c2d714610ac557600080fd5b806388e765ff146109cc5780638da5cb5b146109e257806395d89b4114610a005780639a5bd2dd14610a155780639a7a23d614610a3757600080fd5b806342088f1e116103a85780636b0a894c1161031a578063751039fc116102de578063751039fc146109075780637571336a1461091c5780638095d5641461093c5780638366e79a1461095c57806385b12c7c1461097c57806385ecfd281461099c57600080fd5b80636b0a894c1461087c5780636ddd17131461089257806370a08231146108b2578063715018a6146108d2578063730c1888146108e757600080fd5b806351f205e41161036c57806351f205e4146107ee578063552fd1481461080357806358a6d531146108235780635a139dd41461083a57806366d602ae146108505780636a486a8e1461086657600080fd5b806342088f1e14610768578063452ed4f11461077e578063499b83941461079e5780634a62bb65146107be5780634f77f6c0146107d857600080fd5b8063199ffc72116104415780632c3e486c116104055780632c3e486c146106bc5780632e82f1a0146106d25780632f1ffebf146106ec578063313ce5671461070c57806339509351146107285780633ad10ef61461074857600080fd5b8063199ffc72146106305780631a8145bb146106465780632307b4411461065c57806323b872dd1461067c5780632be32b611461069c57600080fd5b80630d3cbb22116104885780630d3cbb221461059957806310d5de53146105bb5780631708da75146105eb57806318160ddd14610605578063184c16c51461061a57600080fd5b8063046f9c3f146104d057806306fdde03146104f95780630758d9241461051b578063095ea7b3146105535780630d3141e01461058357600080fd5b366104cb57005b600080fd5b3480156104dc57600080fd5b506104e6602a5481565b6040519081526020015b60405180910390f35b34801561050557600080fd5b5061050e610e9b565b6040516104f0919061493a565b34801561052757600080fd5b5060095461053b906001600160a01b031681565b6040516001600160a01b0390911681526020016104f0565b34801561055f57600080fd5b5061057361056e3660046149a7565b610f2d565b60405190151581526020016104f0565b34801561058f57600080fd5b506104e6602e5481565b3480156105a557600080fd5b506105b96105b43660046149e1565b610f44565b005b3480156105c757600080fd5b506105736105d6366004614a05565b60306020526000908152604090205460ff1681565b3480156105f757600080fd5b506028546105739060ff1681565b34801561061157600080fd5b506002546104e6565b34801561062657600080fd5b506104e660265481565b34801561063c57600080fd5b506104e660225481565b34801561065257600080fd5b506104e660205481565b34801561066857600080fd5b506105b9610677366004614af8565b610f8a565b34801561068857600080fd5b50610573610697366004614bba565b6110e3565b3480156106a857600080fd5b506105b96106b7366004614bfb565b61118d565b3480156106c857600080fd5b506104e660245481565b3480156106de57600080fd5b506023546105739060ff1681565b3480156106f857600080fd5b506105b9610707366004614c14565b6112a1565b34801561071857600080fd5b50604051601281526020016104f0565b34801561073457600080fd5b506105736107433660046149a7565b611416565b34801561075457600080fd5b50600d5461053b906001600160a01b031681565b34801561077457600080fd5b506104e660295481565b34801561078a57600080fd5b50600a5461053b906001600160a01b031681565b3480156107aa57600080fd5b506105b96107b9366004614a05565b611452565b3480156107ca57600080fd5b506014546105739060ff1681565b3480156107e457600080fd5b506104e6601c5481565b3480156107fa57600080fd5b506105b96114ec565b34801561080f57600080fd5b506105b961081e366004614c44565b6115f5565b34801561082f57600080fd5b506010544310610573565b34801561084657600080fd5b506104e660185481565b34801561085c57600080fd5b506104e660075481565b34801561087257600080fd5b506104e6601b5481565b34801561088857600080fd5b506104e660135481565b34801561089e57600080fd5b506014546105739062010000900460ff1681565b3480156108be57600080fd5b506104e66108cd366004614a05565b611696565b3480156108de57600080fd5b506105b96116b1565b3480156108f357600080fd5b506105b9610902366004614cca565b611725565b34801561091357600080fd5b506105b961184e565b34801561092857600080fd5b506105b9610937366004614cf8565b6118c5565b34801561094857600080fd5b506105b9610957366004614d26565b61198d565b34801561096857600080fd5b50610573610977366004614d52565b611a48565b34801561098857600080fd5b506105b9610997366004614bfb565b611c82565b3480156109a857600080fd5b506105736109b7366004614a05565b60116020526000908152604090205460ff1681565b3480156109d857600080fd5b506104e660065481565b3480156109ee57600080fd5b506005546001600160a01b031661053b565b348015610a0c57600080fd5b5061050e612115565b348015610a2157600080fd5b50610a2a612124565b6040516104f09190614dc4565b348015610a4357600080fd5b506105b9610a52366004614cf8565b612185565b348015610a6357600080fd5b506104e6601a5481565b348015610a7957600080fd5b506104e661271081565b348015610a8f57600080fd5b506104e660275481565b348015610aa557600080fd5b506104e660215481565b348015610abb57600080fd5b506104e6601e5481565b348015610ad157600080fd5b50610573610ae03660046149a7565b612279565b348015610af157600080fd5b506104e660255481565b348015610b0757600080fd5b506104e660105481565b348015610b1d57600080fd5b50610573610b2c3660046149a7565b612312565b348015610b3d57600080fd5b506105b9610b4c366004614dd7565b61231f565b348015610b5d57600080fd5b50610573610b6c366004614a05565b60316020526000908152604090205460ff1681565b348015610b8d57600080fd5b50600e5461053b906001600160a01b031681565b348015610bad57600080fd5b5060145461057390610100900460ff1681565b348015610bcc57600080fd5b506105b9610bdb366004614c44565b61243f565b348015610bec57600080fd5b506105b9610bfb366004614cf8565b612545565b348015610c0c57600080fd5b506104e66125ce565b348015610c2157600080fd5b506105b9610c30366004614d26565b61273b565b348015610c4157600080fd5b506105b9610c50366004614bfb565b6127f6565b348015610c6157600080fd5b506016546105739060ff1681565b348015610c7b57600080fd5b506105b9610c8a366004614a05565b612901565b348015610c9b57600080fd5b506104e6602d5481565b348015610cb157600080fd5b506105b9610cc0366004614bfb565b61299b565b348015610cd157600080fd5b506104e660175481565b348015610ce757600080fd5b506105b9610cf6366004614bfb565b612ae6565b348015610d0757600080fd5b506104e6610d16366004614d52565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b348015610d4d57600080fd5b506104e6602b5481565b348015610d6357600080fd5b506104e6600b5481565b348015610d7957600080fd5b506105b9612bf4565b348015610d8e57600080fd5b50600c5461053b906001600160a01b031681565b348015610dae57600080fd5b5061053b610dbd366004614bfb565b612c2a565b348015610dce57600080fd5b506104e6600f5481565b348015610de457600080fd5b506104e660195481565b348015610dfa57600080fd5b506105b9610e09366004614a05565b612c54565b348015610e1a57600080fd5b506105b9612d3f565b348015610e2f57600080fd5b506104e6602c5481565b348015610e4557600080fd5b506104e6601d5481565b348015610e5b57600080fd5b506104e660085481565b348015610e7157600080fd5b506104e6601f5481565b348015610e8757600080fd5b506105b9610e96366004614bfb565b612dab565b606060038054610eaa90614e23565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed690614e23565b8015610f235780601f10610ef857610100808354040283529160200191610f23565b820191906000526020600020905b815481529060010190602001808311610f0657829003601f168201915b5050505050905090565b6000610f3a3384846130a5565b5060015b92915050565b6005546001600160a01b03163314610f775760405162461bcd60e51b8152600401610f6e90614e5d565b60405180910390fd5b6028805460ff1916911515919091179055565b6005546001600160a01b03163314610fb45760405162461bcd60e51b8152600401610f6e90614e5d565b80518251146110055760405162461bcd60e51b815260206004820152601e60248201527f617272617973206d757374206265207468652073616d65206c656e67746800006044820152606401610f6e565b61012c8251106110765760405162461bcd60e51b815260206004820152603660248201527f43616e206f6e6c792061697264726f70203330302077616c6c657473207065726044820152752074786e2064756520746f20676173206c696d69747360501b6064820152608401610f6e565b60005b82518110156110de57600083828151811061109657611096614e92565b6020026020010151905060008383815181106110b4576110b4614e92565b602002602001015190506110c93383836131c9565b505080806110d690614ebe565b915050611079565b505050565b60006110f084848461331e565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156111755760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610f6e565b61118285338584036130a5565b506001949350505050565b6005546001600160a01b031633146111b75760405162461bcd60e51b8152600401610f6e90614e5d565b6111c36012600a614fbb565b6103e86111cf60025490565b6111da906001614fca565b6111e49190614fe9565b6111ee9190614fe9565b81101561124f5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f7420736574206d61782062757920616d6f756e74206c6f776572206044820152687468616e20302e312560b81b6064820152608401610f6e565b61125b6012600a614fbb565b6112659082614fca565b60068190556040519081527ffcc0366804aaa8dbf88a2924100c733b70dec8445957a5d5f8ff92898de41009906020015b60405180910390a150565b6005546001600160a01b031633146112cb5760405162461bcd60e51b8152600401610f6e90614e5d565b601454610100900460ff16156113235760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207265656e61626c652074726164696e670000000000000000006044820152606401610f6e565b600a8211156113845760405162461bcd60e51b815260206004820152602760248201527f43616e6e6f74206d616b652070656e616c747920626c6f636b73206d6f72652060448201526607468616e2031360cc1b6064820152608401610f6e565b6014805462ffff0019166201010017905543600f8190556113a690839061500b565b601055600a80546001600160a01b0319166001600160a01b0383169081179091556113d2906001613fc9565b600a546113e9906001600160a01b0316600161402c565b6040517fa56feb2d31b9a7424db0be063fd450863979c9e2382cf5110f869bd1ad361bb790600090a15050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610f3a91859061144d90869061500b565b6130a5565b6005546001600160a01b0316331461147c5760405162461bcd60e51b8152600401610f6e90614e5d565b6001600160a01b0381166114a25760405162461bcd60e51b8152600401610f6e90615023565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f4efa56652237561d0f1fd31311aeaaa41f3b754a461545ed3cf6ced5876d298290600090a250565b6005546001600160a01b031633146115165760405162461bcd60e51b8152600401610f6e90614e5d565b600b5461152230611696565b1015611598576040805162461bcd60e51b81526020600482015260248101919091527f43616e206f6e6c792073776170207768656e20746f6b656e20616d6f756e742060448201527f6973206174206f7220686967686572207468616e207265737472696374696f6e6064820152608401610f6e565b600a805460ff60a01b1916600160a01b1790556115b361405a565b600a805460ff60a01b191690556040514281527f1b56c383f4f48fc992e45667ea4eabae777b9cca68b516a9562d8cda78f1bb329060200160405180910390a1565b6005546001600160a01b0316331461161f5760405162461bcd60e51b8152600401610f6e90614e5d565b60005b8281101561169057816011600086868581811061164157611641614e92565b90506020020160208101906116569190614a05565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061168881614ebe565b915050611622565b50505050565b6001600160a01b031660009081526020819052604090205490565b6005546001600160a01b031633146116db5760405162461bcd60e51b8152600401610f6e90614e5d565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546001600160a01b0316331461174f5760405162461bcd60e51b8152600401610f6e90614e5d565b610e108310156117bd5760405162461bcd60e51b815260206004820152603360248201527f63616e6e6f7420736574206275796261636b206d6f7265206f6674656e207468604482015272616e206576657279203130206d696e7574657360681b6064820152608401610f6e565b6103e882111580156117cd575060015b6118325760405162461bcd60e51b815260206004820152603060248201527f4d75737420736574206175746f204c50206275726e2070657263656e7420626560448201526f747765656e20302520616e642031302560801b6064820152608401610f6e565b6024929092556022556023805460ff1916911515919091179055565b6005546001600160a01b031633146118785760405162461bcd60e51b8152600401610f6e90614e5d565b6014805460ff199081169091556016805490911690556002546006556002546007556040517fa4ffae85e880608d5d4365c2b682786545d136145537788e7e0940dff9f0b98c90600090a1565b6005546001600160a01b031633146118ef5760405162461bcd60e51b8152600401610f6e90614e5d565b8061196257600a546001600160a01b03908116908316036119625760405162461bcd60e51b815260206004820152602760248201527f43616e6e6f742072656d6f766520756e697377617020706169722066726f6d2060448201526636b0bc103a3c3760c91b6064820152608401610f6e565b6001600160a01b03919091166000908152603060205260409020805460ff1916911515919091179055565b6005546001600160a01b031633146119b75760405162461bcd60e51b8152600401610f6e90614e5d565b60188390556019829055601a819055806119d1838561500b565b6119db919061500b565b60175560646119ed612710600f614fca565b6119f79190614fe9565b60175411156110de5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420313525206f72206c6573730000006044820152606401610f6e565b6005546000906001600160a01b03163314611a755760405162461bcd60e51b8152600401610f6e90614e5d565b6001600160a01b038316611acb5760405162461bcd60e51b815260206004820152601a60248201527f5f746f6b656e20616464726573732063616e6e6f7420626520300000000000006044820152606401610f6e565b6001600160a01b03831630141580611aeb5750601454610100900460ff16155b611b545760405162461bcd60e51b815260206004820152603460248201527f43616e2774207769746864726177206e617469766520746f6b656e73207768696044820152736c652074726164696e672069732061637469766560601b6064820152608401610f6e565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015611b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bbf9190615069565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509085169063a9059cbb906044016020604051808303816000875af1158015611c12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c369190615082565b604080516001600160a01b0387168152602081018490529193507fdeda980967fcead7b61e78ac46a4da14274af29e894d4d61e8b81ec38ab3e438910160405180910390a15092915050565b6005546001600160a01b03163314611cac5760405162461bcd60e51b8152600401610f6e90614e5d565b601454610100900460ff1615611d185760405162461bcd60e51b815260206004820152602b60248201527f54726164696e6720697320616c7265616479206163746976652c2063616e6e6f60448201526a3a103932b630bab731b41760a91b6064820152608401610f6e565b600960009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8f919061509f565b6001600160a01b031663c9c6539630600960009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611df1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e15919061509f565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015611e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e86919061509f565b600a80546001600160a01b0319166001600160a01b03929092169182179055611eb0906001613fc9565b600a54611ec7906001600160a01b0316600161402c565b60004711611f235760405162461bcd60e51b815260206004820152602360248201527f4d757374206861766520455448206f6e20636f6e747261637420746f206c61756044820152620dcc6d60eb1b6064820152608401610f6e565b6000611f2e30611696565b11611f8a5760405162461bcd60e51b815260206004820152602660248201527f4d757374206861766520546f6b656e73206f6e20636f6e747261637420746f206044820152650d8c2eadcc6d60d31b6064820152608401610f6e565b600954611fa59030906001600160a01b031661144d82611696565b6009546001600160a01b031663f305d7194730611fc181611696565b600e546040516001600160e01b031960e087901b168152611ff793929160009182916001600160a01b03169042906004016150bc565b60606040518083038185885af1158015612015573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061203a91906150f7565b5050507f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b03166350d25bcd6040518163ffffffff1660e01b81526004016020604051808303816000875af115801561209d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c19190615069565b6029556014805462ffff0019166201010017905543600f8190556120e690829061500b565b6010556040517fa56feb2d31b9a7424db0be063fd450863979c9e2382cf5110f869bd1ad361bb790600090a150565b606060048054610eaa90614e23565b60606012805480602002602001604051908101604052809291908181526020018280548015610f2357602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161215e575050505050905090565b6005546001600160a01b031633146121af5760405162461bcd60e51b8152600401610f6e90614e5d565b600a546001600160a01b03908116908316036122335760405162461bcd60e51b815260206004820152603960248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201527f6175746f6d617465644d61726b65744d616b65725061697273000000000000006064820152608401610f6e565b61223d828261402c565b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156122fb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610f6e565b61230833858584036130a5565b5060019392505050565b6000610f3a33848461331e565b6005546001600160a01b031633146123495760405162461bcd60e51b8152600401610f6e90614e5d565b6064851115801561235b575060648411155b80156123675750838511155b6123ac5760405162461bcd60e51b8152602060048201526016602482015275109d5e481cd95d1d1a5b99dcc81a5b98dbdc9c9958dd60521b6044820152606401610f6e565b606483111580156123be575060648211155b80156123ca5750818311155b6124165760405162461bcd60e51b815260206004820152601760248201527f53656c6c2073657474696e677320696e636f72726563740000000000000000006044820152606401610f6e565b6028805460ff191696151596909617909555602a93909355602c91909155602b55602d55602e55565b6005546001600160a01b031633146124695760405162461bcd60e51b8152600401610f6e90614e5d565b60005b828110156116905781602f600086868581811061248b5761248b614e92565b90506020020160208101906124a09190614a05565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558383828181106124da576124da614e92565b90506020020160208101906124ef9190614a05565b6001600160a01b03167f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df78360405161252b911515815260200190565b60405180910390a28061253d81614ebe565b91505061246c565b6005546001600160a01b0316331461256f5760405162461bcd60e51b8152600401610f6e90614e5d565b6001600160a01b0382166000818152602f6020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b60006305f5e100670de0b6b3a76400006125e961dead611696565b6002546125f69190615125565b600a5461260b906001600160a01b0316611696565b602954600960009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612661573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612685919061509f565b600a546040516370a0823160e01b81526001600160a01b0391821660048201529116906370a0823190602401602060405180830381865afa1580156126ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126f29190615069565b61270490670de0b6b3a7640000614fca565b61270e9190614fca565b6127189190614fe9565b6127229190614fca565b61272c9190614fe9565b6127369190614fe9565b905090565b6005546001600160a01b031633146127655760405162461bcd60e51b8152600401610f6e90614e5d565b601c839055601d829055601e8190558061277f838561500b565b612789919061500b565b601b55606461279b6127106014614fca565b6127a59190614fe9565b601b5411156110de5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420323025206f72206c6573730000006044820152606401610f6e565b6005546001600160a01b031633146128205760405162461bcd60e51b8152600401610f6e90614e5d565b61282c6012600a614fbb565b606461283760025490565b612842906001614fca565b61284c9190614fe9565b6128569190614fe9565b8110156128b65760405162461bcd60e51b815260206004820152602860248201527f43616e6e6f7420736574206d61782073656c6c20616d6f756e74206c6f776572604482015267207468616e20312560c01b6064820152608401610f6e565b6128c26012600a614fbb565b6128cc9082614fca565b60088190556040519081527fefc9add9a9b7382de284ef5ad69d8ea863e2680492b21a81948c2d5f04a442bc90602001611296565b6005546001600160a01b0316331461292b5760405162461bcd60e51b8152600401610f6e90614e5d565b6001600160a01b0381166129515760405162461bcd60e51b8152600401610f6e90615023565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517f804ec39c1aea0b9f2615a34c3fa437b6ddda2c72e6848abf0f23955589a7ad5490600090a250565b6005546001600160a01b031633146129c55760405162461bcd60e51b8152600401610f6e90614e5d565b620186a06129d260025490565b6129dd906001614fca565b6129e79190614fe9565b811015612a545760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b6064820152608401610f6e565b6103e8612a6060025490565b612a6b906001614fca565b612a759190614fe9565b811115612ae15760405162461bcd60e51b815260206004820152603460248201527f5377617020616d6f756e742063616e6e6f742062652068696768657220746861604482015273371018171892903a37ba30b61039bab838363c9760611b6064820152608401610f6e565b600b55565b6005546001600160a01b03163314612b105760405162461bcd60e51b8152600401610f6e90614e5d565b612b1c6012600a614fbb565b6103e8612b2860025490565b612b33906001614fca565b612b3d9190614fe9565b612b479190614fe9565b811015612ba95760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420736574206d61782073656c6c20616d6f756e74206c6f776572604482015269207468616e20302e312560b01b6064820152608401610f6e565b612bb56012600a614fbb565b612bbf9082614fca565b60078190556040519081527f53c4eb831d8cfeb750f1c62590d8cd30f4c6f0380d29a05caa09f0d92588560e90602001611296565b6005546001600160a01b03163314612c1e5760405162461bcd60e51b8152600401610f6e90614e5d565b6016805460ff19169055565b60128181548110612c3a57600080fd5b6000918252602090912001546001600160a01b0316905081565b6005546001600160a01b03163314612c7e5760405162461bcd60e51b8152600401610f6e90614e5d565b6001600160a01b038116612ce35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f6e565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314612d695760405162461bcd60e51b8152600401610f6e90614e5d565b604051600090339047908381818185875af1925050503d8060008114611690576040519150601f19603f3d011682016040523d82523d6000602084013e611690565b6005546001600160a01b03163314612dd55760405162461bcd60e51b8152600401610f6e90614e5d565b611388811115612e455760405162461bcd60e51b815260206004820152603560248201527f4d6179206e6f74206275726e206d6f7265207468616e20353025206f6620636f6044820152746e74726163742773204c5020617420612074696d6560581b6064820152608401610f6e565b602654612e529042615125565b6027541115612e935760405162461bcd60e51b815260206004820152600d60248201526c213ab937103a37b79039b7b7b760991b6044820152606401610f6e565b42602755600a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612ee0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f049190615069565b90506000612f1130611696565b90506000612710612f228585614fca565b612f2c9190614fe9565b600a5460095460405163095ea7b360e01b81526001600160a01b03918216600482015260248101849052929350479291169063095ea7b3906044016020604051808303816000875af1158015612f86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612faa9190615082565b50600954604051629d473b60e21b81526001600160a01b03909116906302751cec90612fe590309086906001908190849042906004016150bc565b60408051808303816000875af1158015613003573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613027919061513c565b505060008361303530611696565b61303f9190615125565b90508015613054576130543061dead836131c9565b60006130608347615125565b905080156130715761307181614262565b60405184907f81b7e7967a97e0708996ad25e859322b1c2e22612ac6798c9c95cfda2dca265f90600090a250505050505050565b6001600160a01b0383166131075760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610f6e565b6001600160a01b0382166131685760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610f6e565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166131ef5760405162461bcd60e51b8152600401610f6e90615160565b6001600160a01b0382166132155760405162461bcd60e51b8152600401610f6e906151a5565b6001600160a01b0383166000908152602081905260409020548181101561328d5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610f6e565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906132c490849061500b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161331091815260200190565b60405180910390a350505050565b6001600160a01b0383166133445760405162461bcd60e51b8152600401610f6e90615160565b6001600160a01b03821661336a5760405162461bcd60e51b8152600401610f6e906151a5565b600081116133ba5760405162461bcd60e51b815260206004820152601d60248201527f616d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610f6e565b601454610100900460ff1661344d576001600160a01b0383166000908152602f602052604090205460ff168061340857506001600160a01b0382166000908152602f602052604090205460ff165b61344d5760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b6044820152606401610f6e565b601454610100900460ff161561354d576001600160a01b03831660009081526011602052604090205460ff1615801561349f57506001600160a01b03821660009081526011602052604090205460ff16155b806134b757506005546001600160a01b038381169116145b806134cc57506001600160a01b03821661dead145b61354d5760405162461bcd60e51b815260206004820152604660248201527f426f74732063616e6e6f74207472616e7366657220746f6b656e7320696e206f60448201527f72206f75742065786365707420746f206f776e6572206f722064656164206164606482015265323932b9b99760d11b608482015260a401610f6e565b60145460ff161561393f576005546001600160a01b0384811691161480159061358457506005546001600160a01b03838116911614155b801561359857506001600160a01b03821615155b80156135af57506001600160a01b03821661dead14155b80156135d457506001600160a01b0383166000908152602f602052604090205460ff16155b80156135f957506001600160a01b0382166000908152602f602052604090205460ff16155b1561393f5760165460ff1615613712576009546001600160a01b038381169116148015906136355750600a546001600160a01b03838116911614155b1561371257613645600243615125565b326000908152601560205260409020541080156136835750613668600243615125565b6001600160a01b038316600090815260156020526040902054105b6136ed5760405162461bcd60e51b815260206004820152603560248201527f5f7472616e736665723a3a205472616e736665722044656c617920656e61626c60448201527432b21710102a393c9030b3b0b4b7103630ba32b91760591b6064820152608401610f6e565b3260009081526015602052604080822043908190556001600160a01b03851683529120555b6001600160a01b03831660009081526031602052604090205460ff16801561375357506001600160a01b03821660009081526030602052604090205460ff16155b1561381a576006548111156137bb5760405162461bcd60e51b815260206004820152602860248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201526736b0bc10313abc9760c11b6064820152608401610f6e565b6008546137c783611696565b6137d1908361500b565b11156138155760405162461bcd60e51b815260206004820152601360248201527213585e0815d85b1b195d08115e18d959591959606a1b6044820152606401610f6e565b61393f565b6001600160a01b03821660009081526031602052604090205460ff16801561385b57506001600160a01b03831660009081526030602052604090205460ff16155b156138c5576007548111156138155760405162461bcd60e51b815260206004820152602a60248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152691036b0bc1039b2b6361760b11b6064820152608401610f6e565b6001600160a01b03821660009081526030602052604090205460ff1661393f576008546138f183611696565b6138fb908361500b565b111561393f5760405162461bcd60e51b815260206004820152601360248201527213585e0815d85b1b195d08115e18d959591959606a1b6044820152606401610f6e565b600061394a30611696565b600b5490915081108015908190613969575060145462010000900460ff165b801561397f5750600a54600160a01b900460ff16155b80156139a457506001600160a01b03851660009081526031602052604090205460ff16155b80156139c957506001600160a01b0385166000908152602f602052604090205460ff16155b80156139ee57506001600160a01b0384166000908152602f602052604090205460ff16155b15613a1c57600a805460ff60a01b1916600160a01b179055613a0e61405a565b600a805460ff60a01b191690555b600a54600160a01b900460ff16158015613a4e57506001600160a01b03841660009081526031602052604090205460ff165b8015613a5c575060235460ff165b8015613a775750602454602554613a73919061500b565b4210155b8015613a9c57506001600160a01b0385166000908152602f602052604090205460ff16155b15613aa957613aa96143ac565b6001600160a01b0385166000908152602f602052604090205460019060ff1680613aeb57506001600160a01b0385166000908152602f602052604090205460ff165b15613af4575060005b60285460009060ff168015613b105750601454610100900460ff165b8015613b265750600a54600160a01b900460ff16155b15613bba577f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b84196001600160a01b03166350d25bcd6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015613b8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613baf9190615069565b602955613bba6145c6565b8115613fb55760105443108015613be957506001600160a01b03871660009081526031602052604090205460ff165b8015613c0e57506001600160a01b03861660009081526031602052604090205460ff16155b8015613c3357506001600160a01b0386166000908152602f602052604090205460ff16155b8015613c4157506000601754115b15613dfc576010544310613c6857600160066000828254613c629190615125565b90915550505b6001600160a01b03861660009081526011602052604090205460ff16613d48576001600160a01b0386166000908152601160205260408120805460ff191660019081179091556013805491929091613cc190849061500b565b9091555050601280546001810182556000919091527fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0388169081179091556040519081527f55678e47d0a699d3ab99b0184c4ff14f2246ba80522deb921aa0c8823578c44a9060200160405180910390a15b61271060175486613d599190614fca565b613d639190614fe9565b905060175460195482613d769190614fca565b613d809190614fe9565b60206000828254613d91919061500b565b9091555050601754601854613da69083614fca565b613db09190614fe9565b601f6000828254613dc1919061500b565b9091555050601754601a54613dd69083614fca565b613de09190614fe9565b60216000828254613df1919061500b565b90915550613f979050565b6001600160a01b03861660009081526031602052604090205460ff168015613e2657506000601b54115b15613eb957612710601b5486613e3c9190614fca565b613e469190614fe9565b9050601b54601d5482613e599190614fca565b613e639190614fe9565b60206000828254613e74919061500b565b9091555050601b54601c54613e899083614fca565b613e939190614fe9565b601f6000828254613ea4919061500b565b9091555050601b54601e54613dd69083614fca565b6001600160a01b03871660009081526031602052604090205460ff168015613ee357506000601754115b15613f975761271060175486613ef99190614fca565b613f039190614fe9565b905060175460195482613f169190614fca565b613f209190614fe9565b60206000828254613f31919061500b565b9091555050601754601854613f469083614fca565b613f509190614fe9565b601f6000828254613f61919061500b565b9091555050601754601a54613f769083614fca565b613f809190614fe9565b60216000828254613f91919061500b565b90915550505b8015613fa857613fa88730836131c9565b613fb28186615125565b94505b613fc08787876131c9565b50505050505050565b6001600160a01b038216600081815260306020908152604091829020805460ff19168515159081179091558251938452908301527f6b4f1be9103e6cbcd38ca4a922334f2c3109b260130a6676a987f94088fd6746910160405180910390a15050565b6001600160a01b0382166000908152603160205260409020805460ff191682151517905561223d8282613fc9565b600061406530611696565b90506000602154601f5460205461407c919061500b565b614086919061500b565b9050811580614093575080155b1561409c575050565b600b546140aa906014614fca565b8211156140c257600b546140bf906014614fca565b91505b600080600283602054866140d69190614fca565b6140e09190614fe9565b6140ea9190614fe9565b90506140fe6140f98286615125565b614741565b6020544790819060009061411490600290614fe9565b61411e9087615125565b601f5461412b9085614fca565b6141359190614fe9565b9050600060026020546141489190614fe9565b6141529088615125565b60215461415f9086614fca565b6141699190614fe9565b9050614175818361500b565b61417f9084615125565b60006020819055601f8190556021559250841580159061419f5750600083115b156141ae576141ae858461489b565b600d546040516001600160a01b03909116908290600081818185875af1925050503d80600081146141fb576040519150601f19603f3d011682016040523d82523d6000602084013e614200565b606091505b5050600c546040519197506001600160a01b0316904790600081818185875af1925050503d8060008114614250576040519150601f19603f3d011682016040523d82523d6000602084013e614255565b606091505b5050505050505050505050565b6040805160028082526060820183526000926020830190803683375050600954604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c4648925060048083019260209291908290030181865afa1580156142cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142f0919061509f565b8160008151811061430357614303614e92565b60200260200101906001600160a01b031690816001600160a01b031681525050308160018151811061433757614337614e92565b6001600160a01b03928316602091820292909201015260095460405163b6f9de9560e01b815291169063b6f9de9590849061437f90600090869061dead9042906004016151e8565b6000604051808303818588803b15801561439857600080fd5b505af1158015613fc0573d6000803e3d6000fd5b426025819055602755600a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156143fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144229190615069565b9050600061442f30611696565b90506000612710602254846144449190614fca565b61444e9190614fe9565b600a5460095460405163095ea7b360e01b81526001600160a01b03918216600482015260248101849052929350479291169063095ea7b3906044016020604051808303816000875af11580156144a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144cc9190615082565b50600954604051629d473b60e21b81526001600160a01b03909116906302751cec9061450790309086906001908190849042906004016150bc565b60408051808303816000875af1158015614525573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614549919061513c565b505060008361455730611696565b6145619190615125565b90508015614576576145763061dead836131c9565b60006145828347615125565b905080156145935761459381614262565b60405184907f30464008593337c7762c84338a125f5c481ce1997dbf1d7931bcce0b6430787a90600090a2505050505050565b60006145d06125ce565b90506000602a54670de0b6b3a7640000602c54602e54856145f19190614fe9565b6145fb9190614fca565b6146059190614fe9565b61460f919061500b565b90506000602b54670de0b6b3a7640000602d54602e54866146309190614fe9565b61463a9190614fca565b6146449190614fe9565b61464e919061500b565b9050602c5482111561466057602c5491505b602d5481111561466f5750602d545b60648260175461467f9190614fca565b6146899190614fe9565b601981905560175460649161469d91615125565b6146a8906021614fca565b6146b29190614fe9565b601881905560195460175490916146c891615125565b6146d29190615125565b601a55601b546064906146e6908390614fca565b6146f09190614fe9565b601d819055601b5460649161470491615125565b61470f906032614fca565b6147199190614fe9565b601c819055601d54601b54909161472f91615125565b6147399190615125565b601e55505050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061477657614776614e92565b6001600160a01b03928316602091820292909201810191909152600954604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156147cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147f3919061509f565b8160018151811061480657614806614e92565b6001600160a01b03928316602091820292909201015260095461482c91309116846130a5565b60095460405163791ac94760e01b81526001600160a01b039091169063791ac9479061486590859060009086903090429060040161521d565b600060405180830381600087803b15801561487f57600080fd5b505af1158015614893573d6000803e3d6000fd5b505050505050565b6009546148b39030906001600160a01b0316846130a5565b60095460405163f305d71960e01b81526001600160a01b039091169063f305d7199083906148f090309087906000908190849042906004016150bc565b60606040518083038185885af115801561490e573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061493391906150f7565b5050505050565b600060208083528351808285015260005b818110156149675785810183015185820160400152820161494b565b81811115614979576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146149a457600080fd5b50565b600080604083850312156149ba57600080fd5b82356149c58161498f565b946020939093013593505050565b80151581146149a457600080fd5b6000602082840312156149f357600080fd5b81356149fe816149d3565b9392505050565b600060208284031215614a1757600080fd5b81356149fe8161498f565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614a6157614a61614a22565b604052919050565b600067ffffffffffffffff821115614a8357614a83614a22565b5060051b60200190565b600082601f830112614a9e57600080fd5b81356020614ab3614aae83614a69565b614a38565b82815260059290921b84018101918181019086841115614ad257600080fd5b8286015b84811015614aed5780358352918301918301614ad6565b509695505050505050565b60008060408385031215614b0b57600080fd5b823567ffffffffffffffff80821115614b2357600080fd5b818501915085601f830112614b3757600080fd5b81356020614b47614aae83614a69565b82815260059290921b84018101918181019089841115614b6657600080fd5b948201945b83861015614b8d578535614b7e8161498f565b82529482019490820190614b6b565b96505086013592505080821115614ba357600080fd5b50614bb085828601614a8d565b9150509250929050565b600080600060608486031215614bcf57600080fd5b8335614bda8161498f565b92506020840135614bea8161498f565b929592945050506040919091013590565b600060208284031215614c0d57600080fd5b5035919050565b60008060408385031215614c2757600080fd5b823591506020830135614c398161498f565b809150509250929050565b600080600060408486031215614c5957600080fd5b833567ffffffffffffffff80821115614c7157600080fd5b818601915086601f830112614c8557600080fd5b813581811115614c9457600080fd5b8760208260051b8501011115614ca957600080fd5b60209283019550935050840135614cbf816149d3565b809150509250925092565b600080600060608486031215614cdf57600080fd5b83359250602084013591506040840135614cbf816149d3565b60008060408385031215614d0b57600080fd5b8235614d168161498f565b91506020830135614c39816149d3565b600080600060608486031215614d3b57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215614d6557600080fd5b8235614d708161498f565b91506020830135614c398161498f565b600081518084526020808501945080840160005b83811015614db95781516001600160a01b031687529582019590820190600101614d94565b509495945050505050565b6020815260006149fe6020830184614d80565b60008060008060008060c08789031215614df057600080fd5b8635614dfb816149d3565b9860208801359850604088013597606081013597506080810135965060a00135945092505050565b600181811c90821680614e3757607f821691505b602082108103614e5757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201614ed057614ed0614ea8565b5060010190565b600181815b80851115614f12578160001904821115614ef857614ef8614ea8565b80851615614f0557918102915b93841c9390800290614edc565b509250929050565b600082614f2957506001610f3e565b81614f3657506000610f3e565b8160018114614f4c5760028114614f5657614f72565b6001915050610f3e565b60ff841115614f6757614f67614ea8565b50506001821b610f3e565b5060208310610133831016604e8410600b8410161715614f95575081810a610f3e565b614f9f8383614ed7565b8060001904821115614fb357614fb3614ea8565b029392505050565b60006149fe60ff841683614f1a565b6000816000190483118215151615614fe457614fe4614ea8565b500290565b60008261500657634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561501e5761501e614ea8565b500190565b60208082526026908201527f5f6f7065726174696f6e734164647265737320616464726573732063616e6e6f60408201526507420626520360d41b606082015260800190565b60006020828403121561507b57600080fd5b5051919050565b60006020828403121561509457600080fd5b81516149fe816149d3565b6000602082840312156150b157600080fd5b81516149fe8161498f565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b60008060006060848603121561510c57600080fd5b8351925060208401519150604084015190509250925092565b60008282101561513757615137614ea8565b500390565b6000806040838503121561514f57600080fd5b505080516020909101519092909150565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b8481526080602082015260006152016080830186614d80565b6001600160a01b03949094166040830152506060015292915050565b85815284602082015260a06040820152600061523c60a0830186614d80565b6001600160a01b039490941660608301525060800152939250505056fea264697066735822122002b662ebae775a6826ca2d212e402b45f2c4bdab670f0828313d86cbd153dbe864736f6c634300080f0033
Verified Source Code Partial Match
Compiler: v0.8.15+commit.e14f2714
EVM: london
Optimization: Yes (200 runs)
Corn.sol 869 lines
/*
Welcome to Corn.
Where we love corn.
Corn is low tax.
Corn is good.
It has the juice.
https://corntokenerc.com/
*/
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this;
return msg.data;
}
}
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
}
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;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual override returns (string memory) {return _name;}
function symbol() public view virtual override returns (string memory) {return _symbol;}
function decimals() public view virtual override returns (uint8) {return 18;}
function totalSupply() public view virtual override returns (uint256) {return _totalSupply;}
function balanceOf(address account) public view virtual override returns (uint256) {return _balances[account];}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
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");
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
function _createInitialSupply(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
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);
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() external virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(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 addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function removeLiquidityETH(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external returns (uint amountToken, uint amountETH);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IPriceFeed {
function latestAnswer() external returns (int256);
}
contract Corn is ERC20, Ownable {
uint256 public maxBuyAmount;
uint256 public maxSellAmount;
uint256 public maxWallet;
IDexRouter public dexRouter;
address public lpPair;
IPriceFeed internal immutable priceFeed;
bool private swapping;
uint256 public swapTokensAtAmount;
address public operationsAddress;
address public devAddress;
address public futureOwner;
uint256 public tradingActiveBlock = 0; // 0 means trading is not active
uint256 public blockForPenaltyEnd;
mapping (address => bool) public boughtEarly;
address[] public earlyBuyers;
uint256 public botsCaught;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyOperationsFee;
uint256 public buyLiquidityFee;
uint256 public buyDevFee;
uint256 public sellTotalFees;
uint256 public sellOperationsFee;
uint256 public sellLiquidityFee;
uint256 public sellDevFee;
uint256 public constant FEE_DIVISOR = 10000;
uint256 public tokensForOperations;
uint256 public tokensForLiquidity;
uint256 public tokensForDev;
uint256 public percentForLPBurn = 25; // 25 = .25%
bool public lpBurnEnabled = false;
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 30 minutes;
uint256 public lastManualLpBurnTime;
// floating liquidity settings
bool public customLiquidityActive = true;
uint256 public latestEthPrice = 0;
uint256 public minimumBuyLiqPerc = 50;
uint256 public minimumSellLiqPerc = 33;
uint256 public maximumBuyLiqPerc = 80;
uint256 public maximumSellLiqPerc = 50;
uint256 public mcapComparisonValue = 10 * 1e6;
/******************/
// exlcude from fees and max transaction amount
mapping (address => bool) private _isExcludedFromFees;
mapping (address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping (address => bool) public automatedMarketMakerPairs;
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event EnabledTrading();
event RemovedLimits();
event ExcludeFromFees(address indexed account, bool isExcluded);
event UpdatedMaxBuyAmount(uint256 newAmount);
event UpdatedMaxSellAmount(uint256 newAmount);
event UpdatedMaxWalletAmount(uint256 newAmount);
event UpdatedOperationsAddress(address indexed newWallet);
event UpdatedDevAddress(address indexed newWallet);
event MaxTransactionExclusion(address _address, bool excluded);
event OwnerForcedSwapBack(uint256 timestamp);
event CaughtEarlyBuyer(address sniper);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event AutoBurnLP(uint256 indexed tokensBurned);
event ManualBurnLP(uint256 indexed tokensBurned);
event TransferForeignToken(address token, uint256 amount);
constructor() ERC20("Corn", "CORN") payable {
address newOwner = msg.sender; // can leave alone if owner is deployer.
address _dexRouter;
address _priceFeed;
_dexRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // ETH: Uniswap V2
_priceFeed = 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419;
priceFeed = IPriceFeed(_priceFeed);
require(priceFeed.latestAnswer() > 0, "wrong price feed");
// initialize router
dexRouter = IDexRouter(_dexRouter);
uint256 totalSupply = 100 * 1e6 * (10 ** decimals());
maxBuyAmount = totalSupply * 200 / 10000;
maxSellAmount = totalSupply * 200 / 10000;
maxWallet = totalSupply * 20 / 1000;
swapTokensAtAmount = totalSupply * 200 / 100000;
buyOperationsFee = 0;
buyLiquidityFee = 200;
buyDevFee = 0;
buyTotalFees = buyOperationsFee + buyLiquidityFee + buyDevFee;
sellOperationsFee = 0;
sellLiquidityFee = 200;
sellDevFee = 0;
sellTotalFees = sellOperationsFee + sellLiquidityFee + sellDevFee;
if(block.chainid == 1){
operationsAddress = address(0xEF391fd49E7Aa21efcC4D378c15431f30dAD7595);
devAddress = address(0xEF391fd49E7Aa21efcC4D378c15431f30dAD7595);
futureOwner = address(0xEF391fd49E7Aa21efcC4D378c15431f30dAD7595);
} else {
operationsAddress = address(msg.sender);
devAddress = address(msg.sender);
futureOwner = address(msg.sender);
}
_excludeFromMaxTransaction(newOwner, true);
_excludeFromMaxTransaction(address(this), true);
_excludeFromMaxTransaction(address(0xdead), true);
_excludeFromMaxTransaction(address(operationsAddress), true);
_excludeFromMaxTransaction(address(dexRouter), true);
_excludeFromMaxTransaction(address(futureOwner), true);
excludeFromFees(newOwner, true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromFees(address(operationsAddress), true);
excludeFromFees(address(dexRouter), true);
excludeFromFees(address(futureOwner), true);
_createInitialSupply(address(this), totalSupply * 66 / 100); // update with % for LP
_createInitialSupply(futureOwner, totalSupply - balanceOf(address(this)));
transferOwnership(newOwner);
}
receive() external payable {}
function setCustomLiquidityActive(bool active) external onlyOwner {
customLiquidityActive = active;
}
function enableTrading(uint256 blocksForPenalty, address _lpPair) external onlyOwner {
require(!tradingActive, "Cannot reenable trading");
require(blocksForPenalty <= 10, "Cannot make penalty blocks more than 10");
tradingActive = true;
swapEnabled = true;
tradingActiveBlock = block.number;
blockForPenaltyEnd = tradingActiveBlock + blocksForPenalty;
// set pair
lpPair = _lpPair;
_excludeFromMaxTransaction(address(lpPair), true);
_setAutomatedMarketMakerPair(address(lpPair), true);
emit EnabledTrading();
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
limitsInEffect = false;
transferDelayEnabled = false;
maxBuyAmount = totalSupply();
maxSellAmount = totalSupply();
emit RemovedLimits();
}
function getEarlyBuyers() external view returns (address[] memory){
return earlyBuyers;
}
function massManageRestrictedWallets(address[] calldata accounts, bool restricted) external onlyOwner {
for(uint256 i = 0; i < accounts.length; i++){
boughtEarly[accounts[i]] = restricted;
}
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner {
transferDelayEnabled = false;
}
function updateMaxBuyAmount(uint256 newNum) external onlyOwner {
require(newNum >= (totalSupply() * 1 / 1000) / (10 ** decimals()), "Cannot set max buy amount lower than 0.1%");
maxBuyAmount = newNum * (10 ** decimals());
emit UpdatedMaxBuyAmount(maxBuyAmount);
}
function updateMaxSellAmount(uint256 newNum) external onlyOwner {
require(newNum >= (totalSupply() * 1 / 1000) / (10 ** decimals()), "Cannot set max sell amount lower than 0.1%");
maxSellAmount = newNum * (10 ** decimals());
emit UpdatedMaxSellAmount(maxSellAmount);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(newNum >= (totalSupply() * 1 / 100) / (10 ** decimals()), "Cannot set max sell amount lower than 1%");
maxWallet = newNum * (10 ** decimals());
emit UpdatedMaxWalletAmount(maxWallet);
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply.");
require(newAmount <= totalSupply() * 1 / 1000, "Swap amount cannot be higher than 0.1% total supply.");
swapTokensAtAmount = newAmount;
}
function _excludeFromMaxTransaction(address updAds, bool isExcluded) private {
_isExcludedMaxTransactionAmount[updAds] = isExcluded;
emit MaxTransactionExclusion(updAds, isExcluded);
}
function airdropToWallets(address[] memory wallets, uint256[] memory amountsInTokens) external onlyOwner {
require(wallets.length == amountsInTokens.length, "arrays must be the same length");
require(wallets.length < 300, "Can only airdrop 300 wallets per txn due to gas limits"); // allows for airdrop + launch at the same exact time, reducing delays and reducing sniper input.
for(uint256 i = 0; i < wallets.length; i++){
address wallet = wallets[i];
uint256 amount = amountsInTokens[i];
super._transfer(msg.sender, wallet, amount);
}
}
function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner {
if(!isEx){
require(updAds != lpPair, "Cannot remove uniswap pair from max txn");
}
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {
require(pair != lpPair, "The pair cannot be removed from automatedMarketMakerPairs");
_setAutomatedMarketMakerPair(pair, value);
emit SetAutomatedMarketMakerPair(pair, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
automatedMarketMakerPairs[pair] = value;
_excludeFromMaxTransaction(pair, value);
emit SetAutomatedMarketMakerPair(pair, value);
}
function updateBuyFees(uint256 _operationsFee, uint256 _liquidityFee, uint256 _devFee) external onlyOwner {
buyOperationsFee = _operationsFee;
buyLiquidityFee = _liquidityFee;
buyDevFee = _devFee;
buyTotalFees = buyOperationsFee + buyLiquidityFee + buyDevFee;
require(buyTotalFees <= 15 * FEE_DIVISOR / 100, "Must keep fees at 15% or less");
}
function updateSellFees(uint256 _operationsFee, uint256 _liquidityFee, uint256 _devFee) external onlyOwner {
sellOperationsFee = _operationsFee;
sellLiquidityFee = _liquidityFee;
sellDevFee = _devFee;
sellTotalFees = sellOperationsFee + sellLiquidityFee + sellDevFee;
require(sellTotalFees <= 20 * FEE_DIVISOR / 100, "Must keep fees at 20% or less");
}
function massExcludeFromFees(address[] calldata accounts, bool excluded) external onlyOwner {
for(uint256 i = 0; i < accounts.length; i++){
_isExcludedFromFees[accounts[i]] = excluded;
emit ExcludeFromFees(accounts[i], excluded);
}
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function _transfer(address from, address to, uint256 amount) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "amount must be greater than 0");
if(!tradingActive){
require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active.");
}
if(tradingActive){
require((!boughtEarly[from] && !boughtEarly[to]) || to == owner() || to == address(0xdead), "Bots cannot transfer tokens in or out except to owner or dead address.");
}
if(limitsInEffect){
if (from != owner() && to != owner() && to != address(0) && to != address(0xdead) && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]){
// at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
if (transferDelayEnabled){
if (to != address(dexRouter) && to != address(lpPair)){
require(_holderLastTransferTimestamp[tx.origin] < block.number - 2 && _holderLastTransferTimestamp[to] < block.number - 2, "_transfer:: Transfer Delay enabled. Try again later.");
_holderLastTransferTimestamp[tx.origin] = block.number;
_holderLastTransferTimestamp[to] = block.number;
}
}
//when buy
if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) {
require(amount <= maxBuyAmount, "Buy transfer amount exceeds the max buy.");
require(amount + balanceOf(to) <= maxWallet, "Max Wallet Exceeded");
}
//when sell
else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {
require(amount <= maxSellAmount, "Sell transfer amount exceeds the max sell.");
} else if (!_isExcludedMaxTransactionAmount[to]){
require(amount + balanceOf(to) <= maxWallet, "Max Wallet Exceeded");
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if(canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) {
swapping = true;
swapBack();
swapping = false;
}
if(!swapping && automatedMarketMakerPairs[to] && lpBurnEnabled && block.timestamp >= lastLpBurnTime + lpBurnFrequency && !_isExcludedFromFees[from]){
autoBurnLiquidityPairTokens();
}
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
if(customLiquidityActive && tradingActive && !swapping){
latestEthPrice = uint256(priceFeed.latestAnswer());
setCustomFees();
}
// only take fees on buys/sells, do not take on wallet transfers
if(takeFee){
// bot/sniper penalty.
if(earlyBuyPenaltyInEffect() && automatedMarketMakerPairs[from] && !automatedMarketMakerPairs[to] && !_isExcludedFromFees[to] && buyTotalFees > 0){
if(!earlyBuyPenaltyInEffect()){
// reduce by 1 wei per max buy over what Uniswap will allow to revert bots as best as possible to limit erroneously blacklisted wallets. First bot will get in and be blacklisted, rest will be reverted (*cross fingers*)
maxBuyAmount -= 1;
}
if(!boughtEarly[to]){
boughtEarly[to] = true;
botsCaught += 1;
earlyBuyers.push(to);
emit CaughtEarlyBuyer(to);
}
fees = amount * buyTotalFees / FEE_DIVISOR;
tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees;
tokensForOperations += fees * buyOperationsFee / buyTotalFees;
tokensForDev += fees * buyDevFee / buyTotalFees;
}
// on sell
else if (automatedMarketMakerPairs[to] && sellTotalFees > 0){
fees = amount * sellTotalFees / FEE_DIVISOR;
tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees;
tokensForOperations += fees * sellOperationsFee / sellTotalFees;
tokensForDev += fees * sellDevFee / sellTotalFees;
}
// on buy
else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = amount * buyTotalFees / FEE_DIVISOR;
tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees;
tokensForOperations += fees * buyOperationsFee / buyTotalFees;
tokensForDev += fees * buyDevFee / buyTotalFees;
}
if(fees > 0){
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function earlyBuyPenaltyInEffect() public view returns (bool){
return block.number < blockForPenaltyEnd;
}
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] = dexRouter.WETH();
_approve(address(this), address(dexRouter), tokenAmount);
// make the swap
dexRouter.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(dexRouter), tokenAmount);
// add the liquidity
dexRouter.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 + tokensForOperations + tokensForDev;
if(contractBalance == 0 || totalTokensToSwap == 0) {return;}
if(contractBalance > swapTokensAtAmount * 20){
contractBalance = swapTokensAtAmount * 20;
}
bool success;
// Halve the amount of liquidity tokens
uint256 liquidityTokens = contractBalance * tokensForLiquidity / totalTokensToSwap / 2;
swapTokensForEth(contractBalance - liquidityTokens);
uint256 ethBalance = address(this).balance;
uint256 ethForLiquidity = ethBalance;
uint256 ethForOperations = ethBalance * tokensForOperations / (totalTokensToSwap - (tokensForLiquidity/2));
uint256 ethForDev = ethBalance * tokensForDev / (totalTokensToSwap - (tokensForLiquidity/2));
ethForLiquidity -= ethForOperations + ethForDev;
tokensForLiquidity = 0;
tokensForOperations = 0;
tokensForDev = 0;
if(liquidityTokens > 0 && ethForLiquidity > 0){
addLiquidity(liquidityTokens, ethForLiquidity);
}
(success,) = address(devAddress).call{value: ethForDev}("");
(success,) = address(operationsAddress).call{value: address(this).balance}("");
}
function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) {
require(_token != address(0), "_token address cannot be 0");
require(_token != address(this) || !tradingActive, "Can't withdraw native tokens while trading is active");
uint256 _contractBalance = IERC20(_token).balanceOf(address(this));
_sent = IERC20(_token).transfer(_to, _contractBalance);
emit TransferForeignToken(_token, _contractBalance);
}
// withdraw ETH if stuck or someone sends to the address
function withdrawStuckETH() external onlyOwner {
bool success;
(success,) = address(msg.sender).call{value: address(this).balance}("");
}
function setOperationsAddress(address _operationsAddress) external onlyOwner {
require(_operationsAddress != address(0), "_operationsAddress address cannot be 0");
operationsAddress = payable(_operationsAddress);
emit UpdatedOperationsAddress(_operationsAddress);
}
function setDevAddress(address _devAddress) external onlyOwner {
require(_devAddress != address(0), "_operationsAddress address cannot be 0");
devAddress = payable(_devAddress);
emit UpdatedDevAddress(_devAddress);
}
// force Swap back if slippage issues.
function forceSwapBack() external onlyOwner {
require(balanceOf(address(this)) >= swapTokensAtAmount, "Can only swap when token amount is at or higher than restriction");
swapping = true;
swapBack();
swapping = false;
emit OwnerForcedSwapBack(block.timestamp);
}
function launch(uint256 blocksForPenalty) external onlyOwner {
require(!tradingActive, "Trading is already active, cannot relaunch.");
lpPair = IDexFactory(dexRouter.factory()).createPair(address(this), dexRouter.WETH());
_excludeFromMaxTransaction(address(lpPair), true);
_setAutomatedMarketMakerPair(address(lpPair), true);
require(address(this).balance > 0, "Must have ETH on contract to launch");
require(balanceOf(address(this)) > 0, "Must have Tokens on contract to launch");
_approve(address(this), address(dexRouter), balanceOf(address(this)));
dexRouter.addLiquidityETH{value: address(this).balance}(
address(this),
balanceOf(address(this)),
0, // slippage is unavoidable
0, // slippage is unavoidable
address(futureOwner),
block.timestamp
);
latestEthPrice = uint256(priceFeed.latestAnswer());
//standard enable trading
tradingActive = true;
swapEnabled = true;
tradingActiveBlock = block.number;
blockForPenaltyEnd = tradingActiveBlock + blocksForPenalty;
emit EnabledTrading();
}
function setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner {
require(_frequencyInSeconds >= 3600, "cannot set buyback more often than every 10 minutes");
require(_percent <= 1000 && _percent >= 0, "Must set auto LP burn percent between 0% and 10%");
lpBurnFrequency = _frequencyInSeconds;
percentForLPBurn = _percent;
lpBurnEnabled = _Enabled;
}
function autoBurnLiquidityPairTokens() internal {
lastLpBurnTime = block.timestamp;
lastManualLpBurnTime = block.timestamp;
uint256 lpBalance = IERC20(lpPair).balanceOf(address(this));
uint256 tokenBalance = balanceOf(address(this));
uint256 lpAmount = lpBalance * percentForLPBurn / 10000;
uint256 initialEthBalance = address(this).balance;
// approve token transfer to cover all possible scenarios
IERC20(lpPair).approve(address(dexRouter), lpAmount);
// remove the liquidity
dexRouter.removeLiquidityETH(
address(this),
lpAmount,
1, // slippage is unavoidable
1, // slippage is unavoidable
address(this),
block.timestamp
);
uint256 deltaTokenBalance = balanceOf(address(this)) - tokenBalance;
if(deltaTokenBalance > 0){
super._transfer(address(this), address(0xdead), deltaTokenBalance);
}
uint256 deltaEthBalance = address(this).balance - initialEthBalance;
if(deltaEthBalance > 0){
buyBackTokens(deltaEthBalance);
}
emit AutoBurnLP(lpAmount);
}
function manualBurnLiquidityPairTokens(uint256 percent) external onlyOwner {
require(percent <= 5000, "May not burn more than 50% of contract's LP at a time");
require(lastManualLpBurnTime <= block.timestamp - manualBurnFrequency, "Burn too soon");
lastManualLpBurnTime = block.timestamp;
uint256 lpBalance = IERC20(lpPair).balanceOf(address(this));
uint256 tokenBalance = balanceOf(address(this));
uint256 lpAmount = lpBalance * percent / 10000;
uint256 initialEthBalance = address(this).balance;
// approve token transfer to cover all possible scenarios
IERC20(lpPair).approve(address(dexRouter), lpAmount);
// remove the liquidity
dexRouter.removeLiquidityETH(
address(this),
lpAmount,
1, // slippage is unavoidable
1, // slippage is unavoidable
address(this),
block.timestamp
);
uint256 deltaTokenBalance = balanceOf(address(this)) - tokenBalance;
if(deltaTokenBalance > 0){
super._transfer(address(this), address(0xdead), deltaTokenBalance);
}
uint256 deltaEthBalance = address(this).balance - initialEthBalance;
if(deltaEthBalance > 0){
buyBackTokens(deltaEthBalance);
}
emit ManualBurnLP(lpAmount);
}
function buyBackTokens(uint256 amountInWei) internal {
address[] memory path = new address[](2);
path[0] = dexRouter.WETH();
path[1] = address(this);
dexRouter.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amountInWei}(
0,
path,
address(0xdead),
block.timestamp
);
}
function getMcap() public view returns (uint256){
return (IERC20(dexRouter.WETH()).balanceOf(address(lpPair)) * 1e18 * latestEthPrice / balanceOf(address(lpPair)) * (totalSupply()-balanceOf(address(0xdead))) / 1e18 / 1e8);
}
function customLiquiditySettings(bool _customLiquidityActive, uint256 _minimumBuyLiqPerc, uint256 _maximumBuyLiqPerc, uint256 _minimumSellLiqPerc, uint256 _maximumSellLiqPerc, uint256 _mcapComparisonValue) external onlyOwner {
require(_minimumBuyLiqPerc <= 100 && _maximumBuyLiqPerc <= 100 && _minimumBuyLiqPerc <= _maximumBuyLiqPerc, "Buy settings incorrect");
require(_minimumSellLiqPerc <= 100 && _maximumSellLiqPerc <= 100 && _minimumSellLiqPerc <= _maximumSellLiqPerc, "Sell settings incorrect");
customLiquidityActive = _customLiquidityActive;
minimumBuyLiqPerc = _minimumBuyLiqPerc;
maximumBuyLiqPerc = _maximumBuyLiqPerc;
minimumSellLiqPerc = _minimumSellLiqPerc;
maximumSellLiqPerc = _maximumSellLiqPerc;
mcapComparisonValue = _mcapComparisonValue;
}
function setCustomFees() internal {
uint256 mcap = getMcap();
uint256 newLiquidityPercBuy = (mcap / mcapComparisonValue) * maximumBuyLiqPerc / 1e18 + minimumBuyLiqPerc;
uint256 newLiquidityPercSell = (mcap / mcapComparisonValue) * maximumSellLiqPerc / 1e18 + minimumSellLiqPerc;
if(newLiquidityPercBuy > maximumBuyLiqPerc){
newLiquidityPercBuy = maximumBuyLiqPerc;
}
if(newLiquidityPercSell > maximumSellLiqPerc){
newLiquidityPercSell = maximumSellLiqPerc;
}
buyLiquidityFee = buyTotalFees * newLiquidityPercBuy / 100;
buyOperationsFee = (buyTotalFees - buyLiquidityFee) * 33 / 100;
buyDevFee = buyTotalFees - buyOperationsFee - buyLiquidityFee;
sellLiquidityFee = sellTotalFees * newLiquidityPercSell / 100;
sellOperationsFee = (sellTotalFees - sellLiquidityFee) * 50 / 100;
sellDevFee = sellTotalFees - sellOperationsFee - sellLiquidityFee;
}
}
Read Contract
FEE_DIVISOR 0x9e93ad8e → uint256
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
blockForPenaltyEnd 0xa62068ce → uint256
botsCaught 0x6b0a894c → uint256
boughtEarly 0x85ecfd28 → bool
buyDevFee 0x9c3b4fdc → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyOperationsFee 0x5a139dd4 → uint256
buyTotalFees 0xd85ba063 → uint256
customLiquidityActive 0x1708da75 → bool
decimals 0x313ce567 → uint8
devAddress 0x3ad10ef6 → address
dexRouter 0x0758d924 → address
earlyBuyPenaltyInEffect 0x58a6d531 → bool
earlyBuyers 0xeb472fc4 → address
futureOwner 0xb9e9d1aa → address
getEarlyBuyers 0x9a5bd2dd → address[]
getMcap 0xc077ab4b → uint256
lastLpBurnTime 0xa4c82a00 → uint256
lastManualLpBurnTime 0x9ec22c0e → uint256
latestEthPrice 0x42088f1e → uint256
limitsInEffect 0x4a62bb65 → bool
lpBurnEnabled 0x2e82f1a0 → bool
lpBurnFrequency 0x2c3e486c → uint256
lpPair 0x452ed4f1 → address
manualBurnFrequency 0x184c16c5 → uint256
maxBuyAmount 0x88e765ff → uint256
maxSellAmount 0x66d602ae → uint256
maxWallet 0xf8b45b05 → uint256
maximumBuyLiqPerc 0xf5f4a97d → uint256
maximumSellLiqPerc 0xd0e7d33f → uint256
mcapComparisonValue 0x0d3141e0 → uint256
minimumBuyLiqPerc 0x046f9c3f → uint256
minimumSellLiqPerc 0xe1ade1fe → uint256
name 0x06fdde03 → string
operationsAddress 0xea4cfe12 → address
owner 0x8da5cb5b → address
percentForLPBurn 0x199ffc72 → uint256
sellDevFee 0xa0d82dc5 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellOperationsFee 0x4f77f6c0 → uint256
sellTotalFees 0x6a486a8e → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
tokensForDev 0x9fccce32 → uint256
tokensForLiquidity 0x1a8145bb → uint256
tokensForOperations 0xfb002c97 → uint256
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
tradingActiveBlock 0xee40166e → uint256
transferDelayEnabled 0xc876d0b9 → bool
Write Contract 32 functions
These functions modify contract state and require a wallet transaction to execute.
airdropToWallets 0x2307b441
address[] wallets
uint256[] amountsInTokens
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
customLiquiditySettings 0xb3e4c179
bool _customLiquidityActive
uint256 _minimumBuyLiqPerc
uint256 _maximumBuyLiqPerc
uint256 _minimumSellLiqPerc
uint256 _maximumSellLiqPerc
uint256 _mcapComparisonValue
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
disableTransferDelay 0xe884f260
No parameters
enableTrading 0x2f1ffebf
uint256 blocksForPenalty
address _lpPair
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
forceSwapBack 0x51f205e4
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
launch 0x85b12c7c
uint256 blocksForPenalty
manualBurnLiquidityPairTokens 0xfe72b27a
uint256 percent
massExcludeFromFees 0xbd5fb920
address[] accounts
bool excluded
massManageRestrictedWallets 0x552fd148
address[] accounts
bool restricted
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
setAutoLPBurnSettings 0x730c1888
uint256 _frequencyInSeconds
uint256 _percent
bool _Enabled
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
setCustomLiquidityActive 0x0d3cbb22
bool active
setDevAddress 0xd0d41fe1
address _devAddress
setOperationsAddress 0x499b8394
address _operationsAddress
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferForeignToken 0x8366e79a
address _token
address _to
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x8095d564
uint256 _operationsFee
uint256 _liquidityFee
uint256 _devFee
updateMaxBuyAmount 0x2be32b61
uint256 newNum
updateMaxSellAmount 0xdc3f0d0f
uint256 newNum
updateMaxWalletAmount 0xc18bc195
uint256 newNum
updateSellFees 0xc17b5b8c
uint256 _operationsFee
uint256 _liquidityFee
uint256 _devFee
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
withdrawStuckETH 0xf5648a4f
No parameters
Recent Transactions
No transactions found for this address