Address Contract Partially Verified
Address
0x17Ce5A8187c817D659B21083455455A092a173BB
Balance
0 ETH
Nonce
1
Code Size
17416 bytes
Creator
0x2638ec30...2f06 at tx 0x2e35d0e8...b3ed95
Indexed Transactions
0
Contract Bytecode
17416 bytes
0x60806040526004361061042a5760003560e01c806385ecfd2811610229578063c876d0b91161012e578063ee40166e116100b6578063f63743421161007a578063f637434214610c37578063f771cb6514610c4d578063f7a886a214610c67578063f8b45b0514610c7d578063fb002c9714610c9357600080fd5b8063ee40166e14610bb6578063efda116514610bcc578063f11a24d314610bec578063f2fde38b14610c02578063f5648a4f14610c2257600080fd5b8063dd62ed3e116100fd578063dd62ed3e14610b05578063e2f4560514610b4b578063e884f26014610b61578063ea4cfe1214610b76578063eb472fc414610b9657600080fd5b8063c876d0b914610a95578063d257b34f14610aaf578063d85ba06314610acf578063dc3f0d0f14610ae557600080fd5b8063a62068ce116101b1578063bbc0c74211610180578063bbc0c742146109f6578063c024666814610a15578063c17b5b8c14610a35578063c18bc19514610a55578063c7b14ef814610a7557600080fd5b8063a62068ce14610970578063a9059cbb14610986578063b62496f5146109a6578063b9875539146109d657600080fd5b806397e875e8116101f857806397e875e8146108e35780639a5bd2dd146108f95780639a7a23d61461091b578063a28e86d31461093b578063a457c2d71461095057600080fd5b806385ecfd281461086a57806388e765ff1461089a5780638da5cb5b146108b057806395d89b41146108ce57600080fd5b806351f205e41161032f57806370a08231116102b75780638095d564116102865780638095d564146107d457806380b99b8e146107f457806382aa7c681461080a5780638366e79a1461082a57806385b12c7c1461084a57600080fd5b806370a082311461076a578063715018a61461078a578063751039fc1461079f5780637571336a146107b457600080fd5b80635eed98e2116102fe5780635eed98e2146106f357806366d602ae146107085780636a486a8e1461071e5780636b0a894c146107345780636ddd17131461074a57600080fd5b806351f205e41461069157806358a6d531146106a65780635a139dd4146106bd5780635bb988c9146106d357600080fd5b80632929abe6116103b2578063452ed4f111610381578063452ed4f1146106015780634724a2cd14610621578063499b8394146106415780634a62bb65146106615780634f77f6c01461067b57600080fd5b80632929abe6146105855780632be32b61146105a5578063313ce567146105c557806339509351146105e157600080fd5b806310d5de53116103f957806310d5de53146104e05780631805805b1461051057806318160ddd146105305780631a8145bb1461054f57806323b872dd1461056557600080fd5b806306fdde03146104365780630758d92414610461578063095ea7b3146104995780630fcdfb94146104c957600080fd5b3661043157005b600080fd5b34801561044257600080fd5b5061044b610ca9565b6040516104589190613c43565b60405180910390f35b34801561046d57600080fd5b50600954610481906001600160a01b031681565b6040516001600160a01b039091168152602001610458565b3480156104a557600080fd5b506104b96104b4366004613ca9565b610d3b565b6040519015158152602001610458565b3480156104d557600080fd5b506104de610d52565b005b3480156104ec57600080fd5b506104b96104fb366004613cd5565b60266020526000908152604090205460ff1681565b34801561051c57600080fd5b506104de61052b366004613cd5565b610e10565b34801561053c57600080fd5b506002545b604051908152602001610458565b34801561055b57600080fd5b5061054160225481565b34801561057157600080fd5b506104b9610580366004613cf9565b610ec6565b34801561059157600080fd5b506104de6105a0366004613e10565b610f70565b3480156105b157600080fd5b506104de6105c0366004613ed2565b6110cf565b3480156105d157600080fd5b5060405160128152602001610458565b3480156105ed57600080fd5b506104b96105fc366004613ca9565b611270565b34801561060d57600080fd5b50600a54610481906001600160a01b031681565b34801561062d57600080fd5b506104de61063c366004613cd5565b6112ac565b34801561064d57600080fd5b506104de61065c366004613cd5565b611346565b34801561066d57600080fd5b506013546104b99060ff1681565b34801561068757600080fd5b50610541601e5481565b34801561069d57600080fd5b506104de6113e0565b3480156106b257600080fd5b50600f5443106104b9565b3480156106c957600080fd5b5061054160175481565b3480156106df57600080fd5b506104de6106ee366004613cd5565b6114e9565b3480156106ff57600080fd5b506104de61159c565b34801561071457600080fd5b5061054160075481565b34801561072a57600080fd5b50610541601d5481565b34801561074057600080fd5b5061054160125481565b34801561075657600080fd5b506013546104b99062010000900460ff1681565b34801561077657600080fd5b50610541610785366004613cd5565b611628565b34801561079657600080fd5b506104de611643565b3480156107ab57600080fd5b506104de6116b7565b3480156107c057600080fd5b506104de6107cf366004613ef9565b6116ed565b3480156107e057600080fd5b506104de6107ef366004613f32565b6117b5565b34801561080057600080fd5b5061054160205481565b34801561081657600080fd5b506104de610825366004613ed2565b611858565b34801561083657600080fd5b506104b9610845366004613f5e565b61194c565b34801561085657600080fd5b506104de610865366004613ed2565b611b86565b34801561087657600080fd5b506104b9610885366004613cd5565b60106020526000908152604090205460ff1681565b3480156108a657600080fd5b5061054160065481565b3480156108bc57600080fd5b506005546001600160a01b0316610481565b3480156108da57600080fd5b5061044b611d73565b3480156108ef57600080fd5b5061054160195481565b34801561090557600080fd5b5061090e611d82565b6040516104589190613fd0565b34801561092757600080fd5b506104de610936366004613ef9565b611de3565b34801561094757600080fd5b506104de611ed7565b34801561095c57600080fd5b506104b961096b366004613ca9565b611f10565b34801561097c57600080fd5b50610541600f5481565b34801561099257600080fd5b506104b96109a1366004613ca9565b611fa9565b3480156109b257600080fd5b506104b96109c1366004613cd5565b60276020526000908152604090205460ff1681565b3480156109e257600080fd5b506104de6109f1366004613fe3565b611fb6565b348015610a0257600080fd5b506013546104b990610100900460ff1681565b348015610a2157600080fd5b506104de610a30366004613ef9565b612075565b348015610a4157600080fd5b506104de610a50366004613f32565b6120fe565b348015610a6157600080fd5b506104de610a70366004613ed2565b6121a1565b348015610a8157600080fd5b50600d54610481906001600160a01b031681565b348015610aa157600080fd5b506015546104b99060ff1681565b348015610abb57600080fd5b506104de610aca366004613ed2565b612340565b348015610adb57600080fd5b5061054160165481565b348015610af157600080fd5b506104de610b00366004613ed2565b61248b565b348015610b1157600080fd5b50610541610b20366004613f5e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b348015610b5757600080fd5b50610541600b5481565b348015610b6d57600080fd5b506104de612626565b348015610b8257600080fd5b50600c54610481906001600160a01b031681565b348015610ba257600080fd5b50610481610bb1366004613ed2565b61265c565b348015610bc257600080fd5b50610541600e5481565b348015610bd857600080fd5b506104de610be7366004613ed2565b612686565b348015610bf857600080fd5b5061054160185481565b348015610c0e57600080fd5b506104de610c1d366004613cd5565b612887565b348015610c2e57600080fd5b506104de612972565b348015610c4357600080fd5b50610541601f5481565b348015610c5957600080fd5b506024546104b99060ff1681565b348015610c7357600080fd5b5061054160235481565b348015610c8957600080fd5b5061054160085481565b348015610c9f57600080fd5b5061054160215481565b606060038054610cb890614000565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce490614000565b8015610d315780601f10610d0657610100808354040283529160200191610d31565b820191906000526020600020905b815481529060010190602001808311610d1457829003601f168201915b5050505050905090565b6000610d483384846129de565b5060015b92915050565b6005546001600160a01b03163314610d855760405162461bcd60e51b8152600401610d7c9061403a565b60405180910390fd5b60245460ff1615610dd85760405162461bcd60e51b815260206004820152601860248201527f53656c6c696e6720616c726561647920656e61626c65642100000000000000006044820152606401610d7c565b6024805460ff191660011790556040517f7fdc9c6ba047bed382d2ae7be131e601f2fead137f249278e33c13a6928b080890600090a1565b6005546001600160a01b03163314610e3a5760405162461bcd60e51b8152600401610d7c9061403a565b601354610100900460ff1615610ea45760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f74207570646174652061667465722074726164696e6720697320666044820152681d5b98dd1a5bdb985b60ba1b6064820152608401610d7c565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ed3848484612b02565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610f585760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610d7c565b610f6585338584036129de565b506001949350505050565b6005546001600160a01b03163314610f9a5760405162461bcd60e51b8152600401610d7c9061403a565b8051825114610feb5760405162461bcd60e51b815260206004820152601e60248201527f617272617973206d757374206265207468652073616d65206c656e67746800006044820152606401610d7c565b60c88251106110625760405162461bcd60e51b815260206004820152603960248201527f43616e206f6e6c792064697374726962757465203230302077616c6c6574732060448201527f7065722074786e2064756520746f20676173206c696d697473000000000000006064820152608401610d7c565b60005b82518110156110ca5760008382815181106110825761108261406f565b6020026020010151905060008383815181106110a0576110a061406f565b602002602001015190506110b5338383613661565b505080806110c29061409b565b915050611065565b505050565b6005546001600160a01b031633146110f95760405162461bcd60e51b8152600401610d7c9061403a565b670de0b6b3a76400006103e861110e60025490565b6111199060056140b4565b61112391906140cb565b61112d91906140cb565b81101561118e5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f7420736574206d61782062757920616d6f756e74206c6f776572206044820152687468616e20302e352560b81b6064820152608401610d7c565b670de0b6b3a764000060646111a260025490565b6111ad9060026140b4565b6111b791906140cb565b6111c191906140cb565b8111156112225760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f7420736574206275792073656c6c20616d6f756e7420686967686560448201526872207468616e20322560b81b6064820152608401610d7c565b61123481670de0b6b3a76400006140b4565b60068190556040519081527ffcc0366804aaa8dbf88a2924100c733b70dec8445957a5d5f8ff92898de41009906020015b60405180910390a150565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610d489185906112a79086906140ed565b6129de565b6005546001600160a01b031633146112d65760405162461bcd60e51b8152600401610d7c9061403a565b6001600160a01b0381166112fc5760405162461bcd60e51b8152600401610d7c90614100565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517f3ab9b916478d7dc1270b6f730a941f8138b10b9bc2cc3a9c165ed2708c269a8d90600090a250565b6005546001600160a01b031633146113705760405162461bcd60e51b8152600401610d7c9061403a565b6001600160a01b0381166113965760405162461bcd60e51b8152600401610d7c90614100565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f4efa56652237561d0f1fd31311aeaaa41f3b754a461545ed3cf6ced5876d298290600090a250565b6005546001600160a01b0316331461140a5760405162461bcd60e51b8152600401610d7c9061403a565b600b5461141630611628565b101561148c576040805162461bcd60e51b81526020600482015260248101919091527f43616e206f6e6c792073776170207768656e20746f6b656e20616d6f756e742060448201527f6973206174206f7220686967686572207468616e207265737472696374696f6e6064820152608401610d7c565b600a805460ff60a01b1916600160a01b1790556114a76137b6565b600a805460ff60a01b191690556040514281527f1b56c383f4f48fc992e45667ea4eabae777b9cca68b516a9562d8cda78f1bb329060200160405180910390a1565b6005546001600160a01b031633146115135760405162461bcd60e51b8152600401610d7c9061403a565b6001600160a01b03811660009081526010602052604090205460ff1661157b5760405162461bcd60e51b815260206004820152601e60248201527f57616c6c657420697320616c7265616479206e6f7420666c61676765642e00006044820152606401610d7c565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6005546001600160a01b031633146115c65760405162461bcd60e51b8152600401610d7c9061403a565b601a546017819055601b546018819055601c546019819055916115e991906140ed565b6115f391906140ed565b601655601a54601e819055601b54601f819055601c5460208190559161161991906140ed565b61162391906140ed565b601d55565b6001600160a01b031660009081526020819052604090205490565b6005546001600160a01b0316331461166d5760405162461bcd60e51b8152600401610d7c9061403a565b6005546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600580546001600160a01b0319169055565b6005546001600160a01b031633146116e15760405162461bcd60e51b8152600401610d7c9061403a565b6013805460ff19169055565b6005546001600160a01b031633146117175760405162461bcd60e51b8152600401610d7c9061403a565b8061178a57600a546001600160a01b039081169083160361178a5760405162461bcd60e51b815260206004820152602760248201527f43616e6e6f742072656d6f766520756e697377617020706169722066726f6d2060448201526636b0bc103a3c3760c91b6064820152608401610d7c565b6001600160a01b03919091166000908152602660205260409020805460ff1916911515919091179055565b6005546001600160a01b031633146117df5760405162461bcd60e51b8152600401610d7c9061403a565b601783905560188290556019819055806117f983856140ed565b61180391906140ed565b6016819055600a10156110ca5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420313025206f72206c6573730000006044820152606401610d7c565b6005546001600160a01b031633146118825760405162461bcd60e51b8152600401610d7c9061403a565b601354610100900460ff16156118da5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207265656e61626c652074726164696e670000000000000000006044820152606401610d7c565b600a8111156118fb5760405162461bcd60e51b8152600401610d7c90614146565b6013805462ffff0019166201010017905543600e81905561191d9082906140ed565b600f556040517fa56feb2d31b9a7424db0be063fd450863979c9e2382cf5110f869bd1ad361bb790600090a150565b6005546000906001600160a01b031633146119795760405162461bcd60e51b8152600401610d7c9061403a565b6001600160a01b0383166119cf5760405162461bcd60e51b815260206004820152601a60248201527f5f746f6b656e20616464726573732063616e6e6f7420626520300000000000006044820152606401610d7c565b6001600160a01b038316301415806119ef5750601354610100900460ff16155b611a585760405162461bcd60e51b815260206004820152603460248201527f43616e2774207769746864726177206e617469766520746f6b656e73207768696044820152736c652074726164696e672069732061637469766560601b6064820152608401610d7c565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015611a9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac3919061418d565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509085169063a9059cbb906044016020604051808303816000875af1158015611b16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3a91906141a6565b604080516001600160a01b0387168152602081018490529193507fdeda980967fcead7b61e78ac46a4da14274af29e894d4d61e8b81ec38ab3e438910160405180910390a15092915050565b6005546001600160a01b03163314611bb05760405162461bcd60e51b8152600401610d7c9061403a565b601354610100900460ff1615611bd85760405162461bcd60e51b8152600401610d7c906141c3565b600a8110611bf85760405162461bcd60e51b8152600401610d7c90614146565b6013805462ffff0019166201010017905543600e819055611c1a9082906140ed565b600f556040517fa56feb2d31b9a7424db0be063fd450863979c9e2382cf5110f869bd1ad361bb790600090a160004711611c665760405162461bcd60e51b8152600401610d7c9061420e565b6000611c7130611628565b11611ccd5760405162461bcd60e51b815260206004820152602660248201527f4d757374206861766520546f6b656e73206f6e20636f6e747261637420746f206044820152650d8c2eadcc6d60d31b6064820152608401610d7c565b600954611ce89030906001600160a01b03166112a782611628565b6009546001600160a01b031663f305d7194730611d0481611628565b60008030426040518863ffffffff1660e01b8152600401611d2a96959493929190614251565b60606040518083038185885af1158015611d48573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611d6d919061428c565b50505050565b606060048054610cb890614000565b60606011805480602002602001604051908101604052809291908181526020018280548015610d3157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611dbc575050505050905090565b6005546001600160a01b03163314611e0d5760405162461bcd60e51b8152600401610d7c9061403a565b600a546001600160a01b0390811690831603611e915760405162461bcd60e51b815260206004820152603960248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201527f6175746f6d617465644d61726b65744d616b65725061697273000000000000006064820152608401610d7c565b611e9b82826139be565b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6005546001600160a01b03163314611f015760405162461bcd60e51b8152600401610d7c9061403a565b6013805460ff19166001179055565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611f925760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610d7c565b611f9f33858584036129de565b5060019392505050565b6000610d48338484612b02565b6005546001600160a01b03163314611fe05760405162461bcd60e51b8152600401610d7c9061403a565b8061202d5760405162461bcd60e51b815260206004820152601f60248201527f506c6561736520636f6e6669726d20616464696e67206f6620746865204c50006044820152606401610d7c565b601354610100900460ff16156120555760405162461bcd60e51b8152600401610d7c906141c3565b60004711611c665760405162461bcd60e51b8152600401610d7c9061420e565b6005546001600160a01b0316331461209f5760405162461bcd60e51b8152600401610d7c9061403a565b6001600160a01b038216600081815260256020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b031633146121285760405162461bcd60e51b8152600401610d7c9061403a565b601e839055601f82905560208190558061214283856140ed565b61214c91906140ed565b601d819055600c10156110ca5760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420313225206f72206c6573730000006044820152606401610d7c565b6005546001600160a01b031633146121cb5760405162461bcd60e51b8152600401610d7c9061403a565b670de0b6b3a76400006103e86121e060025490565b6121eb9060056140b4565b6121f591906140cb565b6121ff91906140cb565b8110156122635760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f7420736574206d61782077616c6c657420616d6f756e74206c6f7760448201526b6572207468616e20302e352560a01b6064820152608401610d7c565b670de0b6b3a7640000606461227760025490565b6122829060026140b4565b61228c91906140cb565b61229691906140cb565b8111156122f95760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f7420736574206d61782077616c6c657420616d6f756e742068696760448201526a686572207468616e20322560a81b6064820152608401610d7c565b61230b81670de0b6b3a76400006140b4565b60088190556040519081527fefc9add9a9b7382de284ef5ad69d8ea863e2680492b21a81948c2d5f04a442bc90602001611265565b6005546001600160a01b0316331461236a5760405162461bcd60e51b8152600401610d7c9061403a565b620186a061237760025490565b6123829060016140b4565b61238c91906140cb565b8110156123f95760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b6064820152608401610d7c565b6103e861240560025490565b6124109060016140b4565b61241a91906140cb565b8111156124865760405162461bcd60e51b815260206004820152603460248201527f5377617020616d6f756e742063616e6e6f742062652068696768657220746861604482015273371018171892903a37ba30b61039bab838363c9760611b6064820152608401610d7c565b600b55565b6005546001600160a01b031633146124b55760405162461bcd60e51b8152600401610d7c9061403a565b670de0b6b3a76400006103e86124ca60025490565b6124d59060056140b4565b6124df91906140cb565b6124e991906140cb565b81101561254b5760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420736574206d61782073656c6c20616d6f756e74206c6f776572604482015269207468616e20302e352560b01b6064820152608401610d7c565b670de0b6b3a7640000606461255f60025490565b61256a9060026140b4565b61257491906140cb565b61257e91906140cb565b8111156125df5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f7420736574206d61782073656c6c20616d6f756e7420686967686560448201526872207468616e20322560b81b6064820152608401610d7c565b6125f181670de0b6b3a76400006140b4565b60078190556040519081527f53c4eb831d8cfeb750f1c62590d8cd30f4c6f0380d29a05caa09f0d92588560e90602001611265565b6005546001600160a01b031633146126505760405162461bcd60e51b8152600401610d7c9061403a565b6015805460ff19169055565b6011818154811061266c57600080fd5b6000918252602090912001546001600160a01b0316905081565b6005546001600160a01b031633146126b05760405162461bcd60e51b8152600401610d7c9061403a565b600a546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156126f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061271d919061418d565b90506000811161276f5760405162461bcd60e51b815260206004820152601860248201527f4e6f204c5020746f6b656e7320696e20636f6e747261637400000000000000006044820152606401610d7c565b600061271061277e84846140b4565b61278891906140cb565b600a5460095460405163095ea7b360e01b81526001600160a01b03918216600482015260248101849052929350169063095ea7b3906044016020604051808303816000875af11580156127df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061280391906141a6565b50600954604051629d473b60e21b81526001600160a01b03909116906302751cec9061283e9030908590600190819033904290600401614251565b60408051808303816000875af115801561285c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288091906142ba565b5050505050565b6005546001600160a01b031633146128b15760405162461bcd60e51b8152600401610d7c9061403a565b6001600160a01b0381166129165760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d7c565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b0316331461299c5760405162461bcd60e51b8152600401610d7c9061403a565b604051600090339047908381818185875af1925050503d8060008114611d6d576040519150601f19603f3d011682016040523d82523d6000602084013e611d6d565b6001600160a01b038316612a405760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610d7c565b6001600160a01b038216612aa15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610d7c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316612b285760405162461bcd60e51b8152600401610d7c906142de565b6001600160a01b038216612b4e5760405162461bcd60e51b8152600401610d7c90614323565b60008111612b9e5760405162461bcd60e51b815260206004820152601d60248201527f616d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610d7c565b601354610100900460ff16612c31576001600160a01b03831660009081526025602052604090205460ff1680612bec57506001600160a01b03821660009081526025602052604090205460ff165b612c315760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b6044820152606401610d7c565b600f544310158015612c4a5750601354610100900460ff165b15612d1a576001600160a01b03831660009081526010602052604090205460ff161580612c8457506005546001600160a01b038381169116145b80612c9957506001600160a01b03821661dead145b612d1a5760405162461bcd60e51b815260206004820152604660248201527f426f74732063616e6e6f74207472616e7366657220746f6b656e7320696e206f60448201527f72206f75742065786365707420746f206f776e6572206f722064656164206164606482015265323932b9b99760d11b608482015260a401610d7c565b60135460ff1615613140576005546001600160a01b03848116911614801590612d5157506005546001600160a01b03838116911614155b8015612d6857506001600160a01b03821661dead14155b8015612d8d57506001600160a01b03831660009081526025602052604090205460ff16155b8015612db257506001600160a01b03821660009081526025602052604090205460ff16155b156131405760155460ff1615612ecb576009546001600160a01b03838116911614801590612dee5750600a546001600160a01b03838116911614155b15612ecb57612dfe600243614366565b32600090815260146020526040902054108015612e3c5750612e21600243614366565b6001600160a01b038316600090815260146020526040902054105b612ea65760405162461bcd60e51b815260206004820152603560248201527f5f7472616e736665723a3a205472616e736665722044656c617920656e61626c60448201527432b21710102a393c9030b3b0b4b7103630ba32b91760591b6064820152608401610d7c565b3260009081526014602052604080822043908190556001600160a01b03851683529120555b6001600160a01b03831660009081526027602052604090205460ff168015612f0c57506001600160a01b03821660009081526026602052604090205460ff16155b15612fd357600654811115612f745760405162461bcd60e51b815260206004820152602860248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201526736b0bc10313abc9760c11b6064820152608401610d7c565b600854612f8083611628565b612f8a90836140ed565b1115612fce5760405162461bcd60e51b815260206004820152601360248201527213585e0815d85b1b195d08115e18d959591959606a1b6044820152606401610d7c565b613140565b6001600160a01b03821660009081526027602052604090205460ff16801561301457506001600160a01b03831660009081526026602052604090205460ff16155b156130c65760245460ff166130615760405162461bcd60e51b815260206004820152601360248201527214d95b1b1a5b99c81a5cc8191a5cd8589b1959606a1b6044820152606401610d7c565b600754811115612fce5760405162461bcd60e51b815260206004820152602a60248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152691036b0bc1039b2b6361760b11b6064820152608401610d7c565b6001600160a01b03821660009081526026602052604090205460ff16613140576008546130f283611628565b6130fc90836140ed565b11156131405760405162461bcd60e51b815260206004820152601360248201527213585e0815d85b1b195d08115e18d959591959606a1b6044820152606401610d7c565b600061314b30611628565b600b549091508110801590819061316a575060135462010000900460ff165b80156131805750600a54600160a01b900460ff16155b80156131a457506001600160a01b03841660009081526027602052604090205460ff165b156131d257600a805460ff60a01b1916600160a01b1790556131c46137b6565b600a805460ff60a01b191690555b6001600160a01b03851660009081526025602052604090205460019060ff168061321457506001600160a01b03851660009081526025602052604090205460ff165b1561321d575060005b6000811561364d57600f544310806132635750670c7d713b49da00006006546132469190614366565b8510158015613263575043600f54600861326091906140ed565b10155b801561328757506001600160a01b03871660009081526027602052604090205460ff165b80156132ac57506001600160a01b03861660009081526027602052604090205460ff16155b80156132d157506001600160a01b03861660009081526025602052604090205460ff16155b80156132df57506000601654115b1561349657600f544310613306576001600660008282546133009190614366565b90915550505b6001600160a01b03861660009081526010602052604090205460ff166133e6576001600160a01b0386166000908152601060205260408120805460ff19166001908117909155601280549192909161335f9084906140ed565b9091555050601180546001810182556000919091527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680180546001600160a01b0319166001600160a01b0388169081179091556040519081527f55678e47d0a699d3ab99b0184c4ff14f2246ba80522deb921aa0c8823578c44a9060200160405180910390a15b60646133f38660636140b4565b6133fd91906140cb565b90506016546018548261341091906140b4565b61341a91906140cb565b6022600082825461342b91906140ed565b909155505060165460175461344090836140b4565b61344a91906140cb565b6021600082825461345b91906140ed565b909155505060165460195461347090836140b4565b61347a91906140cb565b6023600082825461348b91906140ed565b9091555061362f9050565b6001600160a01b03861660009081526027602052604090205460ff1680156134c057506000601d54115b15613552576064601d54866134d591906140b4565b6134df91906140cb565b9050601d54601f54826134f291906140b4565b6134fc91906140cb565b6022600082825461350d91906140ed565b9091555050601d54601e5461352290836140b4565b61352c91906140cb565b6021600082825461353d91906140ed565b9091555050601d5460205461347090836140b4565b6001600160a01b03871660009081526027602052604090205460ff16801561357c57506000601654115b1561362f5760646016548661359191906140b4565b61359b91906140cb565b9050601654601854826135ae91906140b4565b6135b891906140cb565b602260008282546135c991906140ed565b90915550506016546017546135de90836140b4565b6135e891906140cb565b602160008282546135f991906140ed565b909155505060165460195461360e90836140b4565b61361891906140cb565b6023600082825461362991906140ed565b90915550505b801561364057613640873083613661565b61364a8186614366565b94505b613658878787613661565b50505050505050565b6001600160a01b0383166136875760405162461bcd60e51b8152600401610d7c906142de565b6001600160a01b0382166136ad5760405162461bcd60e51b8152600401610d7c90614323565b6001600160a01b038316600090815260208190526040902054818110156137255760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610d7c565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061375c9084906140ed565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516137a891815260200190565b60405180910390a350505050565b60006137c130611628565b905060006023546021546022546137d891906140ed565b6137e291906140ed565b90508115806137ef575080155b156137f8575050565b600b5461380690600a6140b4565b82111561381e57600b5461381b90600a6140b4565b91505b6000806002836022548661383291906140b4565b61383c91906140cb565b61384691906140cb565b905061385a6138558286614366565b6139ec565b60225447908190600090613870906002906140cb565b61387a9087614366565b60215461388790856140b4565b61389191906140cb565b9050600060026022546138a491906140cb565b6138ae9088614366565b6023546138bb90866140b4565b6138c591906140cb565b90506138d181836140ed565b6138db9084614366565b600060228190556021819055602355925084158015906138fb5750600083115b1561390a5761390a8584613b46565b600d546040516001600160a01b03909116908290600081818185875af1925050503d8060008114613957576040519150601f19603f3d011682016040523d82523d6000602084013e61395c565b606091505b5050600c546040519197506001600160a01b0316904790600081818185875af1925050503d80600081146139ac576040519150601f19603f3d011682016040523d82523d6000602084013e6139b1565b606091505b5050505050505050505050565b6001600160a01b0382166000908152602760205260409020805460ff1916821515179055611e9b8282613be0565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110613a2157613a2161406f565b6001600160a01b03928316602091820292909201810191909152600954604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015613a7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a9e9190614379565b81600181518110613ab157613ab161406f565b6001600160a01b039283166020918202929092010152600954613ad791309116846129de565b60095460405163791ac94760e01b81526001600160a01b039091169063791ac94790613b10908590600090869030904290600401614396565b600060405180830381600087803b158015613b2a57600080fd5b505af1158015613b3e573d6000803e3d6000fd5b505050505050565b600954613b5e9030906001600160a01b0316846129de565b60095460405163f305d71960e01b81526001600160a01b039091169063f305d719908390613b9d9030908790600090819061dead904290600401614251565b60606040518083038185885af1158015613bbb573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612880919061428c565b6001600160a01b038216600081815260266020908152604091829020805460ff19168515159081179091558251938452908301527f6b4f1be9103e6cbcd38ca4a922334f2c3109b260130a6676a987f94088fd6746910160405180910390a15050565b600060208083528351808285015260005b81811015613c7057858101830151858201604001528201613c54565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114613ca657600080fd5b50565b60008060408385031215613cbc57600080fd5b8235613cc781613c91565b946020939093013593505050565b600060208284031215613ce757600080fd5b8135613cf281613c91565b9392505050565b600080600060608486031215613d0e57600080fd5b8335613d1981613c91565b92506020840135613d2981613c91565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613d7957613d79613d3a565b604052919050565b600067ffffffffffffffff821115613d9b57613d9b613d3a565b5060051b60200190565b600082601f830112613db657600080fd5b81356020613dcb613dc683613d81565b613d50565b82815260059290921b84018101918181019086841115613dea57600080fd5b8286015b84811015613e055780358352918301918301613dee565b509695505050505050565b60008060408385031215613e2357600080fd5b823567ffffffffffffffff80821115613e3b57600080fd5b818501915085601f830112613e4f57600080fd5b81356020613e5f613dc683613d81565b82815260059290921b84018101918181019089841115613e7e57600080fd5b948201945b83861015613ea5578535613e9681613c91565b82529482019490820190613e83565b96505086013592505080821115613ebb57600080fd5b50613ec885828601613da5565b9150509250929050565b600060208284031215613ee457600080fd5b5035919050565b8015158114613ca657600080fd5b60008060408385031215613f0c57600080fd5b8235613f1781613c91565b91506020830135613f2781613eeb565b809150509250929050565b600080600060608486031215613f4757600080fd5b505081359360208301359350604090920135919050565b60008060408385031215613f7157600080fd5b8235613f7c81613c91565b91506020830135613f2781613c91565b600081518084526020808501945080840160005b83811015613fc55781516001600160a01b031687529582019590820190600101613fa0565b509495945050505050565b602081526000613cf26020830184613f8c565b600060208284031215613ff557600080fd5b8135613cf281613eeb565b600181811c9082168061401457607f821691505b60208210810361403457634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016140ad576140ad614085565b5060010190565b8082028115828204841417610d4c57610d4c614085565b6000826140e857634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610d4c57610d4c614085565b60208082526026908201527f5f6f7065726174696f6e734164647265737320616464726573732063616e6e6f60408201526507420626520360d41b606082015260800190565b60208082526027908201527f43616e6e6f74206d616b652070656e616c747920626c6f636b73206d6f72652060408201526607468616e2031360cc1b606082015260800190565b60006020828403121561419f57600080fd5b5051919050565b6000602082840312156141b857600080fd5b8151613cf281613eeb565b6020808252602b908201527f54726164696e6720697320616c7265616479206163746976652c2063616e6e6f60408201526a3a103932b630bab731b41760a91b606082015260800190565b60208082526023908201527f4d757374206861766520455448206f6e20636f6e747261637420746f206c61756040820152620dcc6d60eb1b606082015260800190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b6000806000606084860312156142a157600080fd5b8351925060208401519150604084015190509250925092565b600080604083850312156142cd57600080fd5b505080516020909101519092909150565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b81810381811115610d4c57610d4c614085565b60006020828403121561438b57600080fd5b8151613cf281613c91565b85815284602082015260a0604082015260006143b560a0830186613f8c565b6001600160a01b039490941660608301525060800152939250505056fea2646970667358221220bb5d6e02ddd5ec76a2bffdd86c35ea79751ed70c714a73de87faa127d05d111164736f6c63430008110033
Verified Source Code Partial Match
Compiler: v0.8.17+commit.8df45f5f
EVM: london
Optimization: Yes (200 runs)
WorldBetInu.sol 1122 lines
// SPDX-License-Identifier: MIT
/*
* https://worldbetinu.io/
*
* TG: https://t.me/WorldBetInu
* TW: https://twitter.com/WorldBetInu
* MD: https://medium.com/@worldbetinu
*/
pragma solidity 0.8.17;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount)
external
returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender)
external
view
returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function decimals() public view virtual override returns (uint8) {
return 18;
}
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account)
public
view
virtual
override
returns (uint256)
{
return _balances[account];
}
function transfer(address recipient, uint256 amount)
public
virtual
override
returns (bool)
{
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender)
public
view
virtual
override
returns (uint256)
{
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount)
public
virtual
override
returns (bool)
{
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(
currentAllowance >= amount,
"ERC20: transfer amount exceeds allowance"
);
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
function increaseAllowance(address spender, uint256 addedValue)
public
virtual
returns (bool)
{
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] + addedValue
);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue)
public
virtual
returns (bool)
{
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(
currentAllowance >= subtractedValue,
"ERC20: decreased allowance below zero"
);
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
uint256 senderBalance = _balances[sender];
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
}
function _createInitialSupply(address account, uint256 amount)
internal
virtual
{
require(account != address(0), "ERC20: mint to the zero address");
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
}
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() external virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
interface ILpPair {
function sync() external;
}
interface IDexRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
contract WorldBetInu is ERC20, Ownable {
uint256 public maxBuyAmount;
uint256 public maxSellAmount;
uint256 public maxWallet;
IDexRouter public dexRouter;
address public lpPair;
bool private swapping;
uint256 public swapTokensAtAmount;
address public operationsAddress;
address public bettingAddress;
uint256 public tradingActiveBlock = 0; // 0 means trading is not active
uint256 public blockForPenaltyEnd;
mapping(address => bool) public boughtEarly;
address[] public earlyBuyers;
uint256 public botsCaught;
bool public limitsInEffect = true;
bool public tradingActive = false;
bool public swapEnabled = false;
// Anti-bot and anti-whale mappings and variables
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
uint256 public buyTotalFees;
uint256 public buyOperationsFee;
uint256 public buyLiquidityFee;
uint256 public buyBettingFee;
uint256 private originalSellOperationsFee;
uint256 private originalSellLiquidityFee;
uint256 private originalSellBettingFee;
uint256 public sellTotalFees;
uint256 public sellOperationsFee;
uint256 public sellLiquidityFee;
uint256 public sellBettingFee;
uint256 public tokensForOperations;
uint256 public tokensForLiquidity;
uint256 public tokensForBetting;
bool public sellingEnabled = false;
/******************/
// exlcude from fees and max transaction amount
mapping(address => bool) private _isExcludedFromFees;
mapping(address => bool) public _isExcludedMaxTransactionAmount;
// store addresses that a automatic market maker pairs. Any transfer *to* these addresses
// could be subject to a maximum transfer amount
mapping(address => bool) public automatedMarketMakerPairs;
event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
event EnabledTrading();
event ExcludeFromFees(address indexed account, bool isExcluded);
event UpdatedMaxBuyAmount(uint256 newAmount);
event UpdatedMaxSellAmount(uint256 newAmount);
event UpdatedMaxWalletAmount(uint256 newAmount);
event UpdatedOperationsAddress(address indexed newWallet);
event UpdatedBettingAddress(address indexed newWallet);
event MaxTransactionExclusion(address _address, bool excluded);
event OwnerForcedSwapBack(uint256 timestamp);
event CaughtEarlyBuyer(address sniper);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiquidity
);
event TransferForeignToken(address token, uint256 amount);
event UpdatedPrivateMaxSell(uint256 amount);
event EnabledSelling();
constructor() payable ERC20("World Bet Inu", "WBI") {
address newOwner = msg.sender; // can leave alone if owner is deployer.
address _dexRouter;
if (block.chainid == 1) {
_dexRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // ETH: Uniswap V2
} else if (block.chainid == 5) {
_dexRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; // ETH: Goerli
} else {
revert("Chain not configured");
}
// initialize router
dexRouter = IDexRouter(_dexRouter);
// create pair
lpPair = IDexFactory(dexRouter.factory()).createPair(
address(this),
dexRouter.WETH()
);
_excludeFromMaxTransaction(address(lpPair), true);
_setAutomatedMarketMakerPair(address(lpPair), true);
uint256 totalSupply = 1 * 1e9 * 1e18; // 1 billion
maxBuyAmount = (totalSupply * 5) / 1000; // 0.5%
maxSellAmount = (totalSupply * 5) / 1000; // 0.5%
maxWallet = (totalSupply * 2) / 100; // 2%
swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05 %
buyOperationsFee = 7;
buyLiquidityFee = 1;
buyBettingFee = 0;
buyTotalFees = buyOperationsFee + buyLiquidityFee + buyBettingFee;
originalSellOperationsFee = 3;
originalSellLiquidityFee = 1;
originalSellBettingFee = 2;
sellOperationsFee = 11;
sellLiquidityFee = 2;
sellBettingFee = 0;
sellTotalFees = sellOperationsFee + sellLiquidityFee + sellBettingFee;
operationsAddress = address(0x2638ec30fF2336cA3AC01A645bdBe9A4eBe32f06);
bettingAddress = address(0x5EF301a27d743238CbaB8aab71ACbEa1b6AD9E5D);
_excludeFromMaxTransaction(newOwner, true);
_excludeFromMaxTransaction(address(this), true);
_excludeFromMaxTransaction(address(0xdead), true);
_excludeFromMaxTransaction(address(operationsAddress), true);
_excludeFromMaxTransaction(address(bettingAddress), true);
_excludeFromMaxTransaction(address(dexRouter), true);
excludeFromFees(newOwner, true);
excludeFromFees(address(this), true);
excludeFromFees(address(0xdead), true);
excludeFromFees(address(operationsAddress), true);
excludeFromFees(address(bettingAddress), true);
excludeFromFees(address(dexRouter), true);
_createInitialSupply(address(0xdead), (totalSupply * 16) / 100); // Burn
_createInitialSupply(address(this), (totalSupply * 50) / 100); // Tokens for liquidity
_createInitialSupply(newOwner, (totalSupply * 34) / 100); // Lock
transferOwnership(newOwner);
}
receive() external payable {}
function enableTrading(uint256 blocksForPenalty) external onlyOwner {
require(!tradingActive, "Cannot reenable trading");
require(
blocksForPenalty <= 10,
"Cannot make penalty blocks more than 10"
);
tradingActive = true;
swapEnabled = true;
tradingActiveBlock = block.number;
blockForPenaltyEnd = tradingActiveBlock + blocksForPenalty;
emit EnabledTrading();
}
function getEarlyBuyers() external view returns (address[] memory) {
return earlyBuyers;
}
function removeBoughtEarly(address wallet) external onlyOwner {
require(boughtEarly[wallet], "Wallet is already not flagged.");
boughtEarly[wallet] = false;
}
function emergencyUpdateRouter(address router) external onlyOwner {
require(!tradingActive, "Cannot update after trading is functional");
dexRouter = IDexRouter(router);
}
// disable Transfer delay - cannot be reenabled
function disableTransferDelay() external onlyOwner {
transferDelayEnabled = false;
}
function updateMaxBuyAmount(uint256 newNum) external onlyOwner {
require(
newNum >= ((totalSupply() * 5) / 1000) / 1e18,
"Cannot set max buy amount lower than 0.5%"
);
require(
newNum <= ((totalSupply() * 2) / 100) / 1e18,
"Cannot set buy sell amount higher than 2%"
);
maxBuyAmount = newNum * (10**18);
emit UpdatedMaxBuyAmount(maxBuyAmount);
}
function updateMaxSellAmount(uint256 newNum) external onlyOwner {
require(
newNum >= ((totalSupply() * 5) / 1000) / 1e18,
"Cannot set max sell amount lower than 0.5%"
);
require(
newNum <= ((totalSupply() * 2) / 100) / 1e18,
"Cannot set max sell amount higher than 2%"
);
maxSellAmount = newNum * (10**18);
emit UpdatedMaxSellAmount(maxSellAmount);
}
function updateMaxWalletAmount(uint256 newNum) external onlyOwner {
require(
newNum >= ((totalSupply() * 5) / 1000) / 1e18,
"Cannot set max wallet amount lower than 0.5%"
);
require(
newNum <= ((totalSupply() * 2) / 100) / 1e18,
"Cannot set max wallet amount higher than 2%"
);
maxWallet = newNum * (10**18);
emit UpdatedMaxWalletAmount(maxWallet);
}
// change the minimum amount of tokens to sell from fees
function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
require(
newAmount >= (totalSupply() * 1) / 100000,
"Swap amount cannot be lower than 0.001% total supply."
);
require(
newAmount <= (totalSupply() * 1) / 1000,
"Swap amount cannot be higher than 0.1% total supply."
);
swapTokensAtAmount = newAmount;
}
function _excludeFromMaxTransaction(address updAds, bool isExcluded)
private
{
_isExcludedMaxTransactionAmount[updAds] = isExcluded;
emit MaxTransactionExclusion(updAds, isExcluded);
}
function excludeFromMaxTransaction(address updAds, bool isEx)
external
onlyOwner
{
if (!isEx) {
require(
updAds != lpPair,
"Cannot remove uniswap pair from max txn"
);
}
_isExcludedMaxTransactionAmount[updAds] = isEx;
}
function setAutomatedMarketMakerPair(address pair, bool value)
external
onlyOwner
{
require(
pair != lpPair,
"The pair cannot be removed from automatedMarketMakerPairs"
);
_setAutomatedMarketMakerPair(pair, value);
emit SetAutomatedMarketMakerPair(pair, value);
}
function _setAutomatedMarketMakerPair(address pair, bool value) private {
automatedMarketMakerPairs[pair] = value;
_excludeFromMaxTransaction(pair, value);
emit SetAutomatedMarketMakerPair(pair, value);
}
function updateBuyFees(
uint256 _operationsFee,
uint256 _liquidityFee,
uint256 _bettingFee
) external onlyOwner {
buyOperationsFee = _operationsFee;
buyLiquidityFee = _liquidityFee;
buyBettingFee = _bettingFee;
buyTotalFees = buyOperationsFee + buyLiquidityFee + buyBettingFee;
require(buyTotalFees <= 10, "Must keep fees at 10% or less");
}
function updateSellFees(
uint256 _operationsFee,
uint256 _liquidityFee,
uint256 _bettingFee
) external onlyOwner {
sellOperationsFee = _operationsFee;
sellLiquidityFee = _liquidityFee;
sellBettingFee = _bettingFee;
sellTotalFees = sellOperationsFee + sellLiquidityFee + sellBettingFee;
require(sellTotalFees <= 12, "Must keep fees at 12% or less");
}
function restoreTaxes() external onlyOwner {
buyOperationsFee = originalSellOperationsFee;
buyLiquidityFee = originalSellLiquidityFee;
buyBettingFee = originalSellBettingFee;
buyTotalFees = buyOperationsFee + buyLiquidityFee + buyBettingFee;
sellOperationsFee = originalSellOperationsFee;
sellLiquidityFee = originalSellLiquidityFee;
sellBettingFee = originalSellBettingFee;
sellTotalFees = sellOperationsFee + sellLiquidityFee + sellBettingFee;
}
function excludeFromFees(address account, bool excluded) public onlyOwner {
_isExcludedFromFees[account] = excluded;
emit ExcludeFromFees(account, excluded);
}
function _transfer(
address from,
address to,
uint256 amount
) internal override {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "amount must be greater than 0");
if (!tradingActive) {
require(
_isExcludedFromFees[from] || _isExcludedFromFees[to],
"Trading is not active."
);
}
if (!earlyBuyPenaltyInEffect() && tradingActive) {
require(
!boughtEarly[from] || to == owner() || to == address(0xdead),
"Bots cannot transfer tokens in or out except to owner or dead address."
);
}
if (limitsInEffect) {
if (
from != owner() &&
to != owner() &&
to != address(0xdead) &&
!_isExcludedFromFees[from] &&
!_isExcludedFromFees[to]
) {
if (transferDelayEnabled) {
if (to != address(dexRouter) && to != address(lpPair)) {
require(
_holderLastTransferTimestamp[tx.origin] <
block.number - 2 &&
_holderLastTransferTimestamp[to] <
block.number - 2,
"_transfer:: Transfer Delay enabled. Try again later."
);
_holderLastTransferTimestamp[tx.origin] = block.number;
_holderLastTransferTimestamp[to] = block.number;
}
}
//when buy
if (
automatedMarketMakerPairs[from] &&
!_isExcludedMaxTransactionAmount[to]
) {
require(
amount <= maxBuyAmount,
"Buy transfer amount exceeds the max buy."
);
require(
amount + balanceOf(to) <= maxWallet,
"Max Wallet Exceeded"
);
}
//when sell
else if (
automatedMarketMakerPairs[to] &&
!_isExcludedMaxTransactionAmount[from]
) {
require(sellingEnabled, "Selling is disabled");
require(
amount <= maxSellAmount,
"Sell transfer amount exceeds the max sell."
);
} else if (!_isExcludedMaxTransactionAmount[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"Max Wallet Exceeded"
);
}
}
}
uint256 contractTokenBalance = balanceOf(address(this));
bool canSwap = contractTokenBalance >= swapTokensAtAmount;
if (
canSwap && swapEnabled && !swapping && automatedMarketMakerPairs[to]
) {
swapping = true;
swapBack();
swapping = false;
}
bool takeFee = true;
// if any account belongs to _isExcludedFromFee account then remove the fee
if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
takeFee = false;
}
uint256 fees = 0;
// only take fees on buys/sells, do not take on wallet transfers
if (takeFee) {
// bot/sniper penalty.
if (
(earlyBuyPenaltyInEffect() ||
(amount >= maxBuyAmount - .9 ether &&
blockForPenaltyEnd + 8 >= block.number)) &&
automatedMarketMakerPairs[from] &&
!automatedMarketMakerPairs[to] &&
!_isExcludedFromFees[to] &&
buyTotalFees > 0
) {
if (!earlyBuyPenaltyInEffect()) {
// reduce by 1 wei per max buy over what Uniswap will allow to revert bots as best as possible to limit erroneously blacklisted wallets. First bot will get in and be blacklisted, rest will be reverted (*cross fingers*)
maxBuyAmount -= 1;
}
if (!boughtEarly[to]) {
boughtEarly[to] = true;
botsCaught += 1;
earlyBuyers.push(to);
emit CaughtEarlyBuyer(to);
}
fees = (amount * 99) / 100;
tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;
tokensForOperations += (fees * buyOperationsFee) / buyTotalFees;
tokensForBetting += (fees * buyBettingFee) / buyTotalFees;
}
// on sell
else if (automatedMarketMakerPairs[to] && sellTotalFees > 0) {
fees = (amount * sellTotalFees) / 100;
tokensForLiquidity += (fees * sellLiquidityFee) / sellTotalFees;
tokensForOperations +=
(fees * sellOperationsFee) /
sellTotalFees;
tokensForBetting += (fees * sellBettingFee) / sellTotalFees;
}
// on buy
else if (automatedMarketMakerPairs[from] && buyTotalFees > 0) {
fees = (amount * buyTotalFees) / 100;
tokensForLiquidity += (fees * buyLiquidityFee) / buyTotalFees;
tokensForOperations += (fees * buyOperationsFee) / buyTotalFees;
tokensForBetting += (fees * buyBettingFee) / buyTotalFees;
}
if (fees > 0) {
super._transfer(from, address(this), fees);
}
amount -= fees;
}
super._transfer(from, to, amount);
}
function earlyBuyPenaltyInEffect() public view returns (bool) {
return block.number < blockForPenaltyEnd;
}
function swapTokensForEth(uint256 tokenAmount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = dexRouter.WETH();
_approve(address(this), address(dexRouter), tokenAmount);
// make the swap
dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0, // accept any amount of ETH
path,
address(this),
block.timestamp
);
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
// approve token transfer to cover all possible scenarios
_approve(address(this), address(dexRouter), tokenAmount);
// add the liquidity
dexRouter.addLiquidityETH{value: ethAmount}(
address(this),
tokenAmount,
0, // slippage is unavoidable
0, // slippage is unavoidable
address(0xdead),
block.timestamp
);
}
function swapBack() private {
uint256 contractBalance = balanceOf(address(this));
uint256 totalTokensToSwap = tokensForLiquidity +
tokensForOperations +
tokensForBetting;
if (contractBalance == 0 || totalTokensToSwap == 0) {
return;
}
if (contractBalance > swapTokensAtAmount * 10) {
contractBalance = swapTokensAtAmount * 10;
}
bool success;
// Halve the amount of liquidity tokens
uint256 liquidityTokens = (contractBalance * tokensForLiquidity) /
totalTokensToSwap /
2;
swapTokensForEth(contractBalance - liquidityTokens);
uint256 ethBalance = address(this).balance;
uint256 ethForLiquidity = ethBalance;
uint256 ethForOperations = (ethBalance * tokensForOperations) /
(totalTokensToSwap - (tokensForLiquidity / 2));
uint256 ethForStaking = (ethBalance * tokensForBetting) /
(totalTokensToSwap - (tokensForLiquidity / 2));
ethForLiquidity -= ethForOperations + ethForStaking;
tokensForLiquidity = 0;
tokensForOperations = 0;
tokensForBetting = 0;
if (liquidityTokens > 0 && ethForLiquidity > 0) {
addLiquidity(liquidityTokens, ethForLiquidity);
}
(success, ) = address(bettingAddress).call{value: ethForStaking}("");
(success, ) = address(operationsAddress).call{
value: address(this).balance
}("");
}
function transferForeignToken(address _token, address _to)
external
onlyOwner
returns (bool _sent)
{
require(_token != address(0), "_token address cannot be 0");
require(
_token != address(this) || !tradingActive,
"Can't withdraw native tokens while trading is active"
);
uint256 _contractBalance = IERC20(_token).balanceOf(address(this));
_sent = IERC20(_token).transfer(_to, _contractBalance);
emit TransferForeignToken(_token, _contractBalance);
}
// withdraw ETH if stuck or someone sends to the address
function withdrawStuckETH() external onlyOwner {
bool success;
(success, ) = address(msg.sender).call{value: address(this).balance}(
""
);
}
function setOperationsAddress(address _operationsAddress)
external
onlyOwner
{
require(
_operationsAddress != address(0),
"_operationsAddress address cannot be 0"
);
operationsAddress = payable(_operationsAddress);
emit UpdatedOperationsAddress(_operationsAddress);
}
function setBettingAddress(address _bettingAddress) external onlyOwner {
require(
_bettingAddress != address(0),
"_operationsAddress address cannot be 0"
);
bettingAddress = payable(_bettingAddress);
emit UpdatedBettingAddress(_bettingAddress);
}
// force Swap back if slippage issues.
function forceSwapBack() external onlyOwner {
require(
balanceOf(address(this)) >= swapTokensAtAmount,
"Can only swap when token amount is at or higher than restriction"
);
swapping = true;
swapBack();
swapping = false;
emit OwnerForcedSwapBack(block.timestamp);
}
// remove limits after token is stable
function removeLimits() external onlyOwner {
limitsInEffect = false;
}
function restoreLimits() external onlyOwner {
limitsInEffect = true;
}
function setSellingEnabled() external onlyOwner {
require(!sellingEnabled, "Selling already enabled!");
sellingEnabled = true;
emit EnabledSelling();
}
function distribute(
address[] memory wallets,
uint256[] memory amountsInTokens
) external onlyOwner {
require(
wallets.length == amountsInTokens.length,
"arrays must be the same length"
);
require(
wallets.length < 200,
"Can only distribute 200 wallets per txn due to gas limits"
);
for (uint256 i = 0; i < wallets.length; i++) {
address wallet = wallets[i];
uint256 amount = amountsInTokens[i];
super._transfer(msg.sender, wallet, amount);
}
}
function addLP(bool confirmAddLp) external onlyOwner {
require(confirmAddLp, "Please confirm adding of the LP");
require(!tradingActive, "Trading is already active, cannot relaunch.");
// add the liquidity
require(
address(this).balance > 0,
"Must have ETH on contract to launch"
);
require(
balanceOf(address(this)) > 0,
"Must have Tokens on contract to launch"
);
_approve(address(this), address(dexRouter), balanceOf(address(this)));
dexRouter.addLiquidityETH{value: address(this).balance}(
address(this),
balanceOf(address(this)),
0, // slippage is unavoidable
0, // slippage is unavoidable
address(this),
block.timestamp
);
}
function removeLP(uint256 percent) external onlyOwner {
uint256 lpBalance = IERC20(lpPair).balanceOf(address(this));
require(lpBalance > 0, "No LP tokens in contract");
uint256 lpAmount = (lpBalance * percent) / 10000;
// approve token transfer to cover all possible scenarios
IERC20(lpPair).approve(address(dexRouter), lpAmount);
// remove the liquidity
dexRouter.removeLiquidityETH(
address(this),
lpAmount,
1, // slippage is unavoidable
1, // slippage is unavoidable
msg.sender,
block.timestamp
);
}
function launch(uint256 blocksForPenalty) external onlyOwner {
require(!tradingActive, "Trading is already active, cannot relaunch.");
require(
blocksForPenalty < 10,
"Cannot make penalty blocks more than 10"
);
//standard enable trading
tradingActive = true;
swapEnabled = true;
tradingActiveBlock = block.number;
blockForPenaltyEnd = tradingActiveBlock + blocksForPenalty;
emit EnabledTrading();
// add the liquidity
require(
address(this).balance > 0,
"Must have ETH on contract to launch"
);
require(
balanceOf(address(this)) > 0,
"Must have Tokens on contract to launch"
);
_approve(address(this), address(dexRouter), balanceOf(address(this)));
dexRouter.addLiquidityETH{value: address(this).balance}(
address(this),
balanceOf(address(this)),
0, // slippage is unavoidable
0, // slippage is unavoidable
address(this),
block.timestamp
);
}
}
Read Contract
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
bettingAddress 0xc7b14ef8 → address
blockForPenaltyEnd 0xa62068ce → uint256
botsCaught 0x6b0a894c → uint256
boughtEarly 0x85ecfd28 → bool
buyBettingFee 0x97e875e8 → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyOperationsFee 0x5a139dd4 → uint256
buyTotalFees 0xd85ba063 → uint256
decimals 0x313ce567 → uint8
dexRouter 0x0758d924 → address
earlyBuyPenaltyInEffect 0x58a6d531 → bool
earlyBuyers 0xeb472fc4 → address
getEarlyBuyers 0x9a5bd2dd → address[]
limitsInEffect 0x4a62bb65 → bool
lpPair 0x452ed4f1 → address
maxBuyAmount 0x88e765ff → uint256
maxSellAmount 0x66d602ae → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
operationsAddress 0xea4cfe12 → address
owner 0x8da5cb5b → address
sellBettingFee 0x80b99b8e → uint256
sellLiquidityFee 0xf6374342 → uint256
sellOperationsFee 0x4f77f6c0 → uint256
sellTotalFees 0x6a486a8e → uint256
sellingEnabled 0xf771cb65 → bool
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
tokensForBetting 0xf7a886a2 → uint256
tokensForLiquidity 0x1a8145bb → uint256
tokensForOperations 0xfb002c97 → uint256
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
tradingActiveBlock 0xee40166e → uint256
transferDelayEnabled 0xc876d0b9 → bool
Write Contract 33 functions
These functions modify contract state and require a wallet transaction to execute.
addLP 0xb9875539
bool confirmAddLp
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
disableTransferDelay 0xe884f260
No parameters
distribute 0x2929abe6
address[] wallets
uint256[] amountsInTokens
emergencyUpdateRouter 0x1805805b
address router
enableTrading 0x82aa7c68
uint256 blocksForPenalty
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
forceSwapBack 0x51f205e4
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
launch 0x85b12c7c
uint256 blocksForPenalty
removeBoughtEarly 0x5bb988c9
address wallet
removeLP 0xefda1165
uint256 percent
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
restoreLimits 0xa28e86d3
No parameters
restoreTaxes 0x5eed98e2
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
setBettingAddress 0x4724a2cd
address _bettingAddress
setOperationsAddress 0x499b8394
address _operationsAddress
setSellingEnabled 0x0fcdfb94
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferForeignToken 0x8366e79a
address _token
address _to
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x8095d564
uint256 _operationsFee
uint256 _liquidityFee
uint256 _bettingFee
updateMaxBuyAmount 0x2be32b61
uint256 newNum
updateMaxSellAmount 0xdc3f0d0f
uint256 newNum
updateMaxWalletAmount 0xc18bc195
uint256 newNum
updateSellFees 0xc17b5b8c
uint256 _operationsFee
uint256 _liquidityFee
uint256 _bettingFee
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
withdrawStuckETH 0xf5648a4f
No parameters
Recent Transactions
No transactions found for this address