Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xb892249939AdBf6D7851864CA9A5c7D2d537af97
Balance 0.000000000 ETH
Nonce 1
Code Size 18281 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

18281 bytes
0x6080604052600436106103bc5760003560e01c806396362920116101f2578063d543dbeb1161010d578063f2fde38b116100a0578063f815a8421161006f578063f815a84214610e3b578063faa651cf14610e50578063fc10805714610e65578063ffbe9f1e14610e98576103c3565b8063f2fde38b14610d17578063f429389014610d4a578063f42f31bb14610d5f578063f698c04f14610e0f576103c3565b8063e47d6060116100dc578063e47d606014610c79578063e99fb70214610cac578063ec28438a14610cc1578063ee8627a714610ceb576103c3565b8063d543dbeb14610bbe578063dd62ed3e14610be8578063e01af92c14610c23578063e15434ed14610c4f576103c3565b8063aab7c4b511610185578063bd68b1e711610154578063bd68b1e714610b1c578063bd9c4ed614610b4f578063d067603a14610b64578063d457ae2114610b94576103c3565b8063aab7c4b514610a63578063ab1f510614610a78578063af9549e014610aae578063bcdd822d14610ae9576103c3565b8063a771ebc7116101c1578063a771ebc7146109eb578063a9059cbb14610a00578063a985ceef14610a39578063aa45026b14610a4e576103c3565b806396362920146108d85780639e43f3c3146108ed578063a3898bb71461099d578063a457c2d7146109b2576103c3565b806349bd5a5e116102e25780637302dacf1161027557806388b79cec1161024457806388b79cec146108485780638940fd0f1461087b5780638da5cb5b146108ae57806395d89b41146108c3576103c3565b80637302dacf146107b85780637cd07e47146107eb5780637d1db4a5146108005780637ded4d6a14610815576103c3565b80635e14f794116102b15780635e14f794146107285780636ddd17131461075b57806370a0823114610770578063715018a6146107a3576103c3565b806349bd5a5e146106b65780634ada218b146106cb57806351bc3c85146106e05780635342acb4146106f5576103c3565b806320a94f941161035a578063395093511161032957806339509351146105eb5780634303443d14610624578063441603d71461065757806345df94d614610683576103c3565b806320a94f941461055357806323b872dd146105685780632af8bfa6146105ab578063313ce567146105c0576103c3565b8063095ea7b311610396578063095ea7b31461049857806312eabeb1146104e55780631694505e1461051757806318160ddd1461052c576103c3565b806303bd1898146103c857806306fdde03146103f95780630875d81514610483576103c3565b366103c357005b600080fd5b3480156103d457600080fd5b506103dd610ead565b604080516001600160a01b039092168252519081900360200190f35b34801561040557600080fd5b5061040e610ebc565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610448578181015183820152602001610430565b50505050905090810190601f1680156104755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561048f57600080fd5b506103dd610f52565b3480156104a457600080fd5b506104d1600480360360408110156104bb57600080fd5b506001600160a01b038135169060200135610f61565b604080519115158252519081900360200190f35b3480156104f157600080fd5b506105156004803603604081101561050857600080fd5b5080359060200135610f7f565b005b34801561052357600080fd5b506103dd611042565b34801561053857600080fd5b50610541611051565b60408051918252519081900360200190f35b34801561055f57600080fd5b50610541611057565b34801561057457600080fd5b506104d16004803603606081101561058b57600080fd5b506001600160a01b0381358116916020810135909116906040013561105d565b3480156105b757600080fd5b506105416110e4565b3480156105cc57600080fd5b506105d56110ea565b6040805160ff9092168252519081900360200190f35b3480156105f757600080fd5b506104d16004803603604081101561060e57600080fd5b506001600160a01b0381351690602001356110f3565b34801561063057600080fd5b506105156004803603602081101561064757600080fd5b50356001600160a01b0316611141565b34801561066357600080fd5b506105156004803603602081101561067a57600080fd5b503515156112a3565b34801561068f57600080fd5b50610541600480360360208110156106a657600080fd5b50356001600160a01b031661136c565b3480156106c257600080fd5b506103dd61137e565b3480156106d757600080fd5b506104d161138d565b3480156106ec57600080fd5b506105156113b1565b34801561070157600080fd5b506104d16004803603602081101561071857600080fd5b50356001600160a01b0316611444565b34801561073457600080fd5b506105156004803603602081101561074b57600080fd5b50356001600160a01b0316611465565b34801561076757600080fd5b506104d1611619565b34801561077c57600080fd5b506105416004803603602081101561079357600080fd5b50356001600160a01b031661163b565b3480156107af57600080fd5b50610515611656565b3480156107c457600080fd5b50610541600480360360208110156107db57600080fd5b50356001600160a01b031661172c565b3480156107f757600080fd5b506103dd61173e565b34801561080c57600080fd5b5061054161174d565b34801561082157600080fd5b506105156004803603602081101561083857600080fd5b50356001600160a01b0316611753565b34801561085457600080fd5b506105156004803603602081101561086b57600080fd5b50356001600160a01b0316611855565b34801561088757600080fd5b506104d16004803603602081101561089e57600080fd5b50356001600160a01b031661194b565b3480156108ba57600080fd5b506103dd611960565b3480156108cf57600080fd5b5061040e61196f565b3480156108e457600080fd5b506105416119d0565b3480156108f957600080fd5b506105156004803603602081101561091057600080fd5b81019060208101813564010000000081111561092b57600080fd5b82018360208201111561093d57600080fd5b8035906020019184602083028401116401000000008311171561095f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506119d6945050505050565b3480156109a957600080fd5b506103dd611b80565b3480156109be57600080fd5b506104d1600480360360408110156109d557600080fd5b506001600160a01b038135169060200135611b8f565b3480156109f757600080fd5b506104d1611bf7565b348015610a0c57600080fd5b506104d160048036036040811015610a2357600080fd5b506001600160a01b038135169060200135611c1a565b348015610a4557600080fd5b506104d1611c2e565b348015610a5a57600080fd5b50610541611c53565b348015610a6f57600080fd5b50610541611c59565b348015610a8457600080fd5b5061051560048036036060811015610a9b57600080fd5b5080359060208101359060400135611c5f565b348015610aba57600080fd5b5061051560048036036040811015610ad157600080fd5b506001600160a01b0381351690602001351515611d30565b348015610af557600080fd5b506104d160048036036020811015610b0c57600080fd5b50356001600160a01b0316611dd4565b348015610b2857600080fd5b5061051560048036036020811015610b3f57600080fd5b50356001600160a01b0316611de9565b348015610b5b57600080fd5b506103dd611f01565b348015610b7057600080fd5b5061054160048036036040811015610b8757600080fd5b5080359060200135611f10565b348015610ba057600080fd5b5061054160048036036020811015610bb757600080fd5b5035611f48565b348015610bca57600080fd5b5061051560048036036020811015610be157600080fd5b5035611f88565b348015610bf457600080fd5b5061054160048036036040811015610c0b57600080fd5b506001600160a01b038135811691602001351661201c565b348015610c2f57600080fd5b5061051560048036036020811015610c4657600080fd5b50351515612047565b348015610c5b57600080fd5b5061051560048036036020811015610c7257600080fd5b503561213b565b348015610c8557600080fd5b506104d160048036036020811015610c9c57600080fd5b50356001600160a01b03166121ba565b348015610cb857600080fd5b506105416121d8565b348015610ccd57600080fd5b5061051560048036036020811015610ce457600080fd5b50356121de565b348015610cf757600080fd5b5061051560048036036020811015610d0e57600080fd5b50351515612257565b348015610d2357600080fd5b5061051560048036036020811015610d3a57600080fd5b50356001600160a01b0316612319565b348015610d5657600080fd5b50610515612445565b348015610d6b57600080fd5b5061051560048036036020811015610d8257600080fd5b810190602081018135640100000000811115610d9d57600080fd5b820183602082011115610daf57600080fd5b80359060200191846020830284011164010000000083111715610dd157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506124c9945050505050565b348015610e1b57600080fd5b5061051560048036036020811015610e3257600080fd5b50351515612595565b348015610e4757600080fd5b50610541612655565b348015610e5c57600080fd5b50610541612659565b348015610e7157600080fd5b5061054160048036036020811015610e8857600080fd5b50356001600160a01b031661265f565b348015610ea457600080fd5b50610541612671565b6001546001600160a01b031681565b60248054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f485780601f10610f1d57610100808354040283529160200191610f48565b820191906000526020600020905b815481529060010190602001808311610f2b57829003601f168201915b5050505050905090565b6003546001600160a01b031681565b6000610f75610f6e612693565b8484612697565b5060015b92915050565b601a6000610f8b612693565b6001600160a01b0316815260208101919091526040016000205460ff16610ff9576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b8082106110375760405162461bcd60e51b81526004018080602001828103825260248152602001806146c46024913960400191505060405180910390fd5b601691909155601755565b6015546001600160a01b031681565b60225490565b60165481565b600061106a848484612783565b6110da84611076612693565b6110d585604051806060016040528060288152602001614606602891396001600160a01b038a166000908152601d60205260408120906110b4612693565b6001600160a01b031681526020810191909152604001600020549190612d05565b612697565b5060019392505050565b60195481565b60265460ff1690565b6000610f75611100612693565b846110d585601d6000611111612693565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612d9c565b611149612693565b6001600160a01b031661115a611960565b6001600160a01b0316146111b5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03821614156112115760405162461bcd60e51b81526004018080602001828103825260248152602001806146576024913960400191505060405180910390fd5b6001600160a01b03811660009081526021602052604090205460ff161561127f576040805162461bcd60e51b815260206004820152601e60248201527f4163636f756e7420697320616c726561647920626c61636b6c69737465640000604482015290519081900360640190fd5b6001600160a01b03166000908152602160205260409020805460ff19166001179055565b6112ab612693565b6001600160a01b03166112bc611960565b6001600160a01b031614611317576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b602a805491151577010000000000000000000000000000000000000000000000027fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff9092169190911790556105dc4201601f55565b60116020526000908152604090205481565b602a546001600160a01b031681565b602a5477010000000000000000000000000000000000000000000000900460ff1681565b601a60006113bd612693565b6001600160a01b0316815260208101919091526040016000205460ff1661142b576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b60006114363061163b565b905061144181612df6565b50565b6001600160a01b038116600090815260208052604090205460ff165b919050565b601a6000611471612693565b6001600160a01b0316815260208101919091526040016000205460ff166114df576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166000908152601a602052604090205460ff1615611441576001600160a01b0381166000908152601a60205260408120805460ff191690555b601b5481101561161557816001600160a01b0316601b828154811061154257fe5b6000918252602090912001546001600160a01b0316141561160d57601b8054600019810190811061156f57fe5b600091825260209091200154601b80546001600160a01b03909216918390811061159557fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601b8054806115ce57fe5b600082815260209020810160001990810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055019055611615565b600101611521565b5050565b602a547501000000000000000000000000000000000000000000900460ff1681565b6001600160a01b03166000908152601c602052604090205490565b61165e612693565b6001600160a01b031661166f611960565b6001600160a01b0316146116ca576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b601e6020526000908152604090205481565b602d546001600160a01b031681565b602b5481565b61175b612693565b6001600160a01b031661176c611960565b6001600160a01b0316146117c7576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811660009081526021602052604090205460ff16611834576040805162461bcd60e51b815260206004820152601a60248201527f4163636f756e74206973206e6f7420626c61636b6c6973746564000000000000604482015290519081900360640190fd5b6001600160a01b03166000908152602160205260409020805460ff19169055565b601a6000611861612693565b6001600160a01b0316815260208101919091526040016000205460ff166118cf576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03811660009081526013602090815260408083208054600160ff19918216811790925592805292208054909116909117905561191181611de9565b602d80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60136020526000908152604090205460ff1681565b6000546001600160a01b031690565b60258054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610f485780601f10610f1d57610100808354040283529160200191610f48565b60235481565b6119de612693565b6001600160a01b03166119ef611960565b6001600160a01b031614611a4a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b805160005b81811015611b7b576000838281518110611a6557fe5b602002602001015190506000306001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611abe57600080fd5b505afa158015611ad2573d6000803e3d6000fd5b505050506040513d6020811015611ae857600080fd5b505190506000611afd826402540be40061303d565b90506000611b0b8284611f10565b90506000611b1882611f48565b9050611b4785600d8381548110611b2b57fe5b906000526020600020906002020161267790919063ffffffff16565b50506001600160a01b0390931660009081526012602090815260408083209390935560119052209190915550600101611a4f565b505050565b6004546001600160a01b031681565b6000610f75611b9c612693565b846110d58560405180606001604052806025815260200161470f60259139601d6000611bc6612693565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612d05565b602a54760100000000000000000000000000000000000000000000900460ff1681565b6000610f75611c27612693565b8484612783565b602a547801000000000000000000000000000000000000000000000000900460ff1681565b60275481565b600f5481565b601a6000611c6b612693565b6001600160a01b0316815260208101919091526040016000205460ff16611cd9576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b8183118015611ce757508082115b611d225760405162461bcd60e51b815260040180806020018281038252602281526020018061457b6022913960400191505060405180910390fd5b600e92909255600f55601055565b601a6000611d3c612693565b6001600160a01b0316815260208101919091526040016000205460ff16611daa576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b039190911660009081526020805260409020805460ff1916911515919091179055565b60146020526000908152604090205460ff1681565b601a6000611df5612693565b6001600160a01b0316815260208101919091526040016000205460ff16611e63576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0381166000908152601a602052604090205460ff16611441576001600160a01b03166000818152601a60205260408120805460ff19166001908117909155601b805491820181559091527f3ad8aa4f87544323a9d1e5dd902f40c356527a7955687113db5f9a85ad579dc10180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b6002546001600160a01b031681565b601954600090611f3090611f2a846509184e72a00061303d565b9061303d565b611f40846509184e72a00061303d565b019392505050565b6000600e54821115611f5c57506000611460565b600f54821115611f6e57506001611460565b601054821115611f8057506002611460565b506003919050565b611f90612693565b6001600160a01b0316611fa1611960565b6001600160a01b031614611ffc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6120166064611f2a836022546130a490919063ffffffff16565b602b5550565b6001600160a01b039182166000908152601d6020908152604080832093909416825291909152205490565b61204f612693565b6001600160a01b0316612060611960565b6001600160a01b0316146120bb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b602a8054821515750100000000000000000000000000000000000000000081027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff9092169190911790915560408051918252517f436b6cf978c7b6998fcce43dfe4d37e3a0dc2bb780144a2eb55d7138201e8a129181900360200190a150565b601a6000612147612693565b6001600160a01b0316815260208101919091526040016000205460ff166121b5576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b601955565b6001600160a01b031660009081526021602052604090205460ff1690565b600e5481565b6121e6612693565b6001600160a01b03166121f7611960565b6001600160a01b031614612252576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b602b55565b61225f612693565b6001600160a01b0316612270611960565b6001600160a01b0316146122cb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b602a80549115157801000000000000000000000000000000000000000000000000027fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b612321612693565b6001600160a01b0316612332611960565b6001600160a01b03161461238d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166123d25760405162461bcd60e51b815260040180806020018281038252602681526020018061459d6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b601a6000612451612693565b6001600160a01b0316815260208101919091526040016000205460ff166124bf576040805162461bcd60e51b815260206004820152600c60248201527f4e6f7420676f7665726e65720000000000000000000000000000000000000000604482015290519081900360640190fd5b47611441816130fd565b6124d1612693565b6001600160a01b03166124e2611960565b6001600160a01b03161461253d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b81518110156116155760016021600084848151811061255b57fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055600101612540565b61259d612693565b6001600160a01b03166125ae611960565b6001600160a01b031614612609576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b602a8054911515760100000000000000000000000000000000000000000000027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b4790565b60105481565b60126020526000908152604090205481565b60175481565b600061268c836001600160a01b038416613279565b9392505050565b3390565b6001600160a01b0383166126dc5760405162461bcd60e51b81526004018080602001828103825260248152602001806146a06024913960400191505060405180910390fd5b6001600160a01b0382166127215760405162461bcd60e51b81526004018080602001828103825260228152602001806145c36022913960400191505060405180910390fd5b6001600160a01b038084166000818152601d6020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166127c85760405162461bcd60e51b815260040180806020018281038252602581526020018061467b6025913960400191505060405180910390fd5b6001600160a01b03821661280d5760405162461bcd60e51b81526004018080602001828103825260238152602001806145586023913960400191505060405180910390fd5b6000811161284c5760405162461bcd60e51b815260040180806020018281038252602981526020018061462e6029913960400191505060405180910390fd5b6001600160a01b03821660009081526021602052604090205460ff16156128ba576040805162461bcd60e51b815260206004820152600760248201527f476f206177617900000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b03831660009081526021602052604090205460ff1615612928576040805162461bcd60e51b815260206004820152600760248201527f476f206177617900000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b612930611960565b6001600160a01b0316836001600160a01b03161415801561296a5750612954611960565b6001600160a01b0316826001600160a01b031614155b80156129845750602d546001600160a01b03848116911614155b801561299e5750602d546001600160a01b03838116911614155b15612a8457602b548111156129e45760405162461bcd60e51b81526004018080602001828103825260278152602001806146e86027913960400191505060405180910390fd5b602a546001600160a01b0384811691161480612a0d5750602a546001600160a01b038381169116145b15612a8457602a5477010000000000000000000000000000000000000000000000900460ff16612a84576040805162461bcd60e51b815260206004820152601660248201527f54726164696e67206973206e6f7420656e61626c656400000000000000000000604482015290519081900360640190fd5b602a547801000000000000000000000000000000000000000000000000900460ff1615612b9257602a546001600160a01b0384811691161415612ae957602354612acf904290612d9c565b6001600160a01b0383166000908152601e60205260409020555b612af1611960565b6001600160a01b0316836001600160a01b031614158015612b205750602a546001600160a01b03848116911614155b15612b92576001600160a01b0383166000908152601e6020526040902054421015612b92576040805162461bcd60e51b815260206004820152600860248201527f436f6f6c646f776e000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b602a546001600160a01b0384811691161415612bfc57612bb0611960565b6001600160a01b0316826001600160a01b031614158015612bed5750602a54760100000000000000000000000000000000000000000000900460ff165b15612bfc57612bfc82826132c3565b6000612c073061163b565b9050602b548110612c175750602b545b602c54602a54908210159074010000000000000000000000000000000000000000900460ff16158015612c655750602a547501000000000000000000000000000000000000000000900460ff165b8015612c6e5750805b8015612c885750602a546001600160a01b03868116911614155b15612ca857612c9682612df6565b478015612ca657612ca6476130fd565b505b6001600160a01b038516600090815260208052604090205460019060ff1680612ce857506001600160a01b038516600090815260208052604090205460ff165b15612cf1575060005b612cfd868686846137ee565b505050505050565b60008184841115612d945760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d59578181015183820152602001612d41565b50505050905090810190601f168015612d865780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561268c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b602a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905560408051600280825260608083018452926020830190803683370190505090503081600081518110612e6357fe5b6001600160a01b03928316602091820292909201810191909152601554604080517fad5c46480000000000000000000000000000000000000000000000000000000081529051919093169263ad5c4648926004808301939192829003018186803b158015612ed057600080fd5b505afa158015612ee4573d6000803e3d6000fd5b505050506040513d6020811015612efa57600080fd5b5051815182906001908110612f0b57fe5b6001600160a01b039283166020918202929092010152601554612f319130911684612697565b6015546040517f791ac947000000000000000000000000000000000000000000000000000000008152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b83811015612fd0578181015183820152602001612fb8565b505050509050019650505050505050600060405180830381600087803b158015612ff957600080fd5b505af115801561300d573d6000803e3d6000fd5b5050602a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16905550505050565b6000808211613093576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161309c57fe5b049392505050565b6000826130b357506000610f79565b828202828482816130c057fe5b041461268c5760405162461bcd60e51b81526004018080602001828103825260218152602001806145e56021913960400191505060405180910390fd5b601f54421061310e5761310e613819565b600061311b82601e61303d565b60188054820190556001549091506001600160a01b03166108fc6131408360046130a4565b6040518115909202916000818181858888f19350505050158015613168573d6000803e3d6000fd5b506002546001600160a01b03166108fc6131838360036130a4565b6040518115909202916000818181858888f193505050501580156131ab573d6000803e3d6000fd5b506003546001600160a01b03166108fc6131c68360026130a4565b6040518115909202916000818181858888f193505050501580156131ee573d6000803e3d6000fd5b506004546001600160a01b03166108fc6132098360016130a4565b6040518115909202916000818181858888f19350505050158015613231573d6000803e3d6000fd5b506029546001600160a01b03166108fc6132516003611f2a8660026130a4565b6040518115909202916000818181858888f19350505050158015611b7b573d6000803e3d6000fd5b60006132858383613d03565b6132bb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f79565b506000610f79565b6001600160a01b03821660009081526013602052604090205460ff166116155760408051600280825260608083018452926020830190803683375050601554604080517fad5c464800000000000000000000000000000000000000000000000000000000815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b15801561336057600080fd5b505afa158015613374573d6000803e3d6000fd5b505050506040513d602081101561338a57600080fd5b50518151829060009061339957fe5b60200260200101906001600160a01b031690816001600160a01b03168152505030816001815181106133c757fe5b6001600160a01b03928316602091820292909201810191909152601554604080517f1f00ca7400000000000000000000000000000000000000000000000000000000815260048101878152602482019283528651604483015286516000969490941694631f00ca749489948994909260649091019185820191028083838c5b8381101561345e578181015183820152602001613446565b50505050905001935050505060006040518083038186803b15801561348257600080fd5b505afa158015613496573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405260208110156134dd57600080fd5b81019080805160405193929190846401000000008211156134fd57600080fd5b90830190602082018581111561351257600080fd5b825186602082028301116401000000008211171561352f57600080fd5b82525081516020918201928201910280838360005b8381101561355c578181015183820152602001613544565b5050505090500160405250505060008151811061357557fe5b6020908102919091018101516001600160a01b038616600090815260118352604080822054601490945290205490925060ff16156136df576001600160a01b0385166000908152601260205260409020548211156136af576001600160a01b03851660008181526012602081815260408084208054880381556014835293819020805460ff19169055918152915481517f70a0823100000000000000000000000000000000000000000000000000000000815260048101949094529051613691939192889230926370a0823192602480840193919291829003018186803b15801561365f57600080fd5b505afa158015613673573d6000803e3d6000fd5b505050506040513d602081101561368957600080fd5b505101611f10565b6001600160a01b0386166000908152601160205260409020556136da565b6001600160a01b03851660009081526012602090815260408083208054869003905560119091528120555b613776565b6001600160a01b038516600081815260126020908152604091829020805486019081905582517f70a082310000000000000000000000000000000000000000000000000000000081526004810194909452915161375c93889230926370a08231926024808201939291829003018186803b15801561365f57600080fd5b6001600160a01b0386166000908152601160205260409020555b6001600160a01b03851660009081526014602052604090205460ff166137e75760006137a182611f48565b6001600160a01b038716600090815260116020526040812054919250906137c790611f48565b90508082146137da576137da8783613d1b565b6137e48782613d48565b50505b5050505050565b806137fb576137fb613d59565b613806848484613d73565b8061381357613813613e70565b50505050565b600060165461382d60165460175403613e78565b0190508060185410611441576000613867613862600d60008154811061384f57fe5b9060005260206000209060020201613f5e565b613e78565b9050600061387f613862600d60018154811061384f57fe5b90506000613897613862600d60028154811061384f57fe5b905060006138af613862600d60038154811061384f57fe5b90506138df84600d6000815481106138c357fe5b9060005260206000209060020201613f6990919063ffffffff16565b600160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061391783600d6001815481106138c357fe5b600260006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061394f82600d6002815481106138c357fe5b600360006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061398781600d6003815481106138c357fe5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039283161780825560015460025460035491851660008181526012602090815260408083205494891680845281842054968a168085528285205498909a16808552938290205482517f70a08231000000000000000000000000000000000000000000000000000000008152998a0186905291517fcf6a823b3436846680f79054a7512354af07f077ae2efb646a05db1fa429640e9a429a9699929890979596909492939230926370a08231926024808201939291829003018186803b158015613a7c57600080fd5b505afa158015613a90573d6000803e3d6000fd5b505050506040513d6020811015613aa657600080fd5b5051600254604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301525130916370a08231916024808301926020929190829003018186803b158015613b0a57600080fd5b505afa158015613b1e573d6000803e3d6000fd5b505050506040513d6020811015613b3457600080fd5b5051600354604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0390921660048301525130916370a08231916024808301926020929190829003018186803b158015613b9857600080fd5b505afa158015613bac573d6000803e3d6000fd5b505050506040513d6020811015613bc257600080fd5b505160048054604080517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0390921692820192909252905130916370a08231916024808301926020929190829003018186803b158015613c2a57600080fd5b505afa158015613c3e573d6000803e3d6000fd5b505050506040513d6020811015613c5457600080fd5b8101908080519060200190929190505050601854604051808f81526020018e6001600160a01b031681526020018d6001600160a01b031681526020018c6001600160a01b031681526020018b6001600160a01b031681526020018a81526020018981526020018881526020018781526020018681526020018581526020018481526020018381526020018281526020019e50505050505050505050505050505060405180910390a15050505050565b60009081526001919091016020526040902054151590565b611b7b82600d8381548110613d2c57fe5b9060005260206000209060020201613f7590919063ffffffff16565b611b7b82600d8381548110611b2b57fe5b602754613d6557613d71565b60278054602855600090555b565b6000613d8f6064611f2a602754856130a490919063ffffffff16565b90506000613d9d8383613f8a565b6001600160a01b0386166000908152601c6020526040902054909150613dc39084613f8a565b6001600160a01b038087166000908152601c60205260408082209390935590861681522054613df29082612d9c565b6001600160a01b0385166000908152601c6020526040902055613e158584613fe7565b613e1e8261443a565b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505050565b602854602755565b60008160011415613e8b57506000611460565b600043423360405160200180826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012060001c81613ecc57fe5b0445424160405160200180826001600160a01b031660601b81526014019150506040516020818303038152906040528051906020012060001c81613f0c57fe5b0444420101010101604051602001808281526020019150506040516020818303038152906040528051906020012060001c905060018303600184038281613f4f57fe5b04028103600101915050919050565b6000610f7982614467565b600061268c838361446b565b600061268c836001600160a01b03841661448f565b600082821115613fe1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6001600160a01b03821660009081526013602052604090205460ff166116155760408051600280825260608083018452926020830190803683375050601554604080517fad5c464800000000000000000000000000000000000000000000000000000000815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b15801561408457600080fd5b505afa158015614098573d6000803e3d6000fd5b505050506040513d60208110156140ae57600080fd5b5051815182906000906140bd57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505030816001815181106140eb57fe5b6001600160a01b03928316602091820292909201810191909152601554604080517f1f00ca7400000000000000000000000000000000000000000000000000000000815260048101878152602482019283528651604483015286516000969490941694631f00ca749489948994909260649091019185820191028083838c5b8381101561418257818101518382015260200161416a565b50505050905001935050505060006040518083038186803b1580156141a657600080fd5b505afa1580156141ba573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052602081101561420157600080fd5b810190808051604051939291908464010000000082111561422157600080fd5b90830190602082018581111561423657600080fd5b825186602082028301116401000000008211171561425357600080fd5b82525081516020918201928201910280838360005b83811015614280578181015183820152602001614268565b5050505090500160405250505060008151811061429957fe5b6020908102919091018101516001600160a01b038616600090815260118352604080822054601490945290205490925060ff16156142ff576001600160a01b03851660009081526012602090815260408083208054860190556011909152812055614423565b6001600160a01b03851660009081526012602052604090205482116143e7576001600160a01b03851660008181526012602090815260409182902080548690039081905582517f70a08231000000000000000000000000000000000000000000000000000000008152600481019490945291516143c99330926370a0823192602480840193829003018186803b15801561439857600080fd5b505afa1580156143ac573d6000803e3d6000fd5b505050506040513d60208110156143c257600080fd5b5051611f10565b6001600160a01b038616600090815260116020526040902055614423565b6001600160a01b038516600090815260126020908152604080832080548603905560148252808320805460ff1916600117905560119091528120555b600061442e82611f48565b9050612cfd8682613d1b565b306000908152601c60205260409020546144549082612d9c565b306000908152601c602052604090205550565b5490565b600082600001828154811061447c57fe5b9060005260206000200154905092915050565b6000818152600183016020526040812054801561454d57835460001980830191018082146145075760008660000182815481106144c857fe5b90600052602060002001549050808760000184815481106144e557fe5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061451257fe5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610f79565b6000915050610f7956fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373576569676874732073686f756c642062652064657363656e64696e67206f726465724f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f57652063616e206e6f7420626c61636b6c69737420556e697377617020726f757465722e45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573736665654d696e2073686f756c6420626520736d616c6c6572207468616e206665654d61785472616e7366657220616d6f756e74206578636565647320746865206d617820616d6f756e742e45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212205ba57b375580eb726456ee3d7c3e751b1126f05783f19fb462d7f4dea959d31f64736f6c634300060c0033

Verified Source Code Partial Match

Compiler: v0.6.12+commit.27d51765 EVM: istanbul Optimization: Yes (9999 runs)
GamblerShiba.sol 1542 lines
// SPDX-License-Identifier: Unlicensed

pragma solidity ^0.6.12;


// 
/*
 * @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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// 
/**
 * @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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// 
/**
 * @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);
}

// 
/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// 
interface IUniswapV2Factory {
    function createPair(address tokenA, address tokenB) external returns (address pair);
}

interface IUniswapV2Router02 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

// 
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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
    * @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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// 
/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

// 
abstract contract GShibaRNG is Ownable {
    /**
    * Tiers
    * 0 - Platinum
    * 1 - Gold
    * 2 - Silver
    * 3 - Bronze
     */
    using SafeMath for uint256;
    using EnumerableSet for EnumerableSet.AddressSet;

    address payable public platinumWinner;
    address payable public goldWinner;
    address payable public silverWinner;
    address payable public bronzeWinner;
    
    EnumerableSet.AddressSet platinumSet;
    EnumerableSet.AddressSet goldSet;
    EnumerableSet.AddressSet silverSet;
    EnumerableSet.AddressSet bronzeSet;

    EnumerableSet.AddressSet[] gamblingWallets;

    uint256 public platinumMinWeight = 2 * 10 ** 5;
    uint256 public goldMinWeight = 10 ** 5;
    uint256 public silverMinWeight = 5 * 10 ** 4;

    mapping(address => uint256) public gamblingWeights;
    mapping(address => uint256) public ethAmounts;
    mapping(address => bool) public excludedFromGambling;
    mapping(address => bool) public isEthAmountNegative;

    IUniswapV2Router02 public uniswapV2Router;

    uint256 public feeMin = 0.1 * 10 ** 18;
    uint256 public feeMax = 0.3 * 10 ** 18;
    uint256 internal lastTotalFee;

    uint256 public ethWeight = 10 ** 10;

    mapping(address => bool) isGoverner;
    address[] governers;

    event newWinnersSelected(uint256 timestamp, address platinumWinner, address goldWinner, address silverWinner, address bronzeWinner, 
        uint256 platinumEthAmount, uint256 goldEthAmount, uint256 silverEthAmount, uint256 bronzeEthAmount,
        uint256 platinumGShibaAmount, uint256 goldGShibaAmount, uint256 silverGShibaAmount, uint256 bronzeGShibaAmount,
        uint256 lastTotalFee);

    modifier onlyGoverner() {
        require(isGoverner[_msgSender()], "Not governer");
        _;
    }

    constructor(address payable _initialWinner) public
    {
        platinumWinner = _initialWinner;
        goldWinner = _initialWinner;
        silverWinner = _initialWinner;
        bronzeWinner = _initialWinner;
        
        platinumSet.add(_initialWinner);
        goldSet.add(_initialWinner);
        silverSet.add(_initialWinner);
        bronzeSet.add(_initialWinner);

        gamblingWallets.push(platinumSet);
        gamblingWallets.push(goldSet);
        gamblingWallets.push(silverSet);
        gamblingWallets.push(bronzeSet);

        uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); // UniswapV2 for Ethereum network

        isGoverner[owner()] = true;
        governers.push(owner());
    }

    function checkTierFromWeight(uint256 weight)
        public
        view
        returns(uint256)
    {
        if (weight > platinumMinWeight) {
            return 0;
        }
        if (weight > goldMinWeight) {
            return 1;
        }
        if (weight > silverMinWeight) {
            return 2;
        }
        return 3;
    }

    function calcWeight(uint256 ethAmount, uint256 gShibaAmount) public view returns(uint256) {
        return ethAmount.div(10 ** 13) + gShibaAmount.div(10 ** 13).div(ethWeight);
    }

    function addNewWallet(address _account, uint256 tier) internal {
        gamblingWallets[tier].add(_account);
    }

    function removeWallet(address _account, uint256 tier) internal {
        gamblingWallets[tier].remove(_account);
    }

    function addWalletToGamblingList(address _account, uint256 _amount) internal {
        if (!excludedFromGambling[_account]) {
            address[] memory path = new address[](2);
            path[0] = uniswapV2Router.WETH();
            path[1] = address(this);
            
            uint256 ethAmount = uniswapV2Router.getAmountsIn(_amount, path)[0];
            
            uint256 oldWeight = gamblingWeights[_account];

            if (isEthAmountNegative[_account]) {
                if (ethAmount > ethAmounts[_account]) {
                    ethAmounts[_account] = ethAmount - ethAmounts[_account];
                    isEthAmountNegative[_account] = false;

                    gamblingWeights[_account] = calcWeight(ethAmounts[_account], IERC20(address(this)).balanceOf(_account) + _amount);
                } else {
                    ethAmounts[_account] = ethAmounts[_account] - ethAmount;
                    gamblingWeights[_account] = 0;
                }
            } else {
                ethAmounts[_account] += ethAmount;

                gamblingWeights[_account] = calcWeight(ethAmounts[_account], IERC20(address(this)).balanceOf(_account) + _amount);
            }

            if (!isEthAmountNegative[_account]) {
                uint256 oldTier = checkTierFromWeight(oldWeight);
                uint256 newTier = checkTierFromWeight(gamblingWeights[_account]);

                if (oldTier != newTier) {
                    removeWallet(_account, oldTier);
                }

                addNewWallet(_account, newTier);
            }
        }
    }

    function removeWalletFromGamblingList(address _account, uint256 _amount) internal {
        if (!excludedFromGambling[_account]) {
            address[] memory path = new address[](2);
            path[0] = uniswapV2Router.WETH();
            path[1] = address(this);
            
            uint256 ethAmount = uniswapV2Router.getAmountsIn(_amount, path)[0];

            uint256 oldWeight = gamblingWeights[_account];

            if (isEthAmountNegative[_account]) {
                ethAmounts[_account] += ethAmount;
                gamblingWeights[_account] = 0;
            } else if (ethAmounts[_account] >= ethAmount) {
                ethAmounts[_account] -= ethAmount;
                gamblingWeights[_account] = calcWeight(ethAmounts[_account], IERC20(address(this)).balanceOf(_account));
            } else {
                ethAmounts[_account] = ethAmount - ethAmounts[_account];
                isEthAmountNegative[_account] = true;
                gamblingWeights[_account] = 0;
            }

            uint256 oldTier = checkTierFromWeight(oldWeight);
            removeWallet(_account, oldTier);
        }
    }

    function rand(uint256 max)
        private
        view
        returns(uint256)
    {
        if (max == 1) {
            return 0;
        }

        uint256 seed = uint256(keccak256(abi.encodePacked(
            block.timestamp + block.difficulty +
            ((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (now)) +
            block.gaslimit +
            ((uint256(keccak256(abi.encodePacked(msg.sender)))) / (now)) +
            block.number
        )));

        return (seed - ((seed / (max - 1)) * (max - 1))) + 1;
    }

    function checkAndChangeGamblingWinner() internal {
        uint256 randFee = rand(feeMax - feeMin) + feeMin;

        if (lastTotalFee >= randFee) {
            uint256 platinumWinnerIndex = rand(gamblingWallets[0].length());
            uint256 goldWinnerIndex = rand(gamblingWallets[1].length());
            uint256 silverWinnerIndex = rand(gamblingWallets[2].length());
            uint256 bronzeWinnerIndex = rand(gamblingWallets[3].length());

            platinumWinner = payable(gamblingWallets[0].at(platinumWinnerIndex));
            goldWinner = payable(gamblingWallets[1].at(goldWinnerIndex));
            silverWinner = payable(gamblingWallets[2].at(silverWinnerIndex));
            bronzeWinner = payable(gamblingWallets[3].at(bronzeWinnerIndex));

            emit newWinnersSelected(
                block.timestamp, platinumWinner, goldWinner, silverWinner, bronzeWinner, 
                ethAmounts[platinumWinner], ethAmounts[goldWinner], ethAmounts[silverWinner], ethAmounts[bronzeWinner],
                IERC20(address(this)).balanceOf(platinumWinner), IERC20(address(this)).balanceOf(goldWinner), IERC20(address(this)).balanceOf(silverWinner), IERC20(address(this)).balanceOf(bronzeWinner),
                lastTotalFee
            );
        }
    }

    /**
    * Mutations
     */

    function setEthWeight(uint256 _ethWeight) external onlyGoverner {
        ethWeight = _ethWeight;
    }

    function setTierWeights(uint256 _platinumMin, uint256 _goldMin, uint256 _silverMin) external onlyGoverner {
        require(_platinumMin > _goldMin && _goldMin > _silverMin, "Weights should be descending order");

        platinumMinWeight = _platinumMin;
        goldMinWeight = _goldMin;
        silverMinWeight = _silverMin;
    }

    function setFeeMinMax(uint256 _feeMin, uint256 _feeMax) external onlyGoverner {
        require(_feeMin < _feeMax, "feeMin should be smaller than feeMax");

        feeMin = _feeMin;
        feeMax = _feeMax;
    }

    function addGoverner(address _governer) public onlyGoverner {
        if (!isGoverner[_governer]) {
            isGoverner[_governer] = true;
            governers.push(_governer);
        }
    }

    function removeGoverner(address _governer) external onlyGoverner {
        if (isGoverner[_governer]) {
            isGoverner[_governer] = false;

            for (uint i = 0; i < governers.length; i ++) {
                if (governers[i] == _governer) {
                    governers[i] = governers[governers.length - 1];
                    governers.pop();
                    break;
                }
            }
        }
    }

    function addV1Users(address[] memory _users) external onlyOwner {
        uint256 len = _users.length;

        for (uint i = 0; i < len; i ++) {
            address user = _users[i];

            uint256 gShibabalance = IERC20(address(this)).balanceOf(user);
            uint256 ethAmount = gShibabalance.div(10 ** 10);

            uint256 weight = calcWeight(ethAmount, gShibabalance);
            uint256 tier = checkTierFromWeight(weight);

            gamblingWallets[tier].add(user);
            ethAmounts[user] = ethAmount;
            gamblingWeights[user] = weight;
        }
    }
}

/*                                                                                                                                                                                       
Gambler Shiba
https://t.me/gshiba_official

More info:

    * Instead of giving equal weights to all users, we give weights based on their purchase token amount and contributed ETH amount
    * If you sell or transfer tokens to other wallets, you lose your ticket, but as soon as you buy again you regain your ticket
    * There's no min eligible amount. Even if you buy 1 token, you have the very little chance to get rewarded.
*/
// 
// Contract implementation
contract GamblerShiba is IERC20, Ownable, GShibaRNG {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _tOwned;
    mapping (address => mapping (address => uint256)) private _allowances;
    mapping (address => uint256) public timestamp;

    uint256 private eligibleRNG = block.timestamp;

    mapping (address => bool) private _isExcludedFromFee;

    mapping (address => bool) private _isBlackListedBot;

    uint256 private _tTotal = 1000000000000 * 10 ** 18;  //1,000,000,000,000

    uint256 public _coolDown = 30 seconds;

    string private _name = 'Gambler Shiba';
    string private _symbol = 'GSHIBA';
    uint8 private _decimals = 18;
    
    uint256 public _devFee = 12;
    uint256 private _previousdevFee = _devFee;

    address payable private _feeWalletAddress;
    
    address public uniswapV2Pair;

    bool inSwap = false;
    bool public swapEnabled = true;
    bool public feeEnabled = true;
    
    bool public tradingEnabled = false;
    bool public cooldownEnabled = true;

    uint256 public _maxTxAmount = _tTotal / 400;
    uint256 private _numOfTokensToExchangeFordev = 5000000000000000;

    address public migrator;

    event SwapEnabledUpdated(bool enabled);

    modifier lockTheSwap {
        inSwap = true;
        _;
        inSwap = false;
    }

    constructor (address payable feeWalletAddress)
        GShibaRNG(feeWalletAddress)
        public
    {
        _feeWalletAddress = feeWalletAddress;
        _tOwned[_msgSender()] = _tTotal;

        // Create a uniswap pair for this new token
        uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())
            .createPair(address(this), uniswapV2Router.WETH());

        // Exclude owner and this contract from fee
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;

        // Excluded gshiba, pair, owner from gambling list
        excludedFromGambling[address(this)] = true;
        excludedFromGambling[uniswapV2Pair] = true;
        excludedFromGambling[owner()] = true;

        emit Transfer(address(0), _msgSender(), _tTotal);
    }

    function name() public view returns (string memory) {
        return _name;
    }

    function symbol() public view returns (string memory) {
        return _symbol;
    }

    function decimals() public view returns (uint8) {
        return _decimals;
    }

    function totalSupply() public view override returns (uint256) {
        return _tTotal;
    }

    function balanceOf(address account) public view override returns (uint256) {
        return _tOwned[account];
    }

    function transfer(address recipient, uint256 amount) public override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }
    
    function isBlackListed(address account) public view returns (bool) {
        return _isBlackListedBot[account];
    }

    function setExcludeFromFee(address account, bool excluded) external onlyGoverner {
        _isExcludedFromFee[account] = excluded;
    }

    function addBotToBlackList(address account) external onlyOwner() {
        require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not blacklist Uniswap router.');
        require(!_isBlackListedBot[account], "Account is already blacklisted");
        _isBlackListedBot[account] = true;
    }
    
    function addBotsToBlackList(address[] memory bots) external onlyOwner() {
        for (uint i = 0; i < bots.length; i++) {
            _isBlackListedBot[bots[i]] = true;
        }
    }

    function removeBotFromBlackList(address account) external onlyOwner() {
        require(_isBlackListedBot[account], "Account is not blacklisted");
        _isBlackListedBot[account] = false;
    }

    function removeAllFee() private {
        if(_devFee == 0) return;
        _previousdevFee = _devFee;
        _devFee = 0;
    }

    function restoreAllFee() private {
        _devFee = _previousdevFee;
    }

    function isExcludedFromFee(address account) public view returns(bool) {
        return _isExcludedFromFee[account];
    }
    
    function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() {
        _maxTxAmount = _tTotal.mul(maxTxPercent).div(
            10**2
        );
    }
    
    function setMaxTxAmount(uint256 maxTx) external onlyOwner() {
        _maxTxAmount = maxTx;
    }

    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 sender, address recipient, uint256 amount) private {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        require(!_isBlackListedBot[recipient], "Go away");
        require(!_isBlackListedBot[sender], "Go away");

        if(sender != owner() && recipient != owner() && sender != migrator && recipient != migrator) {
            require(amount <= _maxTxAmount, "Transfer amount exceeds...

// [truncated — 55955 bytes total]

Read Contract

_coolDown 0x96362920 → uint256
_devFee 0xaa45026b → uint256
_getETHBalance 0xf815a842 → uint256
_maxTxAmount 0x7d1db4a5 → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
bronzeWinner 0xa3898bb7 → address
calcWeight 0xd067603a → uint256
checkTierFromWeight 0xd457ae21 → uint256
cooldownEnabled 0xa985ceef → bool
decimals 0x313ce567 → uint8
ethAmounts 0xfc108057 → uint256
ethWeight 0x2af8bfa6 → uint256
excludedFromGambling 0x8940fd0f → bool
feeEnabled 0xa771ebc7 → bool
feeMax 0xffbe9f1e → uint256
feeMin 0x20a94f94 → uint256
gamblingWeights 0x45df94d6 → uint256
goldMinWeight 0xaab7c4b5 → uint256
goldWinner 0xbd9c4ed6 → address
isBlackListed 0xe47d6060 → bool
isEthAmountNegative 0xbcdd822d → bool
isExcludedFromFee 0x5342acb4 → bool
migrator 0x7cd07e47 → address
name 0x06fdde03 → string
owner 0x8da5cb5b → address
platinumMinWeight 0xe99fb702 → uint256
platinumWinner 0x03bd1898 → address
silverMinWeight 0xfaa651cf → uint256
silverWinner 0x0875d815 → address
swapEnabled 0x6ddd1713 → bool
symbol 0x95d89b41 → string
timestamp 0x7302dacf → uint256
totalSupply 0x18160ddd → uint256
tradingEnabled 0x4ada218b → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address

Write Contract 26 functions

These functions modify contract state and require a wallet transaction to execute.

addBotToBlackList 0x4303443d
address account
addBotsToBlackList 0xf42f31bb
address[] bots
addGoverner 0xbd68b1e7
address _governer
addV1Users 0x9e43f3c3
address[] _users
allowDex 0x441603d7
bool _tradingEnabled
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
manualSend 0xf4293890
No parameters
manualSwap 0x51bc3c85
No parameters
removeBotFromBlackList 0x7ded4d6a
address account
removeGoverner 0x5e14f794
address _governer
renounceOwnership 0x715018a6
No parameters
setEthWeight 0xe15434ed
uint256 _ethWeight
setExcludeFromFee 0xaf9549e0
address account
bool excluded
setFeeMinMax 0x12eabeb1
uint256 _feeMin
uint256 _feeMax
setMaxTxAmount 0xec28438a
uint256 maxTx
setMaxTxPercent 0xd543dbeb
uint256 maxTxPercent
setMigrationContract 0x88b79cec
address _migrator
setSwapEnabled 0xe01af92c
bool enabled
setTierWeights 0xab1f5106
uint256 _platinumMin
uint256 _goldMin
uint256 _silverMin
toggleCoolDown 0xee8627a7
bool _cooldownEnabled
toggleFeeEnabled 0xf698c04f
bool _feeEnabled
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address