Address Contract Partially Verified
Address
0x85018d46c4F21460490d841ef43b07bbcc99F6Dc
Balance
0 ETH
Nonce
1
Code Size
11909 bytes
Creator
0x06fE8f07...97AF at tx 0x5795c466...9ba58b
Indexed Transactions
0 (1 on-chain, 1.0% indexed)
Contract Bytecode
11909 bytes
0x60806040526004361061026b5760003560e01c80636f302bb911610144578063c00f04d1116100b6578063dbac26e91161007a578063dbac26e914610763578063dd62ed3e14610793578063ea2f0b37146107d9578063ec28438a146107f9578063f0f165af14610819578063f2fde38b1461083957600080fd5b8063c00f04d1146106cd578063c0b0fda2146106ed578063c49b9a8014610703578063cebec75014610723578063d543dbeb1461074357600080fd5b80638d38a127116101085780638d38a127146106225780638da5cb5b1461063a5780638ee88c531461065857806395d89b4114610678578063a457c2d71461068d578063a9059cbb146106ad57600080fd5b80636f302bb91461058857806370a082311461059e578063715018a6146105be5780637d1db4a5146105d357806388f82020146105e957600080fd5b8063437823ec116101dd57806351fde4bb116101a157806351fde4bb146104c357806352390c02146104d95780635342acb4146104f9578063537df3b6146105325780636bc87c3a146105525780636bebaf971461056857600080fd5b8063437823ec1461041057806344337ea1146104305780634549b0391461045057806349bd5a5e146104705780634a74bb02146104a457600080fd5b806323b872dd1161022f57806323b872dd146103525780632d83811914610372578063313ce567146103925780633685d419146103ae57806339509351146103d05780633bd5d173146103f057600080fd5b806306fdde0314610277578063095ea7b3146102a257806313114a9d146102d25780631694505e146102f157806318160ddd1461033d57600080fd5b3661027257005b600080fd5b34801561028357600080fd5b5061028c610859565b6040516102999190612ab7565b60405180910390f35b3480156102ae57600080fd5b506102c26102bd366004612b1a565b6108eb565b6040519015158152602001610299565b3480156102de57600080fd5b50600f545b604051908152602001610299565b3480156102fd57600080fd5b506103257f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610299565b34801561034957600080fd5b50600d546102e3565b34801561035e57600080fd5b506102c261036d366004612b46565b610902565b34801561037e57600080fd5b506102e361038d366004612b87565b61096b565b34801561039e57600080fd5b5060405160128152602001610299565b3480156103ba57600080fd5b506103ce6103c9366004612ba0565b6109f4565b005b3480156103dc57600080fd5b506102c26103eb366004612b1a565b610b88565b3480156103fc57600080fd5b506103ce61040b366004612b87565b610bbe565b34801561041c57600080fd5b506103ce61042b366004612ba0565b610caa565b34801561043c57600080fd5b506103ce61044b366004612ba0565b610cd6565b34801561045c57600080fd5b506102e361046b366004612bd2565b610dbb565b34801561047c57600080fd5b506103257f000000000000000000000000baf26d520a5b2fa85c12991ae4416625105feb0b81565b3480156104b057600080fd5b50601a546102c290610100900460ff1681565b3480156104cf57600080fd5b506102e360135481565b3480156104e557600080fd5b506103ce6104f4366004612ba0565b610e4a565b34801561050557600080fd5b506102c2610514366004612ba0565b6001600160a01b031660009081526009602052604090205460ff1690565b34801561053e57600080fd5b506103ce61054d366004612ba0565b610f7b565b34801561055e57600080fd5b506102e360185481565b34801561057457600080fd5b506103ce610583366004612b87565b61106e565b34801561059457600080fd5b506102e360155481565b3480156105aa57600080fd5b506102e36105b9366004612ba0565b6110d9565b3480156105ca57600080fd5b506103ce611138565b3480156105df57600080fd5b506102e3601b5481565b3480156105f557600080fd5b506102c2610604366004612ba0565b6001600160a01b03166000908152600a602052604090205460ff1690565b34801561062e57600080fd5b5060105460ff166102c2565b34801561064657600080fd5b506005546001600160a01b0316610325565b34801561066457600080fd5b506103ce610673366004612b87565b61114c565b34801561068457600080fd5b5061028c6111ba565b34801561069957600080fd5b506102c26106a8366004612b1a565b6111c9565b3480156106b957600080fd5b506102c26106c8366004612b1a565b611218565b3480156106d957600080fd5b506103ce6106e8366004612bfe565b611225565b3480156106f957600080fd5b506102e360175481565b34801561070f57600080fd5b506103ce61071e366004612bfe565b611240565b34801561072f57600080fd5b506103ce61073e366004612b87565b61129c565b34801561074f57600080fd5b506103ce61075e366004612b87565b61130c565b34801561076f57600080fd5b506102c261077e366004612ba0565b600b6020526000908152604090205460ff1681565b34801561079f57600080fd5b506102e36107ae366004612c19565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b3480156107e557600080fd5b506103ce6107f4366004612ba0565b61133a565b34801561080557600080fd5b506103ce610814366004612b87565b611363565b34801561082557600080fd5b506103ce610834366004612b87565b6113d0565b34801561084557600080fd5b506103ce610854366004612ba0565b61143d565b60606003805461086890612c52565b80601f016020809104026020016040519081016040528092919081815260200182805461089490612c52565b80156108e15780601f106108b6576101008083540402835291602001916108e1565b820191906000526020600020905b8154815290600101906020018083116108c457829003601f168201915b5050505050905090565b60006108f83384846114b6565b5060015b92915050565b600061090f8484846115da565b610961843361095c85604051806060016040528060288152602001612e03602891396001600160a01b038a1660009081526008602090815260408083203384529091529020549190611aac565b6114b6565b5060019392505050565b6000600e548211156109d75760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084015b60405180910390fd5b60006109e1611ae6565b90506109ed8382611b09565b9392505050565b6109fc611b4b565b6001600160a01b0381166000908152600a602052604090205460ff16610a645760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016109ce565b60005b600c54811015610b8457816001600160a01b0316600c8281548110610a8e57610a8e612c8c565b6000918252602090912001546001600160a01b031603610b7257600c8054610ab890600190612cb8565b81548110610ac857610ac8612c8c565b600091825260209091200154600c80546001600160a01b039092169183908110610af457610af4612c8c565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600782526040808220829055600a90925220805460ff19169055600c805480610b4c57610b4c612ccb565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b80610b7c81612ce1565b915050610a67565b5050565b3360008181526008602090815260408083206001600160a01b038716845290915281205490916108f891859061095c9086611ba5565b336000818152600a602052604090205460ff1615610c335760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b60648201526084016109ce565b6000610c3e83611c04565b5050506001600160a01b038616600090815260066020526040902054939450610c6c93925084915050611c5f565b6001600160a01b038316600090815260066020526040902055600e54610c929082611c5f565b600e55600f54610ca29084611ba5565b600f55505050565b610cb2611b4b565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b610cde611b4b565b6001600160a01b0381166000908152600b602052604090205460ff1615610d475760405162461bcd60e51b815260206004820152601e60248201527f4163636f756e7420697320616c726561647920626c61636b6c6973746564000060448201526064016109ce565b6001600160a01b0381163303610d975760405162461bcd60e51b815260206004820152601560248201527421b0b73737ba10313630b1b5b634b9ba1039b2b63360591b60448201526064016109ce565b6001600160a01b03166000908152600b60205260409020805460ff19166001179055565b6000600d54831115610e0f5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c790060448201526064016109ce565b81610e2f576000610e1f84611c04565b509496506108fc95505050505050565b6000610e3a84611c04565b509396506108fc95505050505050565b610e52611b4b565b6001600160a01b0381166000908152600a602052604090205460ff1615610ebb5760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c75646564000000000060448201526064016109ce565b6001600160a01b03811660009081526006602052604090205415610f15576001600160a01b038116600090815260066020526040902054610efb9061096b565b6001600160a01b0382166000908152600760205260409020555b6001600160a01b03166000818152600a60205260408120805460ff19166001908117909155600c805491820181559091527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180546001600160a01b0319169091179055565b610f83611b4b565b6001600160a01b0381166000908152600b602052604090205460ff16610feb5760405162461bcd60e51b815260206004820152601a60248201527f4163636f756e74206973206e6f7420626c61636b6c697374656400000000000060448201526064016109ce565b6001600160a01b038116330361104d5760405162461bcd60e51b815260206004820152602160248201527f43616e6e6f742072656d6f76652073656c662066726f6d20626c61636b6c69736044820152601d60fa1b60648201526084016109ce565b6001600160a01b03166000908152600b60205260409020805460ff19169055565b611076611b4b565b600a60135411156110d45760405162461bcd60e51b815260206004820152602260248201527f526577617264206665652063616e6e6f74206265206d6f7265207468616e2031604482015261302560f01b60648201526084016109ce565b601355565b6001600160a01b0381166000908152600a602052604081205460ff161561111657506001600160a01b031660009081526007602052604090205490565b6001600160a01b0382166000908152600660205260409020546108fc9061096b565b611140611b4b565b61114a6000611ca1565b565b611154611b4b565b600a60185411156111b55760405162461bcd60e51b815260206004820152602560248201527f4c6971756964697479206665652063616e6e6f74206265206d6f7265207468616044820152646e2031302560d81b60648201526084016109ce565b601855565b60606004805461086890612c52565b60006108f8338461095c85604051806060016040528060258152602001612e2b602591393360009081526008602090815260408083206001600160a01b038d1684529091529020549190611aac565b60006108f83384846115da565b61122d611b4b565b6010805460ff1916911515919091179055565b611248611b4b565b601a80548215156101000261ff00199091161790556040517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599061129190831515815260200190565b60405180910390a150565b6112a4611b4b565b600a60155411156113075760405162461bcd60e51b815260206004820152602760248201527f5472616e73616374696f6e206665652063616e6e6f74206265206d6f7265207460448201526668616e2031302560c81b60648201526084016109ce565b601555565b611314611b4b565b611334606461132e83600d54611cf390919063ffffffff16565b90611b09565b601b5550565b611342611b4b565b6001600160a01b03166000908152600960205260409020805460ff19169055565b61136b611b4b565b6064600d5461137a9190612cfa565b601b5411156113cb5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206265206d6f7265207468616e20746f74616c20737570706c7960448201526064016109ce565b601b55565b6113d8611b4b565b6064600d546113e79190612cfa565b601c5411156114385760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206265206d6f7265207468616e20746f74616c20737570706c7960448201526064016109ce565b601c55565b611445611b4b565b6001600160a01b0381166114aa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109ce565b6114b381611ca1565b50565b6001600160a01b0383166115185760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016109ce565b6001600160a01b0382166115795760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016109ce565b6001600160a01b0383811660008181526008602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661163e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016109ce565b6001600160a01b0382166116a05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016109ce565b600081116117025760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016109ce565b6001600160a01b0383166000908152600b602052604090205460ff16156117635760405162461bcd60e51b815260206004820152601560248201527414d95b99195c881a5cc8189b1858dadb1a5cdd1959605a1b60448201526064016109ce565b6001600160a01b0382166000908152600b602052604090205460ff16156117cc5760405162461bcd60e51b815260206004820152601860248201527f526563697069656e7420697320626c61636b6c6973746564000000000000000060448201526064016109ce565b6005546001600160a01b03848116911614806117f557506005546001600160a01b038381169116145b8061180857506001600160a01b03831630145b1561186a5760115415801561184e57507f000000000000000000000000baf26d520a5b2fa85c12991ae4416625105feb0b6001600160a01b0316826001600160a01b0316145b1561185857436011555b6118658383836000611d75565b505050565b60105460ff166118b05760405162461bcd60e51b8152602060048201526011602482015270151c98591a5b99c81a5cc81c185d5cd959607a1b60448201526064016109ce565b6012546011546118c09190612d1c565b43116118ec57506001600160a01b03166000908152600b60205260409020805460ff1916600117905550565b6005546001600160a01b0384811691161480159061191857506005546001600160a01b03838116911614155b1561198057601b548111156119805760405162461bcd60e51b815260206004820152602860248201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546044820152673c20b6b7bab73a1760c11b60648201526084016109ce565b60008061198b611ae6565b90506000611998306110d9565b9050601b5481106119a85750601b545b601c54811080159081906119bf5750601a5460ff16155b80156119fd57507f000000000000000000000000baf26d520a5b2fa85c12991ae4416625105feb0b6001600160a01b0316876001600160a01b031614155b8015611a105750601a54610100900460ff165b15611a2357601c549150611a2382611ef8565b6001600160a01b03871660009081526009602052604090205460019060ff1680611a6557506001600160a01b03871660009081526009602052604090205460ff165b15611a6e575060005b611a7a86601754611f96565b9450611a8a8861dead8787611fa7565b611a948587612cb8565b9550611aa288888884611d75565b5050505050505050565b60008184841115611ad05760405162461bcd60e51b81526004016109ce9190612ab7565b506000611add8486612cb8565b95945050505050565b6000806000611af3612093565b9092509050611b028282611b09565b9250505090565b60006109ed83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612215565b6005546001600160a01b0316331461114a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109ce565b600080611bb28385612d1c565b9050838110156109ed5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016109ce565b6000806000806000806000806000806000611c1e8c612243565b93509350935093506000806000611c3f8f878787611c3a611ae6565b6122a1565b919f509d509b509599509397509195509350505050919395979092949650565b60006109ed83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611aac565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082600003611d05575060006108fc565b6000611d118385612d2f565b905082611d1e8583612cfa565b146109ed5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016109ce565b80611d8257611d82612303565b6001600160a01b0384166000908152600a602052604090205460ff168015611dc357506001600160a01b0383166000908152600a602052604090205460ff16155b15611dd857611dd3848484612348565b611ed6565b6001600160a01b0384166000908152600a602052604090205460ff16158015611e1957506001600160a01b0383166000908152600a602052604090205460ff165b15611e2957611dd384848461248e565b6001600160a01b0384166000908152600a602052604090205460ff16158015611e6b57506001600160a01b0383166000908152600a602052604090205460ff16155b15611e7b57611dd384848461254d565b6001600160a01b0384166000908152600a602052604090205460ff168015611ebb57506001600160a01b0383166000908152600a602052604090205460ff165b15611ecb57611dd38484846125a7565b611ed684848461254d565b80611ef257611ef2601454601355601954601855601654601555565b50505050565b601a805460ff191660011790556000611f12826002611b09565b90506000611f208383611c5f565b905047611f2c83612630565b6000611f384783611c5f565b9050611f4483826127f0565b60408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a15050601a805460ff19169055505050565b60006109ed606461132e8585611cf3565b6001600160a01b0384166000908152600a602052604090205460ff1615612028576001600160a01b03841660009081526007602052604081208054849290611ff0908490612cb8565b90915550506001600160a01b0383166000908152600760205260408120805484929061201d908490612d1c565b90915550611ef29050565b6001600160a01b03841660009081526006602052604081208054849290612050908490612cb8565b9091555061206090508183612d2f565b6001600160a01b03841660009081526006602052604081208054909190612088908490612d1c565b909155505050505050565b600e54600d546000918291825b600c548110156121e5578260066000600c84815481106120c2576120c2612c8c565b60009182526020808320909101546001600160a01b03168352820192909252604001902054118061212d57508160076000600c848154811061210657612106612c8c565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b1561214357600e54600d54945094505050509091565b61218960066000600c848154811061215d5761215d612c8c565b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611c5f565b92506121d160076000600c84815481106121a5576121a5612c8c565b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611c5f565b9150806121dd81612ce1565b9150506120a0565b50600d54600e546121f591611b09565b82101561220c57600e54600d549350935050509091565b90939092509050565b600081836122365760405162461bcd60e51b81526004016109ce9190612ab7565b506000611add8486612cfa565b600080600080600061225786601354611f96565b9050600061226787601854611f96565b9050600061227788601554611f96565b905060006122918261228b85818d89611c5f565b90611c5f565b9993985091965094509092505050565b60008080806122b08986611cf3565b905060006122be8987611cf3565b905060006122cc8988611cf3565b905060006122da8989611cf3565b905060006122ee8261228b85818989611c5f565b949d949c50929a509298505050505050505050565b6013541580156123135750601854155b801561231f5750601554155b1561232657565b6013805460145560188054601955601580546016556000928390559082905555565b600080600080600080600061235c88611c04565b96509650965096509650965096506123a288600760008d6001600160a01b03166001600160a01b0316815260200190815260200160002054611c5f90919063ffffffff16565b6001600160a01b038b166000908152600760209081526040808320939093556006905220546123d19088611c5f565b6001600160a01b03808c1660009081526006602052604080822093909355908b16815220546124009087611ba5565b6001600160a01b038a16600090815260066020526040902055612422826128f6565b61242b8161297e565b6124358584612a93565b886001600160a01b03168a6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161247a91815260200190565b60405180910390a350505050505050505050565b60008060008060008060006124a288611c04565b96509650965096509650965096506124e887600660008d6001600160a01b03166001600160a01b0316815260200190815260200160002054611c5f90919063ffffffff16565b6001600160a01b03808c16600090815260066020908152604080832094909455918c1681526007909152205461251e9085611ba5565b6001600160a01b038a166000908152600760209081526040808320939093556006905220546124009087611ba5565b600080600080600080600061256188611c04565b96509650965096509650965096506123d187600660008d6001600160a01b03166001600160a01b0316815260200190815260200160002054611c5f90919063ffffffff16565b60008060008060008060006125bb88611c04565b965096509650965096509650965061260188600760008d6001600160a01b03166001600160a01b0316815260200190815260200160002054611c5f90919063ffffffff16565b6001600160a01b038b166000908152600760209081526040808320939093556006905220546124e89088611c5f565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061266557612665612c8c565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127079190612d46565b8160018151811061271a5761271a612c8c565b60200260200101906001600160a01b031690816001600160a01b031681525050612765307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d846114b6565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac947906127ba908590600090869030904290600401612d63565b600060405180830381600087803b1580156127d457600080fd5b505af11580156127e8573d6000803e3d6000fd5b505050505050565b61281b307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d846114b6565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663f305d7198230856000806128626005546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156128ca573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906128ef9190612dd4565b5050505050565b6000612900611ae6565b9050600061290e8383611cf3565b3060009081526006602052604090205490915061292b9082611ba5565b30600090815260066020908152604080832093909355600a9052205460ff161561186557306000908152600760205260409020546129699084611ba5565b30600090815260076020526040902055505050565b6000612988611ae6565b905060006129968383611cf3565b90506129d281600660006129b26005546001600160a01b031690565b6001600160a01b0316815260208101919091526040016000205490611ba5565b600660006129e86005546001600160a01b031690565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550600a6000612a226005546001600160a01b031690565b6001600160a01b0316815260208101919091526040016000205460ff161561186557612a5e83600760006129b26005546001600160a01b031690565b60076000612a746005546001600160a01b031690565b6001600160a01b03168152602081019190915260400160002055505050565b600e54612aa09083611c5f565b600e55600f54612ab09082611ba5565b600f555050565b600060208083528351808285015260005b81811015612ae457858101830151858201604001528201612ac8565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146114b357600080fd5b60008060408385031215612b2d57600080fd5b8235612b3881612b05565b946020939093013593505050565b600080600060608486031215612b5b57600080fd5b8335612b6681612b05565b92506020840135612b7681612b05565b929592945050506040919091013590565b600060208284031215612b9957600080fd5b5035919050565b600060208284031215612bb257600080fd5b81356109ed81612b05565b80358015158114612bcd57600080fd5b919050565b60008060408385031215612be557600080fd5b82359150612bf560208401612bbd565b90509250929050565b600060208284031215612c1057600080fd5b6109ed82612bbd565b60008060408385031215612c2c57600080fd5b8235612c3781612b05565b91506020830135612c4781612b05565b809150509250929050565b600181811c90821680612c6657607f821691505b602082108103612c8657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b818103818111156108fc576108fc612ca2565b634e487b7160e01b600052603160045260246000fd5b600060018201612cf357612cf3612ca2565b5060010190565b600082612d1757634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156108fc576108fc612ca2565b80820281158282048414176108fc576108fc612ca2565b600060208284031215612d5857600080fd5b81516109ed81612b05565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015612db35784516001600160a01b031683529383019391830191600101612d8e565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215612de957600080fd5b835192506020840151915060408401519050925092509256fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f38e07f3c96c1c42059796a2ecd03f8c7810030e56e5c71891ec8a8f92c40cda64736f6c63430008130033
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (200 runs)
Token.sol 1474 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
interface IERC20 {
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);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
*
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
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 {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(
address account
) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(
address to,
uint256 amount
) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(
address spender,
uint256 subtractedValue
) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(
fromBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(
currentAllowance >= amount,
"ERC20: insufficient allowance"
);
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
// pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
// pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
// pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
// pragma solidity >=0.6.2;
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract Token is ERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee; // Excluded from fee
mapping (address => bool) private _isExcluded; // Excluded from rewards
mapping(address => bool) public blacklisted;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 9630000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tFeeTotal;
bool private trade_open = true;
uint256 private currentBlockNumber;
uint256 private numBlocksForBlacklist = 5;
uint256 public _rewardFee = 2; // Reward percent distributed to holders of token
uint256 private _previousRewardFee = _rewardFee;
uint256 public _transactionFee = 4; // Transaction tax on each transactions
uint256 private _previousTransactionFee = _transactionFee;
uint256 public _burnFee = 1; // Burn tax on each transaction - 1 = 1%
uint256 public _liquidityFee = 5; // Liquidity tax on each transaction
uint256 private _previousLiquidityFee = _liquidityFee;
IUniswapV2Router02 public immutable uniswapV2Router;
address public immutable uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
address constant private DEAD = 0x000000000000000000000000000000000000dEaD;
uint256 public _maxTxAmount = 5000000 * 10**18;
uint256 private numTokensSellToAddToLiquidity = 500000 * 10**18;
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
modifier lockTheSwap {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
constructor() ERC20("6ense", "6OS") {
_rOwned[_msgSender()] = _rTotal;
IUniswapV2Router02 _uniswapV2Router;
if (block.chainid == 56) {
_uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E);
}
else if (block.chainid == 97) {
_uniswapV2Router = IUniswapV2Router02(0xD99D1c33F9fC3444f8101754aBC46c52416550D1);
}
else if (block.chainid == 1 || block.chainid == 4 || block.chainid == 3) {
_uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
}
else if (block.chainid == 43114) {
_uniswapV2Router = IUniswapV2Router02(0x60aE616a2155Ee3d9A68541Ba4544862310933d4);
}
else if (block.chainid == 250) {
_uniswapV2Router = IUniswapV2Router02(0xF491e7B69E4244ad4002BC14e878a34207E38c29);
}
else {
revert("Chain not valid");
}
// Create a uniswap pair for this new token
uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
.createPair(address(this), _uniswapV2Router.WETH());
// set the rest of the contract variables
uniswapV2Router = _uniswapV2Router;
//exclude owner and this contract from fee
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;
emit Transfer(address(0), _msgSender(), _tTotal);
}
function totalSupply() public view override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
if (_isExcluded[account]) return _tOwned[account];
return tokenFromReflection(_rOwned[account]);
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual override returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual override returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
function isExcludedFromReward(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFees() public view returns (uint256) {
return _tFeeTotal;
}
function deliver(uint256 tAmount) public {
address sender = _msgSender();
require(!_isExcluded[sender], "Excluded addresses cannot call this function");
(uint256 rAmount,,,,,,) = _getValues(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_rTotal = _rTotal.sub(rAmount);
_tFeeTotal = _tFeeTotal.add(tAmount);
}
function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount,,,,,,) = _getValues(tAmount);
return rAmount;
} else {
(,uint256 rTransferAmount,,,,,) = _getValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
uint256 currentRate = _getRate();
return rAmount.div(currentRate);
}
function enableTrade(bool _enable) public onlyOwner {
trade_open = _enable;
}
function isTradeEnabled() external view returns (bool) {
return trade_open;
}
function addToBlacklist(address account) public onlyOwner{
require(!blacklisted[account], "Account is already blacklisted");
require(_msgSender() != account, "Cannot blacklist self");
blacklisted[account] = true;
}
function removeFromBlacklist(address account) public onlyOwner{
require(blacklisted[account], "Account is not blacklisted");
require(_msgSender() != account, "Cannot remove self from blacklist");
blacklisted[account] = false;
}
function excludeFromReward(address account) public onlyOwner() {
// require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not exclude Uniswap router.');
require(!_isExcluded[account], "Account is already excluded");
if(_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeInReward(address account) external onlyOwner() {
require(_isExcluded[account], "Account is already excluded");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tTransaction) = _getValues(tAmount);
_tOwned[sender] = _tOwned[sender].sub(tAmount);
_rOwned[sender] = _rOwned[sender].sub(rAmount);
_tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
_rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
_takeLiquidity(tLiquidity);
_sendTransactionTax(tTransaction);
_reflectFee(rFee, tFee);
emit Transfer(sender, recipient, tTransferAmount);
}
function excludeFromFee(address account) public onlyOwner {
_isExcludedFromFee[account] = true;
}
function includeInFee(address account) public onlyOwner {
_isExcludedFromFee[account] = false;
}
function setRewardFeePercent(uint256 rewardFee) external onlyOwner() {
require(_rewardFee <= 10, "Reward fee cannot be more than 10%");
_rewardFee = rewardFee;
}
function setTransactionFeePercent(uint256 transactionFee) external onlyOwner() {
require(_transactionFee <= 10, "Transaction fee cannot be more than 10%");
_transactionFee = transactionFee;
}
function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner() {
require(_liquidityFee <= 10, "Liquidity fee cannot be more than 10%");
_liquidityFee = liquidityFee;
}
function setNumTokensSellToAddToLiquidity (uint256 amount) external onlyOwner {
require(numTokensSellToAddToLiquidity <= _tTotal / 100, "Cannot be more than total supply");
numTokensSellToAddToLiquidity = amount;
}
function setMaxTxAmount(uint256 amount) external onlyOwner {
require(_maxTxAmount <= _tTotal / 100, "Cannot be more than total supply");
_maxTxAmount = amount;
}
function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
_maxTxAmount = _tTotal.mul(maxTxPercent).div(
10**2
);
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
_rTotal = _rTotal.sub(rFee);
_tFeeTotal = _tFeeTotal.add(tFee);
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256, uint256) {
(uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity, uint256 tTransaction) = _getTValues(tAmount);
(uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, tTransaction, _getRate());
return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity, tTransaction);
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) {
uint256 tFee = calculateFee(tAmount, _rewardFee);
uint256 tLiquidity = calculateFee(tAmount, _liquidityFee);
uint256 tTransaction = calculateFee(tAmount, _transactionFee);
uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity).sub(tTransaction);
return (tTransferAmount, tFee, tLiquidity, tTransaction);
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 tTransaction, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
uint256 rAmount = tAmount.mul(currentRate);
uint256 rFee = tFee.mul(currentRate);
uint256 rLiquidity = tLiquidity.mul(currentRate);
uint256 rTransaction = tTransaction.mul(currentRate);
uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity).sub(rTransaction);
return (rAmount, rTransferAmount, rFee);
}
function _getRate() private view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply.div(tSupply);
}
function _getCurrentSupply() private view returns(uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
rSupply = rSupply.sub(_rOwned[_excluded[i]]);
tSupply = tSupply.sub(_tOwned[_excluded[i]]);
}
if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _takeLiquidity(uint256 tLiquidity) private {
uint256 currentRate = _getRate();
uint256 rLiquidity = tLiquidity.mul(currentRate);
_rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
if(_isExcluded[address(this)])
_tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
}
function _sendTransactionTax(uint256 tTransaction) private {
uint256 currentRate = _getRate();
uint256 rTransaction = tTransaction.mul(currentRate);
_rOwned[owner()] = _rOwned[owner()].add(rTransaction);
if(_isExcluded[owner()])
_tOwned[owner()] = _tOwned[owner()].add(tTransaction);
}
function calculateFee(uint256 _amount, uint256 taxPercent) private pure returns (uint256) {
return _amount.mul(taxPercent).div(10**2);
}
function removeAllFee() private {
if(_rewardFee == 0 && _liquidityFee == 0 && _transactionFee == 0) return;
_previousRewardFee = _rewardFee;
_previousLiquidityFee = _liquidityFee;
_previousTransactionFee = _transactionFee;
_rewardFee = 0;
_liquidityFee = 0;
_transactionFee = 0;
}
function restoreAllFee() private {
_rewardFee = _previousRewardFee;
_liquidityFee = _previousLiquidityFee;
_transactionFee = _previousTransactionFee;
}
function isExcludedFromFee(address account) public view returns(bool) {
return _isExcludedFromFee[account];
}
function _approve(address owner, address spender, uint256 amount) internal virtual override {
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);
}
function _transfer( address from, address to, uint256 amount ) internal virtual override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(!blacklisted[from], "Sender is blacklisted");
require(!blacklisted[to], "Recipient is blacklisted");
if (from == owner() || to == owner() || from == address(this)) {
if(currentBlockNumber == 0 && to == uniswapV2Pair){
currentBlockNumber = block.number;
}
_tokenTransfer(from, to, amount, false);
return;
}
//Check if trading is enabled
require(trade_open, "Trading is paused");
if(block.number <= currentBlockNumber + numBlocksForBlacklist){
blacklisted[to] = true;
return;
}
if(from != owner() && to != owner())
require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
uint256 _burnAmount;
uint256 rate = _getRate();
uint256 contractTokenBalance = balanceOf(address(this));
if(contractTokenBalance >= _maxTxAmount)
{
contractTokenBalance = _maxTxAmount;
}
bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity;
if (
overMinTokenBalance &&
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled
) {
contractTokenBalance = numTokensSellToAddToLiquidity;
//add liquidity
swapAndLiquify(contractTokenBalance);
}
//indicates if fee should be deducted from transfer
bool takeFee = true;
//if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){
takeFee = false;
}
_burnAmount = calculateFee(amount, _burnFee);
_burnTokens(from, DEAD, _burnAmount, rate);
amount -= _burnAmount;
//transfer amount, it will take tax, liquidity fee
_tokenTransfer(from,to,amount,takeFee);
}
function _burnTokens(
address from,
address to,
uint256 tAmount,
uint256 rate
) private {
if (_isExcluded[from]) {
_tOwned[from] -= tAmount;
_tOwned[to] += tAmount;
} else {
_rOwned[from] -= tAmount;
_rOwned[to] += tAmount * rate;
}
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
// split the contract balance into halves
uint256 half = contractTokenBalance.div(2);
uint256 otherHalf = contractTokenBalance.sub(half);
// 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;
// swap tokens for ETH
swapTokensForEth(half); // <- this breaks the ETH -> HATE swap when swap+liquify is triggered
// how much ETH did we just swap into?
uint256 newBalance = address(this).balance.sub(initialBalance);
// add liquidity to uniswap
addLiquidity(otherHalf, newBalance);
emit SwapAndLiquify(half, newBalance, otherHalf);
}
function swapTokensForEth(uint256 tokenAmount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
// make the swap
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) pri...
// [truncated — 53244 bytes total]
Read Contract
_burnFee 0xc0b0fda2 → uint256
_liquidityFee 0x6bc87c3a → uint256
_maxTxAmount 0x7d1db4a5 → uint256
_rewardFee 0x51fde4bb → uint256
_transactionFee 0x6f302bb9 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
blacklisted 0xdbac26e9 → bool
decimals 0x313ce567 → uint8
isExcludedFromFee 0x5342acb4 → bool
isExcludedFromReward 0x88f82020 → bool
isTradeEnabled 0x8d38a127 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
reflectionFromToken 0x4549b039 → uint256
swapAndLiquifyEnabled 0x4a74bb02 → bool
symbol 0x95d89b41 → string
tokenFromReflection 0x2d838119 → uint256
totalFees 0x13114a9d → uint256
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
Write Contract 22 functions
These functions modify contract state and require a wallet transaction to execute.
addToBlacklist 0x44337ea1
address account
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
deliver 0x3bd5d173
uint256 tAmount
enableTrade 0xc00f04d1
bool _enable
excludeFromFee 0x437823ec
address account
excludeFromReward 0x52390c02
address account
includeInFee 0xea2f0b37
address account
includeInReward 0x3685d419
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeFromBlacklist 0x537df3b6
address account
renounceOwnership 0x715018a6
No parameters
setLiquidityFeePercent 0x8ee88c53
uint256 liquidityFee
setMaxTxAmount 0xec28438a
uint256 amount
setMaxTxPercent 0xd543dbeb
uint256 maxTxPercent
setNumTokensSellToAddToLiquidity 0xf0f165af
uint256 amount
setRewardFeePercent 0x6bebaf97
uint256 rewardFee
setSwapAndLiquifyEnabled 0xc49b9a80
bool _enabled
setTransactionFeePercent 0xcebec750
uint256 transactionFee
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 1 on-chain transactions, but only 1.0% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →