Address Contract Partially Verified
Address
0xe5Db2c3E2CEFf742E5306bCfc12622f5e2d14e98
Balance
0.904170 ETH ($1773.24)
Nonce
1
Code Size
11400 bytes
Creator
0xAcfE101c...5481 at tx 0xcc3d3863...9e1904
Indexed Transactions
0
Contract Bytecode
11400 bytes
0x60806040526004361061031e5760003560e01c806375722434116101ab578063a457c2d7116100f7578063ce404b2311610095578063dd4670641161006f578063dd46706414610893578063dd62ed3e146108b3578063e57f14e1146108f9578063f2fde38b1461091957600080fd5b8063ce404b231461083e578063d3b5be1a14610853578063d82e39621461087357600080fd5b8063af3e2122116100d1578063af3e212214610454578063b47fd563146107e6578063b88a802f14610813578063c816e4b61461082857600080fd5b8063a457c2d714610791578063a69df4b5146107b1578063a9059cbb146107c657600080fd5b80638da5cb5b1161016457806392ca1e8d1161013e57806392ca1e8d1461073157806395d89b4114610746578063966f41a21461075b5780639c21a9b81461077b57600080fd5b80638da5cb5b146106d55780638ea5220f146106f3578063902d55a51461071357600080fd5b8063757224341461063057806375f0a8741461064a5780637b5db6611461066a5780637cd09f921461068a5780638263a8d61461069f57806389b6e25e146106b557600080fd5b8063436a88c11161026a578063602bc62b1161022357806370a08231116101fd57806370a08231146105c5578063715018a6146105e55780637217f4bc146105fa57806372ba4df51461061057600080fd5b8063602bc62b1461057057806365b8dbc0146105855780636b292d37146105a557600080fd5b8063436a88c11461045457806349bd5a5e146104da5780635007de651461050e57806353adf85c14610528578063557ed1ba1461053d5780635907bd191461055057600080fd5b80632116a4ae116102d7578063313ce567116102b1578063313ce56714610469578063368f5bd514610485578063395093511461049a5780634116d15d146104ba57600080fd5b80632116a4ae1461041457806323b872dd146104345780632d17f2691461045457600080fd5b80630496a34d1461032a57806306fdde031461034c578063095ea7b3146103775780631694505e146103a757806318160ddd146103df5780631faaddf3146103fe57600080fd5b3661032557005b600080fd5b34801561033657600080fd5b5061034a6103453660046128c2565b610939565b005b34801561035857600080fd5b5061036161099f565b60405161036e91906128f2565b60405180910390f35b34801561038357600080fd5b50610397610392366004612829565b610a31565b604051901515815260200161036e565b3480156103b357600080fd5b506009546103c7906001600160a01b031681565b6040516001600160a01b03909116815260200161036e565b3480156103eb57600080fd5b506002545b60405190815260200161036e565b34801561040a57600080fd5b506103f060115481565b34801561042057600080fd5b5061039761042f3660046128c2565b610a48565b34801561044057600080fd5b5061039761044f3660046127e9565b610a83565b34801561046057600080fd5b506103f0601981565b34801561047557600080fd5b506040516009815260200161036e565b34801561049157600080fd5b5061034a610aec565b3480156104a657600080fd5b506103976104b5366004612829565b610b25565b3480156104c657600080fd5b5061034a6104d53660046128c2565b610b5b565b3480156104e657600080fd5b506103c77f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c8181565b34801561051a57600080fd5b50600b546103979060ff1681565b34801561053457600080fd5b5061034a610bb8565b34801561054957600080fd5b50426103f0565b34801561055c57600080fd5b5061034a61056b3660046128c2565b610bee565b34801561057c57600080fd5b506007546103f0565b34801561059157600080fd5b5061034a6105a0366004612779565b610c4b565b3480156105b157600080fd5b5061034a6105c0366004612779565b610d41565b3480156105d157600080fd5b506103f06105e0366004612779565b610d8d565b3480156105f157600080fd5b5061034a610da8565b34801561060657600080fd5b506103f060195481565b34801561061c57600080fd5b5061034a61062b366004612779565b610e0a565b34801561063c57600080fd5b506017546103979060ff1681565b34801561065657600080fd5b506013546103c7906001600160a01b031681565b34801561067657600080fd5b506103f06106853660046128c2565b610e55565b34801561069657600080fd5b5061034a6111ab565b3480156106ab57600080fd5b506103f060165481565b3480156106c157600080fd5b5061034a6106d03660046128c2565b6111e4565b3480156106e157600080fd5b506005546001600160a01b03166103c7565b3480156106ff57600080fd5b506012546103c7906001600160a01b031681565b34801561071f57600080fd5b506103f0691d02c8edfee423a0000081565b34801561073d57600080fd5b506103f0611213565b34801561075257600080fd5b5061036161122c565b34801561076757600080fd5b5061034a610776366004612854565b61123b565b34801561078757600080fd5b506103f0600c5481565b34801561079d57600080fd5b506103976107ac366004612829565b6112a5565b3480156107bd57600080fd5b5061034a6112f4565b3480156107d257600080fd5b506103976107e1366004612829565b6113fc565b3480156107f257600080fd5b506103f0610801366004612779565b60186020526000908152604090205481565b34801561081f57600080fd5b5061034a611409565b34801561083457600080fd5b506103f0600a5481565b34801561084a57600080fd5b5061034a61168f565b34801561085f57600080fd5b5061034a61086e3660046128c2565b6116c5565b34801561087f57600080fd5b506103f061088e366004612779565b611722565b34801561089f57600080fd5b5061034a6108ae3660046128c2565b6117a6565b3480156108bf57600080fd5b506103f06108ce3660046127b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561090557600080fd5b5061034a610914366004612779565b61182b565b34801561092557600080fd5b5061034a610934366004612779565b611879565b6005546001600160a01b0316331461096c5760405162461bcd60e51b815260040161096390612988565b60405180910390fd5b60165460405182907f45f855674a81ee4a043e3eadaffb44a6e1f0df2ef0c510f52ff5d2cc7dbc969490600090a3601655565b6060600380546109ae90612b56565b80601f01602080910402602001604051908101604052809291908181526020018280546109da90612b56565b8015610a275780601f106109fc57610100808354040283529160200191610a27565b820191906000526020600020905b815481529060010190602001808311610a0a57829003601f168201915b5050505050905090565b6000610a3e3384846119b8565b5060015b92915050565b6005546000906001600160a01b03163314610a755760405162461bcd60e51b815260040161096390612988565b50600c81905560015b919050565b6000610a90848484611add565b610ae28433610add85604051806060016040528060288152602001612be6602891396001600160a01b038a16600090815260016020908152604080832033845290915290205491906120df565b6119b8565b5060019392505050565b6005546001600160a01b03163314610b165760405162461bcd60e51b815260040161096390612988565b6010805460ff19166001179055565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a3e918590610add9086611952565b6005546001600160a01b03163314610b855760405162461bcd60e51b815260040161096390612988565b60115460405182907f3e598abbf839fb9f42cbf366b55a140e583506553980c23c68379f3566c5859d90600090a3601155565b6005546001600160a01b03163314610be25760405162461bcd60e51b815260040161096390612988565b600b805460ff19169055565b6005546001600160a01b03163314610c185760405162461bcd60e51b815260040161096390612988565b60195460405182907fe7cda9606ff2f769167fdf0eb6c612cddb2317d2808071755beebedd723cd3a690600090a3601955565b6005546001600160a01b03163314610c755760405162461bcd60e51b815260040161096390612988565b6009546001600160a01b0382811691161415610ce45760405162461bcd60e51b815260206004820152602860248201527f434c543a2054686520726f7574657220616c7265616479206861732074686174604482015267206164647265737360c01b6064820152608401610963565b6009546040516001600160a01b03918216918316907fcd2acde3ae4de754da8074077404027fae40be67d89638ee1ceca2427883da7d90600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610d6b5760405162461bcd60e51b815260040161096390612988565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b031660009081526020819052604090205490565b6005546001600160a01b03163314610dd25760405162461bcd60e51b815260040161096390612988565b6005546040516000916001600160a01b031690600080516020612c0e833981519152908390a3600580546001600160a01b0319169055565b6005546001600160a01b03163314610e345760405162461bcd60e51b815260040161096390612988565b6001600160a01b03166000908152601560205260409020805460ff19169055565b60175460009060ff1615610e6b57506000919050565b60007f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c8190506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610ecb57600080fd5b505afa158015610edf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f039190612795565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610f4057600080fd5b505afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190612795565b90506000806001600160a01b03841630141561101557846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610fc757600080fd5b505afa158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff9190612874565b506001600160701b0390811693501690506110a9565b6001600160a01b0383163014156110a957846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612874565b506001600160701b0391821693501690505b811580156110b5575080155b156110c7575060009695505050505050565b6009546040516385f8c25960e01b81526004810189905260248101849052604481018390526000916001600160a01b0316906385f8c2599060640160206040518083038186803b15801561111a57600080fd5b505afa15801561112e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115291906128da565b905060008361117761271061117161116a8487612119565b8890612119565b9061215b565b6111819190612b00565b9050601654811061119c575050601154979650505050505050565b50600098975050505050505050565b6005546001600160a01b031633146111d55760405162461bcd60e51b815260040161096390612988565b600b805460ff19166001179055565b6005546001600160a01b0316331461120e5760405162461bcd60e51b815260040161096390612988565b600a55565b601961121f8180612ae8565b6112299190612ae8565b81565b6060600480546109ae90612b56565b6005546001600160a01b031633146112655760405162461bcd60e51b815260040161096390612988565b604051811515907f55c19e5f01f19b1320171e8b80e3926c38efd7f66c3ef89f45defdf6c2122b7b90600090a26017805460ff1916911515919091179055565b6000610a3e3384610add85604051806060016040528060258152602001612c2e602591393360009081526001602090815260408083206001600160a01b038d16845290915290205491906120df565b6006546001600160a01b0316331461135a5760405162461bcd60e51b815260206004820152602360248201527f596f7520646f6e27742068617665207065726d697373696f6e20746f20756e6c6044820152626f636b60e81b6064820152608401610963565b60075442116113ab5760405162461bcd60e51b815260206004820152601f60248201527f436f6e7472616374206973206c6f636b656420756e74696c20372064617973006044820152606401610963565b6006546005546040516001600160a01b039283169290911690600080516020612c0e83398151915290600090a3600654600580546001600160a01b0319166001600160a01b03909216919091179055565b6000610a3e338484611add565b3233146114585760405162461bcd60e51b815260206004820152601b60248201527f697348756d616e3a3a20736f7272792068756d616e73206f6e6c7900000000006044820152606401610963565b600260085414156114ab5760405162461bcd60e51b815260206004820152601d60248201527f6e6f6e5265656e7472616e743a3a207265656e7472616e742063616c6c0000006044820152606401610963565b6002600855336000908152601860205260409020544210156115195760405162461bcd60e51b815260206004820152602160248201527f4572726f723a206e65787420617661696c61626c65206e6f74207265616368656044820152601960fa1b6064820152608401610963565b600061152433610d8d565b10156115805760405162461bcd60e51b815260206004820152602560248201527f4572726f723a206d757374206f776e20746f6b656e20746f20636c61696d2072604482015264195dd85c9960da1b6064820152608401610963565b600061158b33611722565b90506019544261159b9190612ae8565b33600081815260186020908152604091829020849055815192835282018490528101919091527f25aee98a65c97a4eccb09abe48315f60cd987890080434e094a7fca39a3d84689060600160405180910390a1604051600090339083908381818185875af1925050503d8060008114611630576040519150601f19603f3d011682016040523d82523d6000602084013e611635565b606091505b50509050806116865760405162461bcd60e51b815260206004820152601d60248201527f4572726f723a2043616e6e6f74207769746864726177207265776172640000006044820152606401610963565b50506001600855565b6005546001600160a01b031633146116b95760405162461bcd60e51b815260040161096390612988565b6010805460ff19169055565b6005546001600160a01b031633146116ef5760405162461bcd60e51b815260040161096390612988565b600a5460405182907fcdadd717dc9ee3550a289071d1af75e229726888d51e3a31c9e3dfc693d4852b90600090a3600a55565b6000806117766117517f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c81610d8d565b61177061175f61dead610d8d565b61177061176c6000610d8d565b6002545b90612119565b905047600061178485610d8d565b9050600061179c84611796858561215b565b906121da565b9695505050505050565b6005546001600160a01b031633146117d05760405162461bcd60e51b815260040161096390612988565b60058054600680546001600160a01b03199081166001600160a01b038416179091551690556117ff8142612ae8565b6007556005546040516000916001600160a01b031690600080516020612c0e833981519152908390a350565b6005546001600160a01b031633146118555760405162461bcd60e51b815260040161096390612988565b6001600160a01b03166000908152601560205260409020805460ff19166001179055565b6005546001600160a01b031633146118a35760405162461bcd60e51b815260040161096390612988565b6001600160a01b0381166119085760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610963565b6005546040516001600160a01b03808416921690600080516020612c0e83398151915290600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b60008061195f8385612ae8565b9050838110156119b15760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610963565b9392505050565b6001600160a01b038316611a1a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610963565b6001600160a01b038216611a7b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610963565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316611b035760405162461bcd60e51b8152600401610963906129bd565b6001600160a01b038216611b295760405162461bcd60e51b815260040161096390612945565b80611b3f57611b3a8383600061221c565b505050565b600b5460ff168015611b545750601b5460ff16155b15611e38577f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c816001600160a01b0316836001600160a01b03161415611c8b576001600160a01b0382166000908152600f6020526040812054600114611bba576001611bbd565b60025b60ff16905042611bfa611bdb83600c5461215b90919063ffffffff16565b6001600160a01b0386166000908152600d602052604090205490611952565b111580611c1f57506001600160a01b03831660009081526015602052604090205460ff165b611c3b5760405162461bcd60e51b815260040161096390612a02565b6001600160a01b0383166000908152600d60209081526040808320429055600f909152902054611c6c906001612ae8565b6001600160a01b0384166000908152600f602052604090205550611e38565b7f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c816001600160a01b0316826001600160a01b03161415611dc1576001600160a01b0383166000908152600e6020526040812054600114611cec576001611cef565b60025b60ff16905042611d2c611d0d83600c5461215b90919063ffffffff16565b6001600160a01b0387166000908152600d602052604090205490611952565b111580611d5157506001600160a01b03841660009081526015602052604090205460ff165b611d6d5760405162461bcd60e51b815260040161096390612a02565b6001600160a01b038085166000908152600d602090815260408083204290559286168252600e90522054611da2906001612ae8565b6001600160a01b0384166000908152600e602052604090205550611e38565b42611ddb611bdb6002600c5461215b90919063ffffffff16565b111580611e0057506001600160a01b03831660009081526015602052604090205460ff165b611e1c5760405162461bcd60e51b815260040161096390612a02565b6001600160a01b0383166000908152600d602052604090204290555b6014546001600160a01b0384811691161415611e7457611e5a42611c20612ae8565b6001600160a01b0383166000908152600d60205260409020555b6000611e7f30610d8d565b600a5490915081108015908190611ec857507f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c816001600160a01b0316856001600160a01b031614155b15611ed657611ed682612325565b60007f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c816001600160a01b0316856001600160a01b0316148015611f3257506001600160a01b03861660009081526015602052604090205460ff16155b80611f9257507f00000000000000000000000057cd855ff9106bcf8a0943156cc43b1075ec0c816001600160a01b0316866001600160a01b0316148015611f9257506001600160a01b03851660009081526015602052604090205460ff16155b15611f9b575060015b601b5460ff1615611faa575060005b808015611fb9575060105460ff165b156120c2576000611fd16103e861179687601961215b565b90506000611fe66103e861179688601961215b565b90506000611ffb6103e861179689601961215b565b905060006120126106858361177086818d8a612119565b905060006120266103e86117968b8561215b565b9050600061203a8461177087818e8b612119565b90506120468183612119565b905060006120548b83612119565b90506120608282611952565b8b146120ae5760405162461bcd60e51b815260206004820181905260248201527f434c543a3a7472616e736665723a205461782076616c756520696e76616c69646044820152606401610963565b6120b98d308361221c565b50985050505050505b6120cc8585612482565b6120d786868661221c565b505050505050565b600081848411156121035760405162461bcd60e51b815260040161096391906128f2565b5060006121108486612b3f565b95945050505050565b60006119b183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120df565b60008261216a57506000610a42565b60006121768385612b20565b9050826121838583612b00565b146119b15760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610963565b60006119b183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506125b7565b6001600160a01b0383166122425760405162461bcd60e51b8152600401610963906129bd565b6001600160a01b0382166122685760405162461bcd60e51b815260040161096390612945565b6122a581604051806060016040528060268152602001612bc0602691396001600160a01b03861660009081526020819052604090205491906120df565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546122d49082611952565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611ad0565b601b54479060ff1661247e57601b805460ff19166001179055612347826125e5565b60006123534783612119565b905060006123628260036121da565b9050806000612375826117708682612119565b6013546040519192506001600160a01b0316908290600081818185875af1925050503d80600081146123c3576040519150601f19603f3d011682016040523d82523d6000602084013e6123c8565b606091505b50506012546040516001600160a01b0390911691508390600081818185875af1925050503d8060008114612418576040519150601f19603f3d011682016040523d82523d6000602084013e61241d565b606091505b5050601b805460ff1916905550604080518781526020810186905290810184905260608101839052608081018290527f1f9c80ba93be7c925dc5b9f8017795013223f7f7ba4681e7b91c2e8a108b838f9060a00160405180910390a1505050505b5050565b600061248d83610d8d565b6019546001600160a01b0385166000908152601860205260408120549293509142916124b891612ae8565b10156124da576001600160a01b03841660009081526018602052604090204290555b81156125315760006124f18361179686606461215b565b9050601a54811061252b57600061251860646117968460195461215b90919063ffffffff16565b9050601954811061252857506019545b91505b50612571565b6019546001600160a01b0385166000908152601860205260409020546125579190612ae8565b6001600160a01b0385166000908152601860205260409020555b6001600160a01b038416600090815260186020526040902054612595908290612ae8565b6001600160a01b03909416600090815260186020526040902093909355505050565b600081836125d85760405162461bcd60e51b815260040161096391906128f2565b5060006121108486612b00565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061262857634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600954604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561267c57600080fd5b505afa158015612690573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126b49190612795565b816001815181106126d557634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526009546126fb91309116846119b8565b60095460405163791ac94760e01b81526001600160a01b039091169063791ac94790612734908590600090869030904290600401612a78565b600060405180830381600087803b15801561274e57600080fd5b505af11580156120d7573d6000803e3d6000fd5b80516001600160701b0381168114610a7e57600080fd5b60006020828403121561278a578081fd5b81356119b181612ba7565b6000602082840312156127a6578081fd5b81516119b181612ba7565b600080604083850312156127c3578081fd5b82356127ce81612ba7565b915060208301356127de81612ba7565b809150509250929050565b6000806000606084860312156127fd578081fd5b833561280881612ba7565b9250602084013561281881612ba7565b929592945050506040919091013590565b6000806040838503121561283b578182fd5b823561284681612ba7565b946020939093013593505050565b600060208284031215612865578081fd5b813580151581146119b1578182fd5b600080600060608486031215612888578283fd5b61289184612762565b925061289f60208501612762565b9150604084015163ffffffff811681146128b7578182fd5b809150509250925092565b6000602082840312156128d3578081fd5b5035919050565b6000602082840312156128eb578081fd5b5051919050565b6000602080835283518082850152825b8181101561291e57858101830151858201604001528201612902565b8181111561292f5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526050908201527f5f7472616e736665723a3a205472616e736665722044656c617920656e61626c60408201527f65642e2020506c656173652074727920616761696e206166746572207468652060608201526f747820626c6f636b207061737365737360801b608082015260a00190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015612ac75784516001600160a01b031683529383019391830191600101612aa2565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115612afb57612afb612b91565b500190565b600082612b1b57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612b3a57612b3a612b91565b500290565b600082821015612b5157612b51612b91565b500390565b600181811c90821680612b6a57607f821691505b60208210811415612b8b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b0381168114612bbc57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63658be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e045524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122009d7f201f4f649d7fee978dc4ab1b4ef788146f808bf441d96aa56e2a0c2b6b764736f6c63430008040033
Verified Source Code Partial Match
Compiler: v0.8.4+commit.c7e474f2
EVM: istanbul
Optimization: Yes (200 runs)
ClienteleCoin.sol 1219 lines
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
function getUnlockTime() public view returns (uint256) {
return _lockTime;
}
//Added function
// 1 minute = 60
// 1h 3600
// 24h 86400
// 1w 604800
function getTime() public view returns (uint256) {
return block.timestamp;
}
function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = block.timestamp + time;
emit OwnershipTransferred(_owner, address(0));
}
function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(block.timestamp > _lockTime, "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
}
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() internal {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "nonReentrant:: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
modifier isHuman() {
require(tx.origin == msg.sender, "isHuman:: sorry humans only");
_;
}
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
using SafeMath for uint256;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 9;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
return c;
}
}
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint256);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves()
external
view
returns (
uint112 reserve0,
uint112 reserve1,
uint32 blockTimestampLast
);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to) external returns (uint256 amount0, uint256 amount1);
function swap(
uint256 amount0Out,
uint256 amount1Out,
address to,
bytes calldata data
) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
contract ClienteleCoin is ERC20, Ownable, ReentrancyGuard {
using SafeMath for uint256;
//AMM swap settings
IUniswapV2Router02 public uniswapV2Router;
address public immutable uniswapV2Pair;
uint256 public liquidateTokensAtAmount = 1000 * (10**9);
//Token info
uint256 public constant TOTAL_SUPPLY = 137000000000000 * (10**9);
//Transfer delay info
bool public TDEnabled = false;
uint256 public TD = 30 minutes;
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
mapping(address => uint256) private _soldTimes;
mapping(address => uint256) private _boughtTimes;
//Tax info
bool _feesEnabled = true;
uint256 public constant ETH_REWARDS_FEE = 25;
uint256 public constant MARKETING_FEE = 25;
uint256 public constant DEV_FEE = 25;
uint256 public impactFee = 200;
uint256 public constant TOTAL_FEES = ETH_REWARDS_FEE + MARKETING_FEE + DEV_FEE;
address public devWallet = 0x395DA634618C39675b560Aa5d321966672D6DC71;
address public marketingWallet = 0xD7F7e7C412824C6f4F107453068e7c8062B0B488;
address private _airdropAddress = 0xAcfE101cA7E2bc9Ee6a76Deaa9Bc6C9DAb0b5481;
mapping(address => bool) private _isExcludedFromFees;
uint256 public impactThreshold = 50;
bool public priceImpactFeeDisabled = true;
// Claiming info
mapping(address => uint256) public nextAvailableClaimDate;
uint256 public rewardCycleBlock = 2 days;
uint256 threshHoldTopUpRate = 2;
bool private liquidating = false;
event UpdatedUniswapV2Router(address indexed newAddress, address indexed oldAddress);
event CycleBlockUpdated(uint256 indexed newBlock, uint256 indexed OldBlock);
event ImpactFeeUpdated(uint256 indexed newFee, uint256 indexed oldFee);
event ThresholdFeeUpdated(uint256 indexed newThreshold, uint256 indexed oldThreshold);
event ImpactFeeDisableUpdated(bool indexed value);
event LiquidationThresholdUpdated(uint256 indexed newValue, uint256 indexed oldValue);
event TaxDistributed(uint256 tokensSwapped, uint256 ethReceived, uint256 rewardPoolGot, uint256 devGot, uint256 marketingGot);
event ClaimSuccessfully(address recipient, uint256 ethReceived, uint256 nextAvailableClaimDate);
constructor(address routerAddress) ERC20("ClienteleCoin", "CLT") {
//set amm info
IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(routerAddress);
address _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
uniswapV2Router = _uniswapV2Router;
uniswapV2Pair = _uniswapV2Pair;
// exclude from paying fees or having max transaction amount
excludeFromFees(owner());
excludeFromFees(address(this));
// mint tokens
_mint(owner(), TOTAL_SUPPLY);
}
receive() external payable {}
function updateUniswapV2Router(address newAddress) public onlyOwner {
require(newAddress != address(uniswapV2Router), "CLT: The router already has that address");
emit UpdatedUniswapV2Router(newAddress, address(uniswapV2Router));
uniswapV2Router = IUniswapV2Router02(newAddress);
}
function enableFees() public onlyOwner {
_feesEnabled = true;
}
function disableFees() public onlyOwner {
_feesEnabled = false;
}
function updateliquidateTokensAtAmount(uint256 newValue) public onlyOwner {
liquidateTokensAtAmount = newValue;
}
function updateAirdropAddress(address airdropAddress) public onlyOwner {
_airdropAddress = airdropAddress;
}
function updateRewardCycleBlock(uint256 newBlock) public onlyOwner {
emit CycleBlockUpdated(newBlock, rewardCycleBlock);
rewardCycleBlock = newBlock;
}
function updateImpactThreshold(uint256 newValue) public onlyOwner {
emit ThresholdFeeUpdated(newValue, impactThreshold);
impactThreshold = newValue;
}
function updateImpactFee(uint256 newValue) public onlyOwner {
emit ImpactFeeUpdated(newValue, impactFee);
impactFee = newValue;
}
function updateImpactFeeDisabled(bool newValue) public onlyOwner {
emit ImpactFeeDisableUpdated(newValue);
priceImpactFeeDisabled = newValue;
}
function excludeFromFees(address account) public onlyOwner {
_isExcludedFromFees[account] = true;
}
function includeToFees(address account) public onlyOwner {
_isExcludedFromFees[account] = false;
}
function updateLiquidationThreshold(uint256 newValue) external onlyOwner {
emit LiquidationThresholdUpdated(newValue, liquidateTokensAtAmount);
liquidateTokensAtAmount = newValue;
}
function activateTD() external onlyOwner {
TDEnabled = true;
}
function DisableTD() external onlyOwner {
TDEnabled = false;
}
function setTDTime(uint256 delay) public onlyOwner returns (bool) {
TD = delay; // in seconds
return true;
}
function getPriceImpactFee(uint256 amount) public view returns (uint256) {
if (priceImpactFeeDisabled) return 0;
IUniswapV2Pair pair = IUniswapV2Pair(uniswapV2Pair);
address token0 = pair.token0();
address token1 = pair.token1();
uint256 reserve0;
uint256 reserve1;
if (token0 == address(this)) {
(reserve1, reserve0, ) = pair.getReserves();
} else if (token1 == address(this)) {
(reserve0, reserve1, ) = pair.getReserves();
}
if (reserve0 == 0 && reserve1 == 0) {
// check liquidity has ever been added or not. if not, the function will return zero impact
return 0;
}
uint256 amountB = uniswapV2Router.getAmountIn(amount, reserve0, reserve1);
uint256 priceImpact = reserve0.sub(reserve0.sub(amountB)).mul(10000) / reserve0;
if (priceImpact >= impactThreshold) {
return impactFee;
}
return 0;
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
if (amount == 0) {
super._transfer(from, to, 0);
return;
}
//check if tx delay enabled, the sender should wait until the delay passess
if (TDEnabled && !liquidating) {
if (from == address(uniswapV2Pair)) {
uint256 multiplier = _boughtTimes[to] == 1 ? 2 : 1;
require(
(_holderLastTransferTimestamp[to].add(TD.mul(multiplier)) <= block.timestamp) || _isExcludedFromFees[to],
"_transfer:: Transfer Delay enabled. Please try again after the tx block passess"
);
_holderLastTransferTimestamp[to] = block.timestamp;
_boughtTimes[to] = _boughtTimes[to] + 1;
} else if (to == address(uniswapV2Pair)) {
uint256 multiplier = _soldTimes[from] == 1 ? 2 : 1;
require(
(_holderLastTransferTimestamp[from].add(TD.mul(multiplier)) <= block.timestamp) || _isExcludedFromFees[from],
"_transfer:: Transfer Delay enabled. Please try again after the tx block passess"
);
_holderLastTransferTimestamp[from] = block.timestamp;
_soldTimes[to] = _soldTimes[to] + 1;
} else {
require(
(_holderLastTransferTimestamp[from].add(TD.mul(2)) <= block.timestamp) || _isExcludedFromFees[from],
"_transfer:: Transfer Delay enabled. Please try again after the tx block passess"
);
_holderLastTransferTimestamp[from] = block.timestamp;
}
}
//if tokens came from airdrop wallet, then add anti-dump transfer delay for recepients
if (from == _airdropAddress) {
_holderLastTransferTimestamp[to] = block.timestamp + 2 hours;
}
//check the contract balance > swap amount threshold,
//then do it and distribute rewards to the reward pool, dev, markting wallet
//distribution won't work in case a transfer is from uni
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= liquidateTokensAtAmount;
if (canSwap && from != address(uniswapV2Pair)) swapAndDistributeRewards(contractTokenBalance);
//fee is being taken only from buy/sells
//also avoid fees on liquidation
bool takeFee = false;
if ((to == address(uniswapV2Pair) && !_isExcludedFromFees[from]) || (from == address(uniswapV2Pair) && !_isExcludedFromFees[to])) {
takeFee = true;
}
if (liquidating) takeFee = false;
//main fee taking logic
if (takeFee && _feesEnabled) {
//calculate fees and send amount
uint256 rewardPoolAmount = amount.mul(ETH_REWARDS_FEE).div(1000);
uint256 marketingAmount = amount.mul(MARKETING_FEE).div(1000);
uint256 devAmount = amount.mul(DEV_FEE).div(1000);
uint256 priceFee = getPriceImpactFee(amount.sub(rewardPoolAmount).sub(marketingAmount).sub(devAmount));
uint256 impactFeeAmount = amount.mul(priceFee).div(1000);
uint256 sendAmount = amount.sub(rewardPoolAmount).sub(marketingAmount).sub(devAmount);
//avoid stack problem
sendAmount = sendAmount.sub(impactFeeAmount);
uint256 taxAmount = amount.sub(sendAmount);
//check if fees and send amount are correct
require(amount == sendAmount.add(taxAmount), "CLT::transfer: Tax value invalid");
//transfer tax to the contract wallet
super._transfer(from, address(this), taxAmount);
//remained tokens will be transferred to the recipient
amount = sendAmount;
}
//block
topUpClaimCycleAfterTransfer(to, amount);
super._transfer(from, to, amount);
}
function swapAndDistributeRewards(uint256 tokens) private {
//NOTE: do smth with the correct part management
// capture the contract's current ETH balance.
// this is so that we can capture exactly the amount of ETH that the
// swap creates, and not make the liquidity event include any ETH that
// has been manually sent to the contract
uint256 initialBalance = address(this).balance;
if (!liquidating) {
liquidating = true;
swapTokensForEth(tokens);
// how much eth should we distribute
uint256 newBalance = address(this).balance.sub(initialBalance);
//split the contract balance into three parts
uint256 toRewardPool = newBalance.div(3);
uint256 toDevWallet = toRewardPool;
uint256 toMarketingWallet = newBalance.sub(toDevWallet).sub(toRewardPool);
//reward pool eth stay on the contract
address(marketingWallet).call{value: toMarketingWallet}("");
address(devWallet).call{value: toDevWallet}("");
liquidating = false;
emit TaxDistributed(tokens, newBalance, toRewardPool, toDevWallet, toMarketingWallet);
}
}
function swapTokensForEth(uint256 tokenAmount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
// make the swap
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
//to do add to claim cycle after receiving
function calculateReward(address ofAddress) public view returns (uint256) {
uint256 totalSupply = totalSupply().sub(balanceOf(address(0))).sub(balanceOf(0x000000000000000000000000000000000000dEaD)).sub(balanceOf(address(uniswapV2Pair))); // exclude burned wallets //and uni pair
uint256 poolValue = address(this).balance;
uint256 currentBalance = balanceOf(address(ofAddress));
uint256 reward = poolValue.mul(currentBalance).div(totalSupply);
return reward;
}
function claimReward() public isHuman nonReentrant {
require(nextAvailableClaimDate[msg.sender] <= block.timestamp, "Error: next available not reached");
require(balanceOf(msg.sender) >= 0, "Error: must own token to claim reward");
uint256 reward = calculateReward(msg.sender);
// update rewardCycleBlock
nextAvailableClaimDate[msg.sender] = block.timestamp + rewardCycleBlock;
emit ClaimSuccessfully(msg.sender, reward, nextAvailableClaimDate[msg.sender]);
(bool sent, ) = address(msg.sender).call{value: reward}("");
require(sent, "Error: Cannot withdraw reward");
}
function topUpClaimCycleAfterTransfer(address recipient, uint256 amount) private {
uint256 currentRecipientBalance = balanceOf(recipient);
uint256 additionalBlock = 0;
if (nextAvailableClaimDate[recipient] + rewardCycleBlock < block.timestamp) nextAvailableClaimDate[recipient] = block.timestamp;
//if a user has zero balance, just regular rewardCycleBlock will be applied
if (currentRecipientBalance > 0) {
uint256 rate = amount.mul(100).div(currentRecipientBalance);
if (uint256(rate) >= threshHoldTopUpRate) {
uint256 incurCycleBlock = rewardCycleBlock.mul(uint256(rate)).div(100);
if (incurCycleBlock >= rewardCycleBlock) {
incurCycleBlock = rewardCycleBlock;
}
additionalBlock = incurCycleBlock;
}
} else {
nextAvailableClaimDate[recipient] = nextAvailableClaimDate[recipient] + rewardCycleBlock;
}
nextAvailableClaimDate[recipient] = nextAvailableClaimDate[recipient] + additionalBlock;
}
}
Read Contract
DEV_FEE 0x436a88c1 → uint256
ETH_REWARDS_FEE 0x2d17f269 → uint256
MARKETING_FEE 0xaf3e2122 → uint256
TD 0x9c21a9b8 → uint256
TDEnabled 0x5007de65 → bool
TOTAL_FEES 0x92ca1e8d → uint256
TOTAL_SUPPLY 0x902d55a5 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
calculateReward 0xd82e3962 → uint256
decimals 0x313ce567 → uint8
devWallet 0x8ea5220f → address
getPriceImpactFee 0x7b5db661 → uint256
getTime 0x557ed1ba → uint256
getUnlockTime 0x602bc62b → uint256
impactFee 0x1faaddf3 → uint256
impactThreshold 0x8263a8d6 → uint256
liquidateTokensAtAmount 0xc816e4b6 → uint256
marketingWallet 0x75f0a874 → address
name 0x06fdde03 → string
nextAvailableClaimDate 0xb47fd563 → uint256
owner 0x8da5cb5b → address
priceImpactFeeDisabled 0x75722434 → bool
rewardCycleBlock 0x7217f4bc → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 25 functions
These functions modify contract state and require a wallet transaction to execute.
DisableTD 0x53adf85c
No parameters
activateTD 0x7cd09f92
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
claimReward 0xb88a802f
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
disableFees 0xce404b23
No parameters
enableFees 0x368f5bd5
No parameters
excludeFromFees 0xe57f14e1
address account
includeToFees 0x72ba4df5
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
lock 0xdd467064
uint256 time
renounceOwnership 0x715018a6
No parameters
setTDTime 0x2116a4ae
uint256 delay
returns: bool
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unlock 0xa69df4b5
No parameters
updateAirdropAddress 0x6b292d37
address airdropAddress
updateImpactFee 0x4116d15d
uint256 newValue
updateImpactFeeDisabled 0x966f41a2
bool newValue
updateImpactThreshold 0x0496a34d
uint256 newValue
updateLiquidationThreshold 0xd3b5be1a
uint256 newValue
updateRewardCycleBlock 0x5907bd19
uint256 newBlock
updateUniswapV2Router 0x65b8dbc0
address newAddress
updateliquidateTokensAtAmount 0x89b6e25e
uint256 newValue
Recent Transactions
No transactions found for this address