Address Contract Verified
Address
0x4F2AB9D03ce5b8D0d3BcA09259c78005D2775E08
Balance
0 ETH
Nonce
1
Code Size
12751 bytes
Creator
0xd8c02772...62Ab at tx 0x522a8135...890c23
Indexed Transactions
0
Contract Bytecode
12751 bytes
0x6080604052600436106102cd5760003560e01c806379eb8d1d11610175578063aa4bde28116100dc578063d44e586e11610095578063dd62ed3e1161006f578063dd62ed3e14610974578063e22b62de146109ba578063ea2f0b37146109da578063f2fde38b146109fa57600080fd5b8063d44e586e14610932578063d6c180bf14610948578063d8dcac4f1461095e57600080fd5b8063aa4bde2814610886578063bd94545b1461089c578063c49b9a80146108bc578063c816841b146108dc578063d12a7688146108fc578063d2fcc0011461091257600080fd5b806395d89b411161012e57806395d89b41146107a75780639a7a23d6146107d65780639ba5e4d5146107f6578063a457c2d714610826578063a5ece94114610846578063a9059cbb1461086657600080fd5b806379eb8d1d146106e557806388f82020146107055780638a0eef5a1461073e5780638da5cb5b14610754578063906e9dd014610772578063958b0f201461079257600080fd5b80633bbac579116102345780635342acb4116101ed578063713898cd116101c7578063713898cd14610607578063715018a61461066a57806373cafdc21461067f5780637949a403146106b557600080fd5b80635342acb4146105755780636dd3d39f146105ae57806370a08231146105e757600080fd5b80633bbac579146104a4578063437823ec146104d45780634549b039146104f45780634a74bb021461051457806350be7cdb1461053557806352390c021461055557600080fd5b806323b872dd1161028657806323b872dd146103e857806327a14fc2146104085780632d83811914610428578063313ce567146104485780633685d41914610464578063395093511461048457600080fd5b806304679780146102d9578063055add0d146102fb57806306fdde031461033d578063095ea7b31461037957806315952f54146103a957806318160ddd146103c957600080fd5b366102d457005b600080fd5b3480156102e557600080fd5b506102f96102f4366004612be3565b610a1a565b005b34801561030757600080fd5b506012546103209061010090046001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561034957600080fd5b5060408051808201909152600a8152694d657774776f20496e7560b01b60208201525b6040516103349190612bfc565b34801561038557600080fd5b50610399610394366004612c66565b610a69565b6040519015158152602001610334565b3480156103b557600080fd5b506102f96103c4366004612c92565b610a80565b3480156103d557600080fd5b506009545b604051908152602001610334565b3480156103f457600080fd5b50610399610403366004612caf565b610b7e565b34801561041457600080fd5b506102f9610423366004612be3565b610c28565b34801561043457600080fd5b506103da610443366004612be3565b610ca9565b34801561045457600080fd5b5060405160098152602001610334565b34801561047057600080fd5b506102f961047f366004612c92565b610d2d565b34801561049057600080fd5b5061039961049f366004612c66565b610ee4565b3480156104b057600080fd5b506103996104bf366004612c92565b60076020526000908152604090205460ff1681565b3480156104e057600080fd5b506102f96104ef366004612c92565b610f20565b34801561050057600080fd5b506103da61050f366004612d05565b610f6e565b34801561052057600080fd5b5060135461039990600160a01b900460ff1681565b34801561054157600080fd5b506102f9610550366004612d42565b610ff8565b34801561056157600080fd5b506102f9610570366004612c92565b611080565b34801561058157600080fd5b50610399610590366004612c92565b6001600160a01b031660009081526004602052604090205460ff1690565b3480156105ba57600080fd5b506103996105c9366004612c92565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156105f357600080fd5b506103da610602366004612c92565b6111d3565b34801561061357600080fd5b5060165461063d9060ff808216916101008104821691620100008204811691630100000090041684565b6040805160ff95861681529385166020850152918416918301919091529091166060820152608001610334565b34801561067657600080fd5b506102f9611232565b34801561068b57600080fd5b5060155461063d9060ff808216916101008104821691620100008204811691630100000090041684565b3480156106c157600080fd5b506103996106d0366004612c92565b60116020526000908152604090205460ff1681565b3480156106f157600080fd5b506102f9610700366004612d85565b611268565b34801561071157600080fd5b50610399610720366004612c92565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561074a57600080fd5b506103da600e5481565b34801561076057600080fd5b506000546001600160a01b0316610320565b34801561077e57600080fd5b506102f961078d366004612c92565b6112d3565b34801561079e57600080fd5b506102f961131f565b3480156107b357600080fd5b506040805180820190915260068152654d455754574f60d01b602082015261036c565b3480156107e257600080fd5b506102f96107f1366004612da7565b61135a565b34801561080257600080fd5b50601854601954610811919082565b60408051928352602083019190915201610334565b34801561083257600080fd5b50610399610841366004612c66565b6114de565b34801561085257600080fd5b50601054610320906001600160a01b031681565b34801561087257600080fd5b50610399610881366004612c66565b611577565b34801561089257600080fd5b506103da600d5481565b3480156108a857600080fd5b506102f96108b7366004612dd3565b611584565b3480156108c857600080fd5b506102f96108d7366004612e4e565b611756565b3480156108e857600080fd5b50601354610320906001600160a01b031681565b34801561090857600080fd5b506103da60145481565b34801561091e57600080fd5b506102f961092d366004612da7565b6117cd565b34801561093e57600080fd5b506103da600c5481565b34801561095457600080fd5b506103da600b5481565b34801561096a57600080fd5b506103da600f5481565b34801561098057600080fd5b506103da61098f366004612e69565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b3480156109c657600080fd5b506102f96109d5366004612d42565b6118e2565b3480156109e657600080fd5b506102f96109f5366004612c92565b61196a565b348015610a0657600080fd5b506102f9610a15366004612c92565b6119b5565b6000546001600160a01b03163314610a4d5760405162461bcd60e51b8152600401610a4490612ea2565b60405180910390fd5b610a596009600a612fd1565b610a639082612fe0565b60145550565b6000610a76338484611a50565b5060015b92915050565b6000546001600160a01b03163314610aaa5760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b03811660009081526007602052604090205460ff1615610b275760405162461bcd60e51b815260206004820152602b60248201527f616464726573732070726f766964656420697320616c7265616479206e6f742060448201526a189b1858dadb1a5cdd195960aa1b6064820152608401610a44565b6001600160a01b0381166000818152600760209081526040808320805460ff191690555192835290917f3159dadbd8e2d720a851b412e3358e7e44bb11734c9bfd5715340e21798e8b25910160405180910390a250565b6000610b8b848484611b74565b6001600160a01b038416600090815260036020908152604080832033845290915290205482811015610c105760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610a44565b610c1d8533858403611a50565b506001949350505050565b6000546001600160a01b03163314610c525760405162461bcd60e51b8152600401610a4490612ea2565b61271081600954610c639190612fe0565b610c6d9190612fff565b600d8190556040519081527f4b39c36d20c57d220f61fd25c4349d4435cc03ef6c2a680942f15333c3c3e001906020015b60405180910390a150565b6000600a54821115610d105760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610a44565b6000610d1a61204c565b9050610d268184612fff565b9392505050565b6000546001600160a01b03163314610d575760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b03811660009081526005602052604090205460ff16610dbf5760405162461bcd60e51b815260206004820152601760248201527f4163636f756e74206973206e6f74206578636c756465640000000000000000006044820152606401610a44565b60005b600854811015610ee057816001600160a01b031660088281548110610de957610de9613021565b6000918252602090912001546001600160a01b03161415610ece5760088054610e1490600190613037565b81548110610e2457610e24613021565b600091825260209091200154600880546001600160a01b039092169183908110610e5057610e50613021565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600590925220805460ff191690556008805480610ea857610ea861304e565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b80610ed881613064565b915050610dc2565b5050565b3360008181526003602090815260408083206001600160a01b03871684529091528120549091610a76918590610f1b90869061307f565b611a50565b6000546001600160a01b03163314610f4a5760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000600954831115610fc25760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c79006044820152606401610a44565b81610fde576000610fd484600161206f565b519150610a7a9050565b6000610feb84600161206f565b602001519150610a7a9050565b6000546001600160a01b031633146110225760405162461bcd60e51b8152600401610a4490612ea2565b6015805460ff838116620100000262ff0000198683166101000261ffff1990941692881692909217929092171617905561105c8183613097565b6015805460ff9290921663010000000263ff00000019909216919091179055505050565b6000546001600160a01b031633146110aa5760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b03811660009081526005602052604090205460ff16156111135760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c7564656400000000006044820152606401610a44565b6001600160a01b0381166000908152600160205260409020541561116d576001600160a01b03811660009081526001602052604090205461115390610ca9565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600560205260408120805460ff191660019081179091556008805491820181559091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319169091179055565b6001600160a01b03811660009081526005602052604081205460ff161561121057506001600160a01b031660009081526002602052604090205490565b6001600160a01b038216600090815260016020526040902054610a7a90610ca9565b6000546001600160a01b0316331461125c5760405162461bcd60e51b8152600401610a4490612ea2565b61126660006120e5565b565b6000546001600160a01b031633146112925760405162461bcd60e51b8152600401610a4490612ea2565b612710826009546112a39190612fe0565b6112ad9190612fff565b600b55600954612710906112c2908390612fe0565b6112cc9190612fff565b600c555050565b6000546001600160a01b031633146112fd5760405162461bcd60e51b8152600401610a4490612ea2565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146113495760405162461bcd60e51b8152600401610a4490612ea2565b611266611355306111d3565b612135565b6000546001600160a01b031633146113845760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b03821660009081526011602052604090205460ff16151581151514156114195760405162461bcd60e51b815260206004820152603860248201527f4175746f6d61746564206d61726b6574206d616b65722070616972206973206160448201527f6c72656164792073657420746f20746861742076616c756500000000000000006064820152608401610a44565b6001600160a01b0382166000908152601160205260409020805460ff191682158015919091179091556114a2576001600160a01b038216600081815260066020908152604091829020805460ff191660011790559051918252821515917f4a8452f723db48bf05f301f94d62a2cf7a72976cde77d83e3646584858b8f4b2910160405180910390a25b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b3360009081526003602090815260408083206001600160a01b0386168452909152812054828110156115605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a44565b61156d3385858403611a50565b5060019392505050565b6000610a76338484611b74565b6000546001600160a01b031633146115ae5760405162461bcd60e51b8152600401610a4490612ea2565b60005b8281101561175057811515600660008686858181106115d2576115d2613021565b90506020020160208101906115e79190612c92565b6001600160a01b0316815260208101919091526040016000205460ff16151514156116845760405162461bcd60e51b815260206004820152604160248201527f5f69734578636c7564656446726f6d4d617857616c6c657420616c726561647960448201527f2073657420746f20746861742076616c756520666f72206f6e652077616c6c656064820152601d60fa1b608482015260a401610a44565b816006600086868581811061169b5761169b613021565b90506020020160208101906116b09190612c92565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558115157f4a8452f723db48bf05f301f94d62a2cf7a72976cde77d83e3646584858b8f4b285858481811061170e5761170e613021565b90506020020160208101906117239190612c92565b6040516001600160a01b03909116815260200160405180910390a28061174881613064565b9150506115b1565b50505050565b6000546001600160a01b031633146117805760405162461bcd60e51b8152600401610a4490612ea2565b60138054821515600160a01b0260ff60a01b199091161790556040517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc15990610c9e90831515815260200190565b6000546001600160a01b031633146117f75760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b03821660009081526006602052604090205460ff16151581151514156118815760405162461bcd60e51b815260206004820152603260248201527f5f69734578636c7564656446726f6d4d617857616c6c657420616c72656164796044820152712073657420746f20746861742076616c756560701b6064820152608401610a44565b6001600160a01b038216600081815260066020908152604091829020805460ff1916851515908117909155915192835290917f4a8452f723db48bf05f301f94d62a2cf7a72976cde77d83e3646584858b8f4b2910160405180910390a25050565b6000546001600160a01b0316331461190c5760405162461bcd60e51b8152600401610a4490612ea2565b6016805460ff838116620100000262ff0000198683166101000261ffff199094169288169290921792909217161790556119468183613097565b6016805460ff9290921663010000000263ff00000019909216919091179055505050565b6000546001600160a01b031633146119945760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146119df5760405162461bcd60e51b8152600401610a4490612ea2565b6001600160a01b038116611a445760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a44565b611a4d816120e5565b50565b6001600160a01b038316611ab25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a44565b6001600160a01b038216611b135760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a44565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600e54158015611b9c57506001600160a01b03821660009081526011602052604090205460ff165b15611ba65743600e555b6001600160a01b038316611c0a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a44565b6001600160a01b038216611c6c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a44565b6001600160a01b03831660009081526007602052604090205460ff1615611cd55760405162461bcd60e51b815260206004820181905260248201527f45524332303a206164647265737320626c61636b6c69737465642028626f74296044820152606401610a44565b60008111611d375760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610a44565b611d40836111d3565b811115611da95760405162461bcd60e51b815260206004820152603160248201527f596f752061726520747279696e6720746f207472616e73666572206d6f7265206044820152707468616e20796f75722062616c616e636560781b6064820152608401610a44565b6001600160a01b03831660009081526004602052604081205460ff1680611de857506001600160a01b03831660009081526004602052604090205460ff165b1590508015611fd9576001600160a01b03841660009081526011602052604090205460ff1615611f2d57600f54600e54611e22919061307f565b431015611e86576001600160a01b038316600081815260076020908152604091829020805460ff19166001908117909155915192835290917f3159dadbd8e2d720a851b412e3358e7e44bb11734c9bfd5715340e21798e8b25910160405180910390a25b6015546017805460ff80841661ffff19909216919091176101008085048316021763ffff000019166201000080850483160263ff00000019161763010000009384900491909116909202919091179055600b54821115611f285760405162461bcd60e51b815260206004820181905260248201527f616d6f756e74206d757374206265203c3d206d61785478416d6f756e744275796044820152606401610a44565b611fd9565b6016546017805460ff80841661ffff19909216919091176101008085048316021763ffff000019166201000080850483160263ff00000019161763010000009384900491909116909202919091179055600c54821115611fd95760405162461bcd60e51b815260206004820152602160248201527f616d6f756e74206d757374206265203c3d206d61785478416d6f756e7453656c6044820152601b60fa1b6064820152608401610a44565b601454611fe5306111d3565b10158015611ff6575060125460ff16155b801561201b57506001600160a01b03841660009081526011602052604090205460ff16155b80156120305750601354600160a01b900460ff165b1561204057612040601454612135565b6117508484848461221f565b600080600061205961249d565b90925090506120688183612fff565b9250505090565b6120af6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6120b98383612620565b90506120ce8184846120c961204c565b6126e2565b606085015260408401526020830152815292915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6012805460ff1916600117905560175460009061215d906301000000900460ff1660026130bc565b60175460ff9182169250600091839161217e91620100009091041685612fe0565b6121889190612fff565b905060006121968285613037565b9050476121a28261274d565b60006121ae8247613037565b6017549091506000906121ca9062010000900460ff1687613037565b6017546121e09062010000900460ff1684612fe0565b6121ea9190612fff565b90506121f6858261290f565b60105461220c906001600160a01b031647612a1a565b50506012805460ff191690555050505050565b600061222b838361206f565b6001600160a01b03861660009081526005602052604090205490915060ff161561227d576001600160a01b03851660009081526002602052604081208054859290612277908490613037565b90915550505b6001600160a01b03841660009081526005602052604090205460ff16156122d15760808101516001600160a01b038516600090815260026020526040812080549091906122cb90849061307f565b90915550505b80516001600160a01b038616600090815260016020526040812080549091906122fb908490613037565b90915550506020808201516001600160a01b038616600090815260019092526040822080549192909161232f90849061307f565b909155505081156123b05761234c81604001518260a00151612b38565b61235e81606001518260c00151612b6d565b306001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360c001516040516123a791815260200190565b60405180910390a35b6001600160a01b03841660009081526006602052604090205460ff16806123e15750600d546123de856111d3565b11155b6124455760405162461bcd60e51b815260206004820152602f60248201527f526563697069656e742063616e6e6f7420686f6c64206d6f7265207468616e2060448201526e1b585e15d85b1b195d105b5bdd5b9d608a1b6064820152608401610a44565b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836080015160405161248e91815260200190565b60405180910390a35050505050565b600a546009546000918291825b6008548110156125ef578260016000600884815481106124cc576124cc613021565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180612537575081600260006008848154811061251057612510613021565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b1561254d57600a54600954945094505050509091565b600160006008838154811061256457612564613021565b60009182526020808320909101546001600160a01b031683528201929092526040019020546125939084613037565b925060026000600883815481106125ac576125ac613021565b60009182526020808320909101546001600160a01b031683528201929092526040019020546125db9083613037565b9150806125e781613064565b9150506124aa565b50600954600a546126009190612fff565b82101561261757600a546009549350935050509091565b90939092509050565b6126606040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b816126715760808101839052610a7a565b6017546064906126849060ff1685612fe0565b61268e9190612fff565b60a08201526017546064906126ad906301000000900460ff1685612fe0565b6126b79190612fff565b60c0820181905260a08201516126cd9085613037565b6126d79190613037565b608082015292915050565b60008080806126f18588612fe0565b93508561270657508291506000905080612742565b848860a001516127169190612fe0565b9150848860c001516127289190612fe0565b9050806127358386613037565b61273f9190613037565b92505b945094509450949050565b604080516002808252606082018352600092602083019080368337019050509050308160008151811061278257612782613021565b60200260200101906001600160a01b031690816001600160a01b031681525050601260019054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156127f057600080fd5b505afa158015612804573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282891906130dd565b8160018151811061283b5761283b613021565b6001600160a01b0392831660209182029290920181019190915260125430600090815260038352604080822061010090930490941681529152205482111561289c5760125461289c90309061010090046001600160a01b0316600019611a50565b60125460405163791ac94760e01b81526101009091046001600160a01b03169063791ac947906128d99085906000908690309042906004016130fa565b600060405180830381600087803b1580156128f357600080fd5b505af1158015612907573d6000803e3d6000fd5b505050505050565b6012546001600160a01b036101009091041663f305d71982308560008061293e6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156129a157600080fd5b505af11580156129b5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906129da919061316b565b505060408051848152602081018490527f38f8a0c92f4c5b0b6877f878cb4c0c8d348a47b76d716c8e78f425043df9515b92500160405180910390a15050565b80471015612a6a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a44565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612ab7576040519150601f19603f3d011682016040523d82523d6000602084013e612abc565b606091505b5050905080612b335760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a44565b505050565b81600a6000828254612b4a9190613037565b909155505060188054829190600090612b6490849061307f565b90915550505050565b3060009081526001602052604081208054849290612b8c90849061307f565b90915550503060009081526005602052604090205460ff1615612bce573060009081526002602052604081208054839290612bc890849061307f565b90915550505b8060186001016000828254612b64919061307f565b600060208284031215612bf557600080fd5b5035919050565b600060208083528351808285015260005b81811015612c2957858101830151858201604001528201612c0d565b81811115612c3b576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114611a4d57600080fd5b60008060408385031215612c7957600080fd5b8235612c8481612c51565b946020939093013593505050565b600060208284031215612ca457600080fd5b8135610d2681612c51565b600080600060608486031215612cc457600080fd5b8335612ccf81612c51565b92506020840135612cdf81612c51565b929592945050506040919091013590565b80358015158114612d0057600080fd5b919050565b60008060408385031215612d1857600080fd5b82359150612d2860208401612cf0565b90509250929050565b803560ff81168114612d0057600080fd5b600080600060608486031215612d5757600080fd5b612d6084612d31565b9250612d6e60208501612d31565b9150612d7c60408501612d31565b90509250925092565b60008060408385031215612d9857600080fd5b50508035926020909101359150565b60008060408385031215612dba57600080fd5b8235612dc581612c51565b9150612d2860208401612cf0565b600080600060408486031215612de857600080fd5b833567ffffffffffffffff80821115612e0057600080fd5b818601915086601f830112612e1457600080fd5b813581811115612e2357600080fd5b8760208260051b8501011115612e3857600080fd5b602092830195509350612d7c9186019050612cf0565b600060208284031215612e6057600080fd5b610d2682612cf0565b60008060408385031215612e7c57600080fd5b8235612e8781612c51565b91506020830135612e9781612c51565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115612f28578160001904821115612f0e57612f0e612ed7565b80851615612f1b57918102915b93841c9390800290612ef2565b509250929050565b600082612f3f57506001610a7a565b81612f4c57506000610a7a565b8160018114612f625760028114612f6c57612f88565b6001915050610a7a565b60ff841115612f7d57612f7d612ed7565b50506001821b610a7a565b5060208310610133831016604e8410600b8410161715612fab575081810a610a7a565b612fb58383612eed565b8060001904821115612fc957612fc9612ed7565b029392505050565b6000610d2660ff841683612f30565b6000816000190483118215151615612ffa57612ffa612ed7565b500290565b60008261301c57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60008282101561304957613049612ed7565b500390565b634e487b7160e01b600052603160045260246000fd5b600060001982141561307857613078612ed7565b5060010190565b6000821982111561309257613092612ed7565b500190565b600060ff821660ff84168060ff038211156130b4576130b4612ed7565b019392505050565b600060ff821660ff84168160ff0481118215151615612fc957612fc9612ed7565b6000602082840312156130ef57600080fd5b8151610d2681612c51565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561314a5784516001600160a01b031683529383019391830191600101613125565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561318057600080fd5b835192506020840151915060408401519050925092509256fea264697066735822122072868e331d67054ebf61b09a42f53c49f92e9a2081409fe63b36816ec3318ee864736f6c63430008090033
Verified Source Code Full Match
Compiler: v0.8.9+commit.e5eed63a
EVM: london
Optimization: Yes (200 runs)
IERC20.sol 81 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `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);
}
Address.sol 216 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
Context.sol 23 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
Ownable.sol 72 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(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");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
MewtwoInu.sol 565 lines
// SPDX-License-Identifier: NOLICENSE
pragma solidity ^0.8.0;
// ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZKK5ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ}!===~~}ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
// ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZc ..._"^ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ* vvvv| ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
// ZZZZZZZZZZZZZZZZZZZ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ZZZH)*WZZw*r(xLcwsPMZZZZZZZZ
/* MewtwoInu Inu:
* 1 Quadrillion Supply
*
*INITIAL TAX:
*Fees on tx: 10%
*Reflections: 2%
*Liquidity: 3%
*Marketing (in eth) : 5%
*
*Maxtx on buy: 0.5% of supply
*MaxTx on sell: 0.5% of supply
*Maxwallet: 1% of supply
*
*/
import "./Ownable.sol";
import "./IERC20.sol";
import "./IUniswapV2Router02.sol";
import "./IUniswapV2Factory.sol";
import "./Address.sol";
contract MewtwoInu is Context, IERC20, Ownable {
using Address for address payable;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) private _isExcluded;
mapping (address => bool) private _isExcludedFromMaxWallet;
mapping (address => bool) public isBot;
address[] private _excluded;
uint8 private constant _decimals = 9;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 10**15 * 10**_decimals;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 public maxTxAmountBuy = _tTotal/200; // 0.5% of supply (5T tokens)
uint256 public maxTxAmountSell = _tTotal/200; // 0.5% of supply (5T tokens)
uint256 public maxWalletAmount = _tTotal/100; // 1% of supply
//antisnipers
uint256 public liqAddedBlockNumber;
uint256 public blocksToWait = 2;
address payable public marketingAddress;
mapping (address => bool) public isAutomatedMarketMakerPair;
string private constant _name = "Mewtwo Inu";
string private constant _symbol = "MEWTWO";
bool private inSwapAndLiquify;
IUniswapV2Router02 public UniswapV2Router;
address public uniswapPair;
bool public swapAndLiquifyEnabled = true;
uint256 public numTokensSellToAddToLiquidity = _tTotal/500;
struct feeRatesStruct {
uint8 rfi;
uint8 marketing;
uint8 autolp;
uint8 toSwap;
}
feeRatesStruct public buyRates = feeRatesStruct(
{
rfi: 2, //autoreflection rate, in %
marketing: 5, //marketing fee in % (in ETH)
autolp: 3, // autolp rate in %
toSwap: 8 // marketing + autolp
});
feeRatesStruct public sellRates = feeRatesStruct(
{
rfi: 2, //autoreflection rate, in %
marketing: 5, //marketing fee in % (in ETH)
autolp: 3, // autolp rate in %
toSwap: 8 // marketing + autolp
});
feeRatesStruct private appliedRates = buyRates;
struct TotFeesPaidStruct{
uint256 rfi;
uint256 toSwap;
}
TotFeesPaidStruct public totFeesPaid;
struct valuesFromGetValues{
uint256 rAmount;
uint256 rTransferAmount;
uint256 rRfi;
uint256 rToSwap;
uint256 tTransferAmount;
uint256 tRfi;
uint256 tToSwap;
}
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(uint256 tokensSwapped, uint256 ETHReceived, uint256 tokensIntotoSwap);
event LiquidityAdded(uint256 tokenAmount, uint256 ETHAmount);
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event BlacklistedUser(address botAddress, bool indexed value);
event MaxWalletAmountUpdated(uint256 amount);
event ExcludeFromMaxWallet(address account, bool indexed isExcluded);
modifier lockTheSwap {
inSwapAndLiquify = true;
_;
inSwapAndLiquify = false;
}
constructor () {
IUniswapV2Router02 _UniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
uniswapPair = IUniswapV2Factory(_UniswapV2Router.factory())
.createPair(address(this), _UniswapV2Router.WETH());
isAutomatedMarketMakerPair[uniswapPair] = true;
emit SetAutomatedMarketMakerPair(uniswapPair, true);
UniswapV2Router = _UniswapV2Router;
_rOwned[owner()] = _rTotal;
marketingAddress= payable(msg.sender);
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[marketingAddress]=true;
_isExcludedFromFee[address(this)]=true;
_isExcludedFromMaxWallet[owner()] = true;
_isExcludedFromMaxWallet[marketingAddress]=true;
_isExcludedFromMaxWallet[address(this)]=true;
_isExcludedFromMaxWallet[uniswapPair] = true;
emit Transfer(address(0), owner(), _tTotal);
}
//std ERC20:
function name() public pure returns (string memory) {
return _name;
}
function symbol() public pure returns (string memory) {
return _symbol;
}
function decimals() public pure returns (uint8) {
return _decimals;
}
//override ERC20:
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);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender]+addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
function isExcludedFromReward(address account) public view returns (bool) {
return _isExcluded[account];
}
function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) {
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferRfi) {
valuesFromGetValues memory s = _getValues(tAmount, true);
return s.rAmount;
} else {
valuesFromGetValues memory s = _getValues(tAmount, true);
return s.rTransferAmount;
}
}
function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
require(rAmount <= _rTotal, "Amount must be less than total reflections");
uint256 currentRate = _getRate();
return rAmount/currentRate;
}
//@dev kept original RFI naming -> "reward" as in reflection
function excludeFromReward(address account) external onlyOwner() {
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 not 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 excludeFromFee(address account) external onlyOwner {
_isExcludedFromFee[account] = true;
}
function excludeMultipleAccountsFromMaxWallet(address[] calldata accounts, bool excluded) public onlyOwner {
for(uint256 i = 0; i < accounts.length; i++) {
require(_isExcludedFromMaxWallet[accounts[i]] != excluded, "_isExcludedFromMaxWallet already set to that value for one wallet");
_isExcludedFromMaxWallet[accounts[i]] = excluded;
emit ExcludeFromMaxWallet(accounts[i], excluded);
}
}
function includeInFee(address account) external onlyOwner {
_isExcludedFromFee[account] = false;
}
function isExcludedFromFee(address account) public view returns(bool) {
return _isExcludedFromFee[account];
}
function isExcludedFromMaxWallet(address account) public view returns(bool) {
return _isExcludedFromMaxWallet[account];
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
swapAndLiquifyEnabled = _enabled;
emit SwapAndLiquifyEnabledUpdated(_enabled);
}
// @dev receive ETH from UniswapV2Router when swapping
receive() external payable {}
function _reflectRfi(uint256 rRfi, uint256 tRfi) private {
_rTotal -= rRfi;
totFeesPaid.rfi += tRfi;
}
function _takeToSwap(uint256 rToSwap,uint256 tToSwap) private {
_rOwned[address(this)] +=rToSwap;
if(_isExcluded[address(this)])
_tOwned[address(this)] += tToSwap;
totFeesPaid.toSwap+=tToSwap;
}
function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) {
to_return = _getTValues(tAmount, takeFee);
(to_return.rAmount, to_return.rTransferAmount, to_return.rRfi, to_return.rToSwap) = _getRValues(to_return, tAmount, takeFee, _getRate());
return to_return;
}
function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) {
if(!takeFee) {
s.tTransferAmount = tAmount;
return s;
}
s.tRfi = tAmount*appliedRates.rfi/100;
s.tToSwap = tAmount*appliedRates.toSwap/100;
s.tTransferAmount = tAmount-s.tRfi-s.tToSwap;
return s;
}
function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi, uint256 rToSwap) {
rAmount = tAmount*currentRate;
if(!takeFee) {
return(rAmount, rAmount,0,0);
}
rRfi = s.tRfi*currentRate;
rToSwap = s.tToSwap*currentRate;
rTransferAmount = rAmount-rRfi-rToSwap;
return (rAmount, rTransferAmount, rRfi,rToSwap);
}
function _getRate() private view returns(uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply/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 -=_rOwned[_excluded[i]];
tSupply -=_tOwned[_excluded[i]];
}
if (rSupply < _rTotal/_tTotal) return (_rTotal, _tTotal);
return (rSupply, tSupply);
}
function _approve(address owner, address spender, uint256 amount) private {
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) private {
if(liqAddedBlockNumber==0 && isAutomatedMarketMakerPair[to] )
{liqAddedBlockNumber = block.number;
}
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(!isBot[from], "ERC20: address blacklisted (bot)");
require(amount > 0, "Transfer amount must be greater than zero");
require(amount <= balanceOf(from),"You are trying to transfer more than your balance");
bool takeFee = !(_isExcludedFromFee[from] || _isExcludedFromFee[to]);
if(takeFee)
{
if(isAutomatedMarketMakerPair[from])
{
if(block.number<liqAddedBlockNumber+blocksToWait)
{
isBot[to] = true;
emit BlacklistedUser(to,true);
}
appliedRates = buyRates;
require(amount<=maxTxAmountBuy, "amount must be <= maxTxAmountBuy");
}
else
{
appliedRates = sellRates;
require(amount<=maxTxAmountSell, "amount must be <= maxTxAmountSell");
}
}
if (balanceOf(address(this)) >= numTokensSellToAddToLiquidity && !inSwapAndLiquify && !isAutomatedMarketMakerPair[from] && swapAndLiquifyEnabled) {
//add liquidity
swapAndLiquify(numTokensSellToAddToLiquidity);
}
_tokenTransfer(from, to, amount, takeFee);
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private {
valuesFromGetValues memory s = _getValues(tAmount, takeFee);
if (_isExcluded[sender]) {
_tOwned[sender] -= tAmount;
}
if (_isExcluded[recipient]) {
_tOwned[recipient] += s.tTransferAmount;
}
_rOwned[sender] -= s.rAmount;
_rOwned[recipient] += s.rTransferAmount;
if(takeFee)
{
_reflectRfi(s.rRfi, s.tRfi);
_takeToSwap(s.rToSwap,s.tToSwap);
emit Transfer(sender, address(this), s.tToSwap);
}
require(_isExcludedFromMaxWallet[recipient] || balanceOf(recipient)<= maxWalletAmount, "Recipient cannot hold more than maxWalletAmount");
emit Transfer(sender, recipient, s.tTransferAmount);
}
function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
uint256 denominator = appliedRates.toSwap*2;
uint256 tokensToAddLiquidityWith = contractTokenBalance*appliedRates.autolp/denominator;
uint256 toSwap = contractTokenBalance-tokensToAddLiquidityWith;
uint256 initialBalance = address(this).balance;
// swap tokens for ETH
swapTokensForETH(toSwap);
uint256 deltaBalance = address(this).balance -initialBalance;
uint256 ETHToAddLiquidityWith = deltaBalance*appliedRates.autolp/ (denominator- appliedRates.autolp);
// add liquidity to Uniswap
addLiquidity(tokensToAddLiquidityWith, ETHToAddLiquidityWith);
marketingAddress.sendValue(address(this).balance); //we give the remaining tax to marketing (5/8 of the toSwap tax)
}
function swapTokensForETH(uint256 tokenAmount) private {
// generate the Pancakeswap pair path of token -> wETH
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = UniswapV2Router.WETH();
if(allowance(address(this), address(UniswapV2Router)) < tokenAmount) {
_approve(address(this), address(UniswapV2Router), ~uint256(0));
}
// make the swap
UniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private {
// add the liquidity
UniswapV2Router.addLiquidityETH{value: ETHAmount}(
address(this),
tokenAmount,
0, // slippage is unavoidable
0, // slippage is unavoidable
owner(),
block.timestamp
);
emit LiquidityAdded(tokenAmount, ETHAmount);
}
function setAutomatedMarketMakerPair(address _pair, bool value) external onlyOwner{
require(isAutomatedMarketMakerPair[_pair] != value, "Automated market maker pair is already set to that value");
isAutomatedMarketMakerPair[_pair] = value;
if(value)
{
_isExcludedFromMaxWallet[_pair] = true;
emit ExcludeFromMaxWallet(_pair, value);
}
emit SetAutomatedMarketMakerPair(_pair, value);
}
function setBuyFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner
{
buyRates.rfi=_rfi;
buyRates.marketing=_marketing;
buyRates.autolp=_autolp;
buyRates.toSwap= _marketing+_autolp;
}
function setSellFees(uint8 _rfi,uint8 _marketing,uint8 _autolp) external onlyOwner
{
sellRates.rfi=_rfi;
sellRates.marketing=_marketing;
sellRates.autolp=_autolp;
sellRates.toSwap= _marketing+_autolp;
}
function setMaxTransactionAmountsPerK(uint256 _maxTxAmountBuyPer10K, uint256 _maxTxAmountSellPer10K) external onlyOwner
{
maxTxAmountBuy = _tTotal*_maxTxAmountBuyPer10K/10000;
maxTxAmountSell = _tTotal*_maxTxAmountSellPer10K/10000;
}
function setNumTokensSellToAddToLiq(uint256 amountTokens) external onlyOwner
{
numTokensSellToAddToLiquidity = amountTokens*10**_decimals;
}
function setMarketingAddress(address payable _marketingAddress) external onlyOwner
{
marketingAddress = _marketingAddress;
}
function manualSwapAndAddToLiq() external onlyOwner
{
swapAndLiquify(balanceOf(address(this)));
}
// Cannot BLACKLIST user manually, the only way to get into the Blacklist is to snipe, buy in block no.1. We give grace here if a genuine user can prove that they did not snipe in block 0 or 1.
function unblacklistSniper(address botAddress) external onlyOwner
{ require(!isBot[botAddress] ,"address provided is already not blacklisted");
isBot[botAddress] = false;
emit BlacklistedUser(botAddress,false);
}
function setMaxWalletAmount(uint256 _maxAmountWalletPer10K) external onlyOwner {
maxWalletAmount = _tTotal*_maxAmountWalletPer10K/10000;
emit MaxWalletAmountUpdated(maxWalletAmount);
}
function excludeFromMaxWallet(address account, bool excluded) external onlyOwner {
require(_isExcludedFromMaxWallet[account] != excluded, "_isExcludedFromMaxWallet already set to that value");
_isExcludedFromMaxWallet[account] = excluded;
emit ExcludeFromMaxWallet(account, excluded);
}
}
IUniswapV2Factory.sol 17 lines
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
IUniswapV2Router01.sol 95 lines
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
IUniswapV2Router02.sol 44 lines
pragma solidity >=0.6.2;
import './IUniswapV2Router01.sol';
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
Read Contract
UniswapV2Router 0x055add0d → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
blocksToWait 0xd8dcac4f → uint256
buyRates 0x73cafdc2 → uint8, uint8, uint8, uint8
decimals 0x313ce567 → uint8
isAutomatedMarketMakerPair 0x7949a403 → bool
isBot 0x3bbac579 → bool
isExcludedFromFee 0x5342acb4 → bool
isExcludedFromMaxWallet 0x6dd3d39f → bool
isExcludedFromReward 0x88f82020 → bool
liqAddedBlockNumber 0x8a0eef5a → uint256
marketingAddress 0xa5ece941 → address
maxTxAmountBuy 0xd6c180bf → uint256
maxTxAmountSell 0xd44e586e → uint256
maxWalletAmount 0xaa4bde28 → uint256
name 0x06fdde03 → string
numTokensSellToAddToLiquidity 0xd12a7688 → uint256
owner 0x8da5cb5b → address
reflectionFromToken 0x4549b039 → uint256
sellRates 0x713898cd → uint8, uint8, uint8, uint8
swapAndLiquifyEnabled 0x4a74bb02 → bool
symbol 0x95d89b41 → string
tokenFromReflection 0x2d838119 → uint256
totFeesPaid 0x9ba5e4d5 → uint256, uint256
totalSupply 0x18160ddd → uint256
uniswapPair 0xc816841b → address
Write Contract 23 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFee 0x437823ec
address account
excludeFromMaxWallet 0xd2fcc001
address account
bool excluded
excludeFromReward 0x52390c02
address account
excludeMultipleAccountsFromMaxWallet 0xbd94545b
address[] accounts
bool excluded
includeInFee 0xea2f0b37
address account
includeInReward 0x3685d419
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
manualSwapAndAddToLiq 0x958b0f20
No parameters
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address _pair
bool value
setBuyFees 0x50be7cdb
uint8 _rfi
uint8 _marketing
uint8 _autolp
setMarketingAddress 0x906e9dd0
address _marketingAddress
setMaxTransactionAmountsPerK 0x79eb8d1d
uint256 _maxTxAmountBuyPer10K
uint256 _maxTxAmountSellPer10K
setMaxWalletAmount 0x27a14fc2
uint256 _maxAmountWalletPer10K
setNumTokensSellToAddToLiq 0x04679780
uint256 amountTokens
setSellFees 0xe22b62de
uint8 _rfi
uint8 _marketing
uint8 _autolp
setSwapAndLiquifyEnabled 0xc49b9a80
bool _enabled
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
unblacklistSniper 0x15952f54
address botAddress
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address