Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xa79C1D3A0F0a21eC5B0Ee2f96685aaCfaCc95dFb
Balance 0.033006 ETH
Nonce 2
Code Size 14123 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

14123 bytes
0x6080604052600436106103b15760003560e01c80638da5cb5b116101e7578063c492f0461161010d578063e98030c7116100a0578063f2fde38b1161006f578063f2fde38b14610b1f578063f637434214610b3f578063f7c618c114610b55578063f832679514610b7557600080fd5b8063e98030c714610aa9578063eb671e9114610ac9578063f11a24d314610ae9578063f27fd25414610aff57600080fd5b8063dd62ed3e116100dc578063dd62ed3e14610a18578063e2f4560514610a5e578063e4bf1bed14610a74578063e7841ec014610a9457600080fd5b8063c492f046146109ad578063c705c569146109cd578063cfe0e619146109ed578063d2a8b44014610a0357600080fd5b8063a457c2d711610185578063ad56c13c11610154578063ad56c13c146108d8578063afa4f3b21461093d578063b62496f51461095d578063c02466681461098d57600080fd5b8063a457c2d714610848578063a8b9d24014610868578063a9059cbb14610888578063aa797dbc146108a857600080fd5b806395d89b41116101c157806395d89b41146107e85780639a7a23d6146107fd5780639c1b8af51461081d578063a26579ad1461083357600080fd5b80638da5cb5b1461079e5780638de743b3146107bc57806392136913146107d257600080fd5b80634144d9e4116102d75780636843cd841161026a5780637bce5a04116102395780637bce5a041461072857806385141a771461073e578063869236111461075e578063871c128d1461077e57600080fd5b80636843cd841461069d578063700bb191146106bd57806370a08231146106dd578063715018a61461071357600080fd5b80635d098b38116102a65780635d098b381461062857806361a60d571461064857806364b0f6531461066857806365b8dbc01461067d57600080fd5b80634144d9e41461059a57806349bd5a5e146105ba5780634e71d92d146105da5780634fbee193146105ef57600080fd5b806323b872dd1161034f578063313ce5671161031e578063313ce5671461052857806331e79db0146105445780633926876d14610564578063395093511461057a57600080fd5b806323b872dd146104bd57806324942a04146104dd5780632c1f5216146104f357806330bb4cff1461051357600080fd5b8063095ea7b31161038b578063095ea7b31461041e5780630dcb2e891461044e5780631694505e1461047057806318160ddd146104a857600080fd5b806302df64d6146103bd57806306fdde03146103e657806308b2a12c1461040857600080fd5b366103b857005b600080fd5b3480156103c957600080fd5b506103d3600b5481565b6040519081526020015b60405180910390f35b3480156103f257600080fd5b506103fb610b8b565b6040516103dd91906130ff565b34801561041457600080fd5b506103d3600c5481565b34801561042a57600080fd5b5061043e610439366004613162565b610c1d565b60405190151581526020016103dd565b34801561045a57600080fd5b5061046e61046936600461318e565b610c34565b005b34801561047c57600080fd5b50600654610490906001600160a01b031681565b6040516001600160a01b0390911681526020016103dd565b3480156104b457600080fd5b506002546103d3565b3480156104c957600080fd5b5061043e6104d83660046131a7565b610cc9565b3480156104e957600080fd5b506103d360125481565b3480156104ff57600080fd5b50600854610490906001600160a01b031681565b34801561051f57600080fd5b506103d3610d32565b34801561053457600080fd5b50604051601281526020016103dd565b34801561055057600080fd5b5061046e61055f3660046131e8565b610da5565b34801561057057600080fd5b506103d360145481565b34801561058657600080fd5b5061043e610595366004613162565b610e01565b3480156105a657600080fd5b50601654610490906001600160a01b031681565b3480156105c657600080fd5b50600754610490906001600160a01b031681565b3480156105e657600080fd5b5061046e610e37565b3480156105fb57600080fd5b5061043e61060a3660046131e8565b6001600160a01b03166000908152601b602052604090205460ff1690565b34801561063457600080fd5b5061046e6106433660046131e8565b610eaf565b34801561065457600080fd5b5061046e6106633660046131e8565b610efb565b34801561067457600080fd5b506103d3610f47565b34801561068957600080fd5b5061046e6106983660046131e8565b610f91565b3480156106a957600080fd5b506103d36106b83660046131e8565b6111fb565b3480156106c957600080fd5b5061046e6106d836600461318e565b61126b565b3480156106e957600080fd5b506103d36106f83660046131e8565b6001600160a01b031660009081526020819052604090205490565b34801561071f57600080fd5b5061046e61133d565b34801561073457600080fd5b506103d3600f5481565b34801561074a57600080fd5b50601854610490906001600160a01b031681565b34801561076a57600080fd5b5061046e610779366004613213565b611373565b34801561078a57600080fd5b5061046e61079936600461318e565b6113c8565b3480156107aa57600080fd5b506005546001600160a01b0316610490565b3480156107c857600080fd5b506103d360115481565b3480156107de57600080fd5b506103d360105481565b3480156107f457600080fd5b506103fb61150a565b34801561080957600080fd5b5061046e610818366004613213565b611519565b34801561082957600080fd5b506103d3601a5481565b34801561083f57600080fd5b506103d36115e3565b34801561085457600080fd5b5061043e610863366004613162565b61162d565b34801561087457600080fd5b506103d36108833660046131e8565b61167c565b34801561089457600080fd5b5061043e6108a3366004613162565b6116af565b3480156108b457600080fd5b5061043e6108c33660046131e8565b60196020526000908152604090205460ff1681565b3480156108e457600080fd5b506108f86108f33660046131e8565b6116bc565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e0820152610100016103dd565b34801561094957600080fd5b5061046e61095836600461318e565b611757565b34801561096957600080fd5b5061043e6109783660046131e8565b601c6020526000908152604090205460ff1681565b34801561099957600080fd5b5061046e6109a8366004613213565b611786565b3480156109b957600080fd5b5061046e6109c836600461324c565b611835565b3480156109d957600080fd5b5061043e6109e83660046131e8565b611911565b3480156109f957600080fd5b506103d360155481565b348015610a0f57600080fd5b5061046e611980565b348015610a2457600080fd5b506103d3610a333660046132d2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b348015610a6a57600080fd5b506103d3600a5481565b348015610a8057600080fd5b5061046e610a8f366004613300565b611a58565b348015610aa057600080fd5b506103d3611aff565b348015610ab557600080fd5b5061046e610ac436600461318e565b611b49565b348015610ad557600080fd5b5061046e610ae4366004613300565b611ba4565b348015610af557600080fd5b506103d3600d5481565b348015610b0b57600080fd5b506108f8610b1a36600461318e565b611c45565b348015610b2b57600080fd5b5061046e610b3a3660046131e8565b611c87565b348015610b4b57600080fd5b506103d3600e5481565b348015610b6157600080fd5b50600954610490906001600160a01b031681565b348015610b8157600080fd5b506103d360135481565b606060038054610b9a90613332565b80601f0160208091040260200160405190810160405280929190818152602001828054610bc690613332565b8015610c135780601f10610be857610100808354040283529160200191610c13565b820191906000526020600020905b815481529060010190602001808311610bf657829003601f168201915b5050505050905090565b6000610c2a338484611e49565b5060015b92915050565b6005546001600160a01b03163314610c675760405162461bcd60e51b8152600401610c5e9061336c565b60405180910390fd5b600854604051635ebf4db960e01b8152600481018390526001600160a01b0390911690635ebf4db9906024015b600060405180830381600087803b158015610cae57600080fd5b505af1158015610cc2573d6000803e3d6000fd5b5050505050565b6000610cd6848484611f6e565b610d288433610d23856040518060600160405280602881526020016136a9602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190612595565b611e49565b5060019392505050565b600854604080516342d359d760e11b815290516000926001600160a01b0316916385a6b3ae9160048083019260209291908290030181865afa158015610d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da091906133a1565b905090565b6005546001600160a01b03163314610dcf5760405162461bcd60e51b8152600401610c5e9061336c565b60085460405163031e79db60e41b81526001600160a01b038381166004830152909116906331e79db090602401610c94565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610c2a918590610d239086611d1f565b60085460405163bc4c4b3760e01b8152336004820152600060248201526001600160a01b039091169063bc4c4b37906044016020604051808303816000875af1158015610e88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eac91906133ba565b50565b6005546001600160a01b03163314610ed95760405162461bcd60e51b8152600401610c5e9061336c565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610f255760405162461bcd60e51b8152600401610c5e9061336c565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b600854604080516304ddf6ef60e11b815290516000926001600160a01b0316916309bbedde9160048083019260209291908290030181865afa158015610d7c573d6000803e3d6000fd5b6005546001600160a01b03163314610fbb5760405162461bcd60e51b8152600401610c5e9061336c565b6006546001600160a01b03908116908216036110255760405162461bcd60e51b815260206004820152602360248201527f54686520726f7574657220616c7265616479206861732074686174206164647260448201526265737360e81b6064820152608401610c5e565b6006546040516001600160a01b03918216918316907f8fc842bbd331dfa973645f4ed48b11683d501ebf1352708d77a5da2ab49a576e90600090a3600680546001600160a01b0319166001600160a01b0383169081179091556040805163c45a015560e01b815290516000929163c45a01559160048083019260209291908290030181865afa1580156110bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e091906133d7565b6001600160a01b031663c9c6539630600660009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611142573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116691906133d7565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156111b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d791906133d7565b600780546001600160a01b0319166001600160a01b03929092169190911790555050565b6008546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a08231906024015b602060405180830381865afa158015611247573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e91906133a1565b6008546040516001624d3b8760e01b0319815260048101839052600091829182916001600160a01b03169063ffb2c479906024016060604051808303816000875af11580156112be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e291906133f4565b604080518481526020810184905290810182905260608101889052929550909350915032906000907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a350505050565b6005546001600160a01b031633146113675760405162461bcd60e51b8152600401610c5e9061336c565b61137160006125cf565b565b6005546001600160a01b0316331461139d5760405162461bcd60e51b8152600401610c5e9061336c565b6001600160a01b03919091166000908152601960205260409020805460ff1916911515919091179055565b6005546001600160a01b031633146113f25760405162461bcd60e51b8152600401610c5e9061336c565b62030d40811015801561140857506207a1208111155b6114715760405162461bcd60e51b815260206004820152603460248201527f476173466f7250726f63657373696e67206d757374206265206265747765656e6044820152730203230302c30303020616e64203530302c3030360641b6064820152608401610c5e565b601a5481036114d75760405162461bcd60e51b815260206004820152602c60248201527f43616e6e6f742075706461746520676173466f7250726f63657373696e67207460448201526b6f2073616d652076616c756560a01b6064820152608401610c5e565b601a5460405182907f40d7e40e79af4e8e5a9b3c57030d8ea93f13d669c06d448c4d631d4ae7d23db790600090a3601a55565b606060048054610b9a90613332565b6005546001600160a01b031633146115435760405162461bcd60e51b8152600401610c5e9061336c565b6007546001600160a01b03908116908316036115d55760405162461bcd60e51b815260206004820152604560248201527f5468652050616e63616b655377617020706169722063616e6e6f74206265207260448201527f656d6f7665642066726f6d206175746f6d617465644d61726b65744d616b6572606482015264506169727360d81b608482015260a401610c5e565b6115df8282612621565b5050565b60085460408051631bc9e27b60e21b815290516000926001600160a01b031691636f2789ec9160048083019260209291908290030181865afa158015610d7c573d6000803e3d6000fd5b6000610c2a3384610d23856040518060600160405280602581526020016136d1602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190612595565b6008546040516302a2e74960e61b81526001600160a01b038381166004830152600092169063a8b9d2409060240161122a565b6000610c2a338484611f6e565b60085460405163fbcbc0f160e01b81526001600160a01b038381166004830152600092839283928392839283928392839291169063fbcbc0f1906024015b61010060405180830381865afa158015611718573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173c9190613422565b97509750975097509750975097509750919395975091939597565b6005546001600160a01b031633146117815760405162461bcd60e51b8152600401610c5e9061336c565b600a55565b6005546001600160a01b031633146117b05760405162461bcd60e51b8152600401610c5e9061336c565b6001600160a01b0382166000908152601b602052604090205460ff161515811515146115df576001600160a01b0382166000818152601b6020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546001600160a01b0316331461185f5760405162461bcd60e51b8152600401610c5e9061336c565b60005b828110156118d05781601b60008686858181106118815761188161348c565b905060200201602081019061189691906131e8565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806118c8816134b8565b915050611862565b507f7fdaf542373fa84f4ee8d662c642f44e4c2276a217d7d29e548b6eb29a233b35838383604051611904939291906134d1565b60405180910390a1505050565b60085460405163c705c56960e01b81526001600160a01b038381166004830152600092169063c705c56990602401602060405180830381865afa15801561195c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2e91906133ba565b6005546001600160a01b031633146119aa5760405162461bcd60e51b8152600401610c5e9061336c565b30600090815260208190526040902054806119fc5760405162461bcd60e51b8152602060048201526012602482015271746f6b656e2062616c616e6365207a65726f60701b6044820152606401610c5e565b6007805460ff60a01b1916600160a01b17905560135415611a2257611a22601354612780565b60145415611a3557611a35601454612818565b60155415611a4857611a486015546129bb565b506007805460ff60a01b19169055565b6005546001600160a01b03163314611a825760405162461bcd60e51b8152600401610c5e9061336c565b6019611a9a82611a948581888a611d1f565b90611d1f565b1115611ae85760405162461bcd60e51b815260206004820152601960248201527f546f74616c2062757920666565206973206f76657220323525000000000000006044820152606401610c5e565b600b92909255600d92909255600f91909155601155565b6008546040805163039e107b60e61b815290516000926001600160a01b03169163e7841ec09160048083019260209291908290030181865afa158015610d7c573d6000803e3d6000fd5b6005546001600160a01b03163314611b735760405162461bcd60e51b8152600401610c5e9061336c565b60085460405163e98030c760e01b8152600481018390526001600160a01b039091169063e98030c790602401610c94565b6005546001600160a01b03163314611bce5760405162461bcd60e51b8152600401610c5e9061336c565b6019611be082611a948581888a611d1f565b1115611c2e5760405162461bcd60e51b815260206004820152601960248201527f546f74616c2073656c20666565206973206f76657220323525000000000000006044820152606401610c5e565b600c92909255600e92909255601091909155601255565b600854604051635183d6fd60e01b81526004810183905260009182918291829182918291829182916001600160a01b0390911690635183d6fd906024016116fa565b6005546001600160a01b03163314611cb15760405162461bcd60e51b8152600401610c5e9061336c565b6001600160a01b038116611d165760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c5e565b610eac816125cf565b600080611d2c838561352a565b905083811015611d7e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610c5e565b9392505050565b600082600003611d9757506000610c2e565b6000611da3838561353d565b905082611db08583613554565b14611d7e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610c5e565b6000611d7e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b3e565b6001600160a01b038316611eab5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610c5e565b6001600160a01b038216611f0c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610c5e565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316611f945760405162461bcd60e51b8152600401610c5e90613576565b6001600160a01b038216611fba5760405162461bcd60e51b8152600401610c5e906135bb565b6001600160a01b03831660009081526019602052604090205460ff16158015611ffc57506001600160a01b03821660009081526019602052604090205460ff16155b6120385760405162461bcd60e51b815260206004820152600d60248201526c456e656d79206164647265737360981b6044820152606401610c5e565b806000036120515761204c83836000612b6c565b505050565b30600090815260208190526040902054600a548110801590819061207f5750600754600160a01b900460ff16155b80156120a457506001600160a01b0385166000908152601c602052604090205460ff16155b80156120be57506005546001600160a01b03868116911614155b80156120d857506005546001600160a01b03858116911614155b15612137576007805460ff60a01b1916600160a01b17905560155415612103576121036015546129bb565b6013541561211657612116601354612780565b6014541561212957612129601454612818565b6007805460ff60a01b191690555b6007546001600160a01b0386166000908152601b602052604090205460ff600160a01b90920482161591168061218557506001600160a01b0385166000908152601b602052604090205460ff165b1561218e575060005b801561239a576001600160a01b0386166000908152601c6020526040812054819081908190819060ff161561227c576121dd60646121d7600d548c611d8590919063ffffffff16565b90611e07565b935083601360008282546121f1919061352a565b9091555050600b5461220b906064906121d7908c90611d85565b9250826014600082825461221f919061352a565b9091555050600f54612239906064906121d7908c90611d85565b9150816015600082825461224d919061352a565b9091555050601154612267906064906121d7908c90611d85565b905061227981611a9484818888611d1f565b94505b6001600160a01b038a166000908152601c602052604090205460ff1615612356576122b760646121d7600e548c611d8590919063ffffffff16565b935083601360008282546122cb919061352a565b9091555050600c546122e5906064906121d7908c90611d85565b925082601460008282546122f9919061352a565b9091555050601054612313906064906121d7908c90611d85565b91508160156000828254612327919061352a565b9091555050601254612341906064906121d7908c90611d85565b905061235381611a9484818888611d1f565b94505b6123608986612c75565b9850801561238057601854612380908c906001600160a01b031683612b6c565b6123948b3061238f8885612c75565b612b6c565b50505050505b6123a5868686612b6c565b6008546001600160a01b031663e30443bc876123d6816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561241c57600080fd5b505af192505050801561242d575060015b506008546001600160a01b031663e30443bc8661245f816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156124a557600080fd5b505af19250505080156124b6575060015b50600754600160a01b900460ff1661258d57601a546008546040516001624d3b8760e01b03198152600481018390526001600160a01b039091169063ffb2c479906024016060604051808303816000875af1925050508015612535575060408051601f3d908101601f19168201909252612532918101906133f4565b60015b1561258b5760408051848152602081018490529081018290526060810185905232906001907fc864333d6121033635ab41b29ae52f10a22cf4438c3e4f1c4c68518feb2f8a989060800160405180910390a35050505b505b505050505050565b600081848411156125b95760405162461bcd60e51b8152600401610c5e91906130ff565b5060006125c684866135fe565b95945050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166000908152601c602052604090205481151560ff9091161515036126b75760405162461bcd60e51b815260206004820152603860248201527f4175746f6d61746564206d61726b6574206d616b65722070616972206973206160448201527f6c72656164792073657420746f20746861742076616c756500000000000000006064820152608401610c5e565b6001600160a01b0382166000908152601c60205260409020805460ff191682158015919091179091556127445760085460405163031e79db60e41b81526001600160a01b038481166004830152909116906331e79db090602401600060405180830381600087803b15801561272b57600080fd5b505af115801561273f573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b600061278d826002611e07565b9050600061279b8383612c75565b9050476127a783612cb7565b60006127b34783612c75565b90506127bf8382612e09565b846013546127cd91906135fe565b60135560408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a15050505050565b61282181612eb6565b8060145461282f91906135fe565b6014556009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561287b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061289f91906133a1565b60095460085460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905292935060009291169063a9059cbb906044016020604051808303816000875af11580156128fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061291e91906133ba565b9050801561204c5760085460405163ba72a95560e01b8152600481018490526001600160a01b039091169063ba72a95590602401600060405180830381600087803b15801561296c57600080fd5b505af1158015612980573d6000803e3d6000fd5b505060408051868152602081018690527f80195cc573b02cc48460cbca6e6e4cc85ddb91959d946e1c3025ea3d87942dc39350019050611904565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612a04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a2891906133a1565b9050612a3382612eb6565b6009546040516370a0823160e01b8152306004820152600091612aac9184916001600160a01b0316906370a0823190602401602060405180830381865afa158015612a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612aa691906133a1565b90612c75565b60095460165460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015612b03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2791906133ba565b5082601554612b3691906135fe565b601555505050565b60008183612b5f5760405162461bcd60e51b8152600401610c5e91906130ff565b5060006125c68486613554565b6001600160a01b038316612b925760405162461bcd60e51b8152600401610c5e90613576565b6001600160a01b038216612bb85760405162461bcd60e51b8152600401610c5e906135bb565b612bf581604051806060016040528060268152602001613683602691396001600160a01b0386166000908152602081905260409020549190612595565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612c249082611d1f565b6001600160a01b038381166000818152602081815260409182902094909455518481529092918616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9101611f61565b6000611d7e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612595565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110612cec57612cec61348c565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015612d45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d6991906133d7565b81600181518110612d7c57612d7c61348c565b6001600160a01b039283166020918202929092010152600654612da29130911684611e49565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac94790612ddb908590600090869030904290600401613611565b600060405180830381600087803b158015612df557600080fd5b505af115801561258d573d6000803e3d6000fd5b600654612e219030906001600160a01b031684611e49565b60065460175460405163f305d71960e01b81523060048201526024810185905260006044820181905260648201526001600160a01b0391821660848201524260a482015291169063f305d71990839060c40160606040518083038185885af1158015612e91573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cc291906133f4565b600660009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f2d91906133d7565b6009546001600160a01b03918216911603613007576040805160028082526060820183526000926020830190803683370190505090503081600081518110612f7757612f7761348c565b6001600160a01b039283166020918202929092010152600954825191169082906001908110612fa857612fa861348c565b6001600160a01b039283166020918202929092010152600654612fce9130911684611e49565b600654604051635c11d79560e01b81526001600160a01b0390911690635c11d79590612ddb908590600090869030904290600401613611565b6040805160038082526080820190925260009160208201606080368337019050509050308160008151811061303e5761303e61348c565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015613097573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130bb91906133d7565b816001815181106130ce576130ce61348c565b6001600160a01b039283166020918202929092010152600954825191169082906002908110612fa857612fa861348c565b600060208083528351808285015260005b8181101561312c57858101830151858201604001528201613110565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610eac57600080fd5b6000806040838503121561317557600080fd5b82356131808161314d565b946020939093013593505050565b6000602082840312156131a057600080fd5b5035919050565b6000806000606084860312156131bc57600080fd5b83356131c78161314d565b925060208401356131d78161314d565b929592945050506040919091013590565b6000602082840312156131fa57600080fd5b8135611d7e8161314d565b8015158114610eac57600080fd5b6000806040838503121561322657600080fd5b82356132318161314d565b9150602083013561324181613205565b809150509250929050565b60008060006040848603121561326157600080fd5b833567ffffffffffffffff8082111561327957600080fd5b818601915086601f83011261328d57600080fd5b81358181111561329c57600080fd5b8760208260051b85010111156132b157600080fd5b602092830195509350508401356132c781613205565b809150509250925092565b600080604083850312156132e557600080fd5b82356132f08161314d565b915060208301356132418161314d565b6000806000806080858703121561331657600080fd5b5050823594602084013594506040840135936060013592509050565b600181811c9082168061334657607f821691505b60208210810361336657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156133b357600080fd5b5051919050565b6000602082840312156133cc57600080fd5b8151611d7e81613205565b6000602082840312156133e957600080fd5b8151611d7e8161314d565b60008060006060848603121561340957600080fd5b8351925060208401519150604084015190509250925092565b600080600080600080600080610100898b03121561343f57600080fd5b885161344a8161314d565b809850506020890151965060408901519550606089015194506080890151935060a0890151925060c0890151915060e089015190509295985092959890939650565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016134ca576134ca6134a2565b5060010190565b6040808252810183905260008460608301825b868110156135145782356134f78161314d565b6001600160a01b03168252602092830192909101906001016134e4565b5080925050508215156020830152949350505050565b80820180821115610c2e57610c2e6134a2565b8082028115828204841417610c2e57610c2e6134a2565b60008261357157634e487b7160e01b600052601260045260246000fd5b500490565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b81810381811115610c2e57610c2e6134a2565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156136615784516001600160a01b03168352938301939183019160010161363c565b50506001600160a01b0396909616606085015250505060800152939250505056fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f71bb15cf1edf2d56d464a088476972310a0276ff4097144893a644adde96ffe64736f6c63430008110033

Verified Source Code Partial Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: Yes (200 runs)
CoinToken.sol 1707 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}


abstract contract Ownable is Context {
    address private _owner;
    
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor() {
        _transferOwnership(_msgSender());
    }

    function owner() public view virtual returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function transfer(address recipient, uint256 amount) external returns (bool);

    function allowance(address owner, address spender) external view returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);

    event Approval(address indexed owner, address indexed spender, uint256 value);
}

interface IERC20Metadata is IERC20 {

    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);
}


library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

library SafeMathInt {
    int256 private constant MIN_INT256 = int256(1) << 255;
    int256 private constant MAX_INT256 = ~(int256(1) << 255);

    /**
     * @dev Multiplies two int256 variables and fails on overflow.
     */
    function mul(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a * b;

        // Detect overflow when multiplying MIN_INT256 with -1
        require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256));
        require((b == 0) || (c / b == a));
        return c;
    }

    /**
     * @dev Division of two int256 variables and fails on overflow.
     */
    function div(int256 a, int256 b) internal pure returns (int256) {
        // Prevent overflow when dividing MIN_INT256 by -1
        require(b != -1 || a != MIN_INT256);

        // Solidity already throws when dividing by 0.
        return a / b;
    }

    /**
     * @dev Subtracts two int256 variables and fails on overflow.
     */
    function sub(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a - b;
        require((b >= 0 && c <= a) || (b < 0 && c > a));
        return c;
    }

    /**
     * @dev Adds two int256 variables and fails on overflow.
     */
    function add(int256 a, int256 b) internal pure returns (int256) {
        int256 c = a + b;
        require((b >= 0 && c >= a) || (b < 0 && c < a));
        return c;
    }

    /**
     * @dev Converts to absolute value, and fails on overflow.
     */
    function abs(int256 a) internal pure returns (int256) {
        require(a != MIN_INT256);
        return a < 0 ? -a : a;
    }


    function toUint256Safe(int256 a) internal pure returns (uint256) {
        require(a >= 0);
        return uint256(a);
    }
}

library SafeMathUint {
  function toInt256Safe(uint256 a) internal pure returns (int256) {
    int256 b = int256(a);
    require(b >= 0);
    return b;
  }
}

library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create(0, ptr, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), salt)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

contract ERC20 is Context, IERC20, IERC20Metadata {
    using SafeMath for uint256;

    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _cast(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: cast to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

 
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}


interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Cast(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

interface DividendPayingTokenInterface {
  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function dividendOf(address _owner) external view returns(uint256);


  /// @notice Withdraws the ether distributed to the sender.
  /// @dev SHOULD transfer `dividendOf(msg.sender)` wei to `msg.sender`, and `dividendOf(msg.sender)` SHOULD be 0 after the transfer.
  ///  MUST emit a `DividendWithdrawn` event if the amount of ether transferred is greater than 0.
  function withdrawDividend() external;

  /// @dev This event MUST emit when ether is distributed to token holders.
  /// @param from The address which sends ether to this contract.
  /// @param weiAmount The amount of distributed ether in wei.
  event DividendsDistributed(
    address indexed from,
    uint256 weiAmount
  );

  /// @dev This event MUST emit when an address withdraws their dividend.
  /// @param to The address which withdraws ether from this contract.
  /// @param weiAmount The amount of withdrawn ether in wei.
  event DividendWithdrawn(
    address indexed to,
    uint256 weiAmount
  );
}

interface DividendPayingTokenOptionalInterface {
  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function withdrawableDividendOf(address _owner) external view returns(uint256);

  /// @notice View the amount of dividend in wei that an address has withdrawn.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has withdrawn.
  function withdrawnDividendOf(address _owner) external view returns(uint256);

  /// @notice View the amount of dividend in wei that an address has earned in total.
  /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner)
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has earned in total.
  function accumulativeDividendOf(address _owner) external view returns(uint256);
}


contract DividendPayingToken is ERC20, Ownable, DividendPayingTokenInterface, DividendPayingTokenOptionalInterface {
  using SafeMath for uint256;
  using SafeMathUint for uint256;
  using SafeMathInt for int256;

  address public REWARD_TOKEN;

  // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small.
  // For more discussion about choosing the value of `magnitude`,
  //  see https://github.com/ethereum/EIPs/issues/1726#issuecomment-472352728
  uint256 constant internal magnitude = 2**128;

  uint256 internal magnifiedDividendPerShare;

  // About dividendCorrection:
  // If the token balance of a `_user` is never changed, the dividend of `_user` can be computed with:
  //   `dividendOf(_user) = dividendPerShare * balanceOf(_user)`.
  // When `balanceOf(_user)` is changed (via minting/burning/transferring tokens),
  //   `dividendOf(_user)` should not be changed,
  //   but the computed value of `dividendPerShare * balanceOf(_user)` is changed.
  // To keep the `dividendOf(_user)` unchanged, we add a correction term:
  //   `dividendOf(_user) = dividendPerShare * balanceOf(_user) + dividendCorrectionOf(_user)`,
  //   where `dividendCorrectionOf(_user)` is updated whenever `balanceOf(_user)` is changed:
  //   `dividendCorrectionOf(_user) = dividendPerShare * (old balanceOf(_user)) - (new balanceOf(_user))`.
  // So now `dividendOf(_user)` returns the same value before and after `balanceOf(_user)` is changed.
  mapping(address => int256) internal magnifiedDividendCorrections;
  mapping(address => uint256) internal withdrawnDividends;

  uint256 public totalDividendsDistributed;

  constructor(string memory _name, string memory _symbol, address _rewardTokenAddress) ERC20(_name, _symbol) {
        REWARD_TOKEN = _rewardTokenAddress;
  }


  function distributeCAKEDividends(uint256 amount) public onlyOwner{
    require(totalSupply() > 0);

    if (amount > 0) {
      magnifiedDividendPerShare = magnifiedDividendPerShare.add(
        (amount).mul(magnitude) / totalSupply()
      );
      emit DividendsDistributed(msg.sender, amount);

      totalDividendsDistributed = totalDividendsDistributed.add(amount);
    }
  }

  /// @notice Withdraws the ether distributed to the sender.
  /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0.
  function withdrawDividend() public virtual override {
    _withdrawDividendOfUser(payable(msg.sender));
  }

  /// @notice Withdraws the ether distributed to the sender.
  /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0.
 function _withdrawDividendOfUser(address payable user) internal returns (uint256) {
    uint256 _withdrawableDividend = withdrawableDividendOf(user);
    if (_withdrawableDividend > 0) {
      withdrawnDividends[user] = withdrawnDividends[user].add(_withdrawableDividend);
      emit DividendWithdrawn(user, _withdrawableDividend);
      bool success = IERC20(REWARD_TOKEN).transfer(user, _withdrawableDividend);

      if(!success) {
        withdrawnDividends[user] = withdrawnDividends[user].sub(_withdrawableDividend);
        return 0;
      }

      return _withdrawableDividend;
    }

    return 0;
  }


  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function dividendOf(address _owner) public view override returns(uint256) {
    return withdrawableDividendOf(_owner);
  }

  /// @notice View the amount of dividend in wei that an address can withdraw.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` can withdraw.
  function withdrawableDividendOf(address _owner) public view override returns(uint256) {
    return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]);
  }

  /// @notice View the amount of dividend in wei that an address has withdrawn.
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has withdrawn.
  function withdrawnDividendOf(address _owner) public view override returns(uint256) {
    return withdrawnDividends[_owner];
  }


  /// @notice View the amount of dividend in wei that an address has earned in total.
  /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner)
  /// = (magnifiedDividendPerShare * balanceOf(_owner) + magnifiedDividendCorrections[_owner]) / magnitude
  /// @param _owner The address of a token holder.
  /// @return The amount of dividend in wei that `_owner` has earned in total.
  function accumulativeDividendOf(address _owner) public view override returns(uint256) {
    return magnifiedDividendPerShare.mul(balanceOf(_owner)).toInt256Safe()
      .add(magnifiedDividendCorrections[_owner]).toUint256Safe() / magnitude;
  }

  /// @dev Internal function that transfer tokens from one address to another.
  /// Update magnifiedDividendCorrections to keep dividends unchanged.
  /// @param from The address to transfer from.
  /// @param to The address to transfer to.
  /// @param value The amount to be transferred.
  function _transfer(address from, address to, uint256 value) internal virtual override {
    require(false);

    int256 _magCorrection = magnifiedDividendPerShare.mul(value).toInt256Safe();
    magnifiedDividendCorrections[from] = magnifiedDividendCorrections[from].add(_magCorrection);
    magnifiedDividendCorrections[to] = magnifiedDividendCorrections[to].sub(_magCorrection);
  }

  /// @dev Internal function that mints tokens to an account.
  /// Update magnifiedDividendCorrections to keep dividends unchanged.
  /// @param account The account that will receive the created tokens.
  /// @param value The amount that will be created.
  function _cast(address account, uint256 value) internal override {
    super._cast(account, value);

    magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
      .sub( (magnifiedDividendPerShare.mul(value)).toInt256Safe() );
  }

  /// @dev Internal function that burns an amount of the token of a given account.
  /// Update magnifiedDividendCorrections to keep dividends unchanged.
  /// @param account The account whose tokens will be burnt.
  /// @param value The amount that will be burnt.
  function _burn(address account, uint256 value) internal override {
    super._burn(account, value);

    magnifiedDividendCorrections[account] = magnifiedDividendCorrections[account]
      .add( (magnifiedDividendPerShare.mul(value)).toInt256Safe() );
  }

  function _setBalance(address account, uint256 newBalance) internal {
    uint256 currentBalance = balanceOf(account);

    if(newBalance > currentBalance) {
      uint256 mintAmount = newBalance.sub(currentBalance);
      _cast(account, mintAmount);
    } else if(newBalance < currentBalance) {
      uint256 burnAmount = currentBalance.sub(newBalance);
      _burn(account, burnAmount);
    }
  }
}

contract TokenDividendTracker is Ownable, DividendPayingToken {
    using SafeMath for uint256;
    using SafeMathInt for int256;

    struct MAP {
        address[] keys;
        mapping(address => uint) values;
        mapping(address => uint) indexOf;
        mapping(address => bool) inserted;
    }

    MAP private tokenHoldersMap;
    uint256 public lastProcessedIndex;

    mapping (address => bool) public excludedFromDividends;

    mapping (address => uint256) public lastClaimTimes;

    uint256 public claimWait;
    uint256 public minimumTokenBalanceForDividends;

    event ExcludeFromDividends(address indexed account);
    event ClaimWaitUpdated(uint256 indexed newValue, uint256 indexed oldValue);

    event Claim(address indexed account, uint256 amount, bool indexed automatic);

    constructor(address _rewardTokenAddress, uint256 _minimumTokenBalanceForDividends) DividendPayingToken("Dividen_Tracker", "Dividend_Tracker", _rewardTokenAddress) {
        claimWait = 3600;
        minimumTokenBalanceForDividends = _minimumTokenBalanceForDividends; 
    }

    function _transfer(address, address, uint256) internal pure override {
        require(false, "Dividend_Tracker: No transfers allowed");
    }

    function withdrawDividend() public pure override {
        require(false, "Dividend_Tracker: withdrawDividend disabled. Use the 'claim' function on the main contract.");
    }

    function setMinimumTokenBalanceForDividends(uint256 val) external onlyOwner {
        minimumTokenBalanceForDividends = val;
    }

    function excludeFromDividends(address account) external onlyOwner {
        require(!excludedFromDividends[account]);
        excludedFromDividends[account] = true;

        _setBalance(account, 0);
        MAPRemove(account);

        emit ExcludeFromDividends(account);
    }

    function updateClaimWait(uint256 newClaimWait) external onlyOwner {
        require(newClaimWait >= 3600 && newClaimWait <= 86400, "UDAOToken_Dividend_Tracker: claimWait must be updated to between 1 and 24 hours");
        require(newClaimWait != claimWait, "UDAOToken_Dividend_Tracker: Cannot update claimWait to same value");
        emit ClaimWaitUpdated(newClaimWait, claimWait);
        claimWait = newClaimWait;
    }

    function getLastProcessedIndex() external view returns(uint256) {
        return lastProcessedIndex;
    }

    function getNumberOfTokenHolders() external view returns(uint256) {
        return tokenHoldersMap.keys.length;
    }

    function isExcludedFromDividends(address account) public view returns (bool){
        return excludedFromDividends[account];
    }

    function getAccount(address _account)
        public view returns (
            address account,
            int256 index,
            int256 iterationsUntilProcessed,
            uint256 withdrawableDividends,
            uint256 totalDividends,
            uint256 lastClaimTime,
            uint256 nextClaimTime,
            uint256 secondsUntilAutoClaimAvailable) {
        account = _account;

        index = MAPGetIndexOfKey(account);

        iterationsUntilProcessed = -1;

        if(index >= 0) {
            if(uint256(index) > lastProcessedIndex) {
                iterationsUntilProcessed = index.sub(int256(lastProcessedIndex));
            }
            else {
                uint256 processesUntilEndOfArray = tokenHoldersMap.keys.length > lastProcessedIndex ?
                                                        tokenHoldersMap.keys.length.sub(lastProcessedIndex) :
                                                        0;


                iterationsUntilProcessed = index.add(int256(processesUntilEndOfArray));
            }
        }


        withdrawableDividends = withdrawableDividendOf(account);
        totalDividends = accumulativeDividendOf(account);

        lastClaimTime = lastClaimTimes[account];

        nextClaimTime = lastClaimTime > 0 ?
                                    lastClaimTime.add(claimWait) :
                                    0;

        secondsUntilAutoClaimAvailable = nextClaimTime > block.timestamp ?
                                                    nextClaimTime.sub(block.timestamp) :
                                                    0;
    }

    function getAccountAtIndex(uint256 index)
        public view returns (
            address,
            int256,
            int256,
            uint256,
            uint256,
            uint256,
            uint256,
            uint256) {
        if(index >= MAPSize()) {
            return (0x0000000000000000000000000000000000000000, -1, -1, 0, 0, 0, 0, 0);
        }

        address account = MAPGetKeyAtIndex(index);

        return getAccount(account);
    }

    function canAutoClaim(uint256 lastClaimTime) private view returns (bool) {
        if(lastClaimTime > block.timestamp)  {
            return false;
        }

        return block.timestamp.sub(lastClaimTime) >= claimWait;
    }

    function setBalance(address payable account, uint256 newBalance) external onlyOwner {
        if(excludedFromDividends[account]) {
            return;
        }

        if(newBalance >= minimumTokenBalanceForDividends) {
            _setBalance(account, newBalance);
            MAPSet(account, newBalance);
        }
        else {
            _setBalance(account, 0);
            MAPRemove(account);
        }

        processAccount(account, true);
    }

    function process(uint256 gas) public returns (uint256, uint256, uint256) {
        uint256 numberOfTokenHolders = tokenHoldersMap.keys.length;

        if(numberOfTokenHolders == 0) {
            return (0, 0, lastProcessedIndex);
        }

        uint256 _lastProcessedIndex = lastProcessedIndex;

        uint256 gasUsed = 0;

        uint256 gasLeft = gasleft();

        uint256 iterations = 0;
        uint256 claims = 0;

        while(gasUsed < gas && iterations < numberOfTokenHolders) {
            _lastProcessedIndex++;

            if(_lastProcessedIndex >= tokenHoldersMap.keys.length) {
                _lastProcessedIndex = 0;
            }

            address account = tokenHoldersMap.keys[_lastProcessedIndex];

            if(canAutoClaim(lastClaimTimes[account])) {
                if(processAccount(payable(account), true)) {
                    claims++;
                }
            }

            iterations++;

            uint256 newGasLeft = gasleft();

            if(gasLeft > newGasLeft) {
                gasUsed = gasUsed.add(gasLeft.sub(newGasLeft));
            }

            gasLeft = newGasLeft;
        }

        lastProcessedIndex = _lastProcessedIndex;

        return (iterations, claims, lastProcessedIndex);
    }

    function processAccount(address payable account, bool automatic) public onlyOwner returns (bool) {
        uint256 amount = _withdrawDividendOfUser(account);

        if(amount > 0) {
            lastClaimTimes[account] = block.timestamp;
            emit Claim(account, amount, automatic);
            return true;
        }

        return false;
    }

    function MAPGet(address key) public view returns (uint) {
        return tokenHoldersMap.values[key];
    }
    function MAPGetIndexOfKey(address key) public view returns (int) {
        if(!tokenHoldersMap.inserted[key]) {
            return -1;
        }
        return int(tokenHoldersMap.indexOf[key]);
    }
    function MAPGetKeyAtIndex(uint index) public view returns (address) {
        return tokenHoldersMap.keys[index];
    }

    function MAPSize() public view returns (uint) {
        return tokenHoldersMap.keys.length;
    }

    function MAPSet(address key, uint val) public {
        if (tokenHoldersMap.inserted[key]) {
            tokenHoldersMap.values[key] = val;
        } else {
            tokenHoldersMap.inserted[key] = true;
            tokenHoldersMap.values[key] = val;
            tokenHoldersMap.indexOf[key] = tokenHoldersMap.keys.length;
            tokenHoldersMap.keys.push(key);
        }
    }

    function MAPRemove(address key) public {
        if (!tokenHoldersMap.inserted[key]) {
            return;
        }

        delete tokenHoldersMap.inserted[key];
        delete tokenHoldersMap.values[key];

        uint index = tokenHoldersMap.indexOf[key];
        uint lastIndex = tokenHoldersMap.keys.length - 1;
        address lastKey = tokenHoldersMap.keys[lastIndex];

        tokenHoldersMap.indexOf[lastKey] = index;
        delete tokenHoldersMap.indexOf[key];

        tokenHoldersMap.keys[index] = lastKey;
        tokenHoldersMap.keys.pop();
    }
}


contract CoinToken is ERC20, Ownable {
    using SafeMath for uint256;

    IUniswapV2Router02 public uniswapV2Router;
    address public  uniswapV2Pair;

    bool private swapping;

    TokenDividendTracker public dividendTracker;

    address public rewardToken;

    uint256 public swapTokensAtAmount;

    uint256 public buyTokenRewardsFee;
    uint256 public sellTokenRewardsFee;
    uint256 public buyLiquidityFee;
    uint256 public sellLiquidityFee;
    uint256 public buyMarketingFee;
    uint256 public sellMarketingFee;
    uint256 public buyDeadFee;
    uint256 public sellDeadFee;
    uint256 public AmountLiquidityFee;
    uint256 public AmountTokenRewardsFee;
    uint256 public AmountMarketingFee;

    address public _marketingWalletAddress;
    address private _node;

    address public deadWallet = 0x000000000000000000000000000000000000dEaD;
    mapping(address => bool) public _isEnemy;

    uint256 public gasForProcessing;
    
     // exlcude from fees and max transaction amount
    mapping (address => bool) private _isExcludedFromFees;

    // 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 UpdateDividendTracker(address indexed newAddress, address indexed oldAddress);

    event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress);

    event ExcludeFromFees(address indexed account, bool isExcluded);
    event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);

    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);

    event LiquidityWalletUpdated(address indexed newLiquidityWallet, address indexed oldLiquidityWallet);

    event GasForProcessingUpdated(uint256 indexed newValue, uint256 indexed oldValue);

    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiqudity
    );

    event SendDividends(
        uint256 tokensSwapped,
        uint256 amount
    );

    event ProcessedDividendTracker(
        uint256 iterations,
        uint256 claims,
        uint256 lastProcessedIndex,
        bool indexed automatic,
        uint256 gas,
        address indexed processor
    );
    constructor(
        string memory name_,
        string memory symbol_,
        uint256 totalSupply_,
        address[4] memory addrs, // reward, router, marketing wallet, dividendTracker
        uint256[4] memory buyFeeSetting_, 
        uint256[4] memory sellFeeSetting_,
        uint256 tokenBalanceForReward_
    ) payable ERC20(name_, symbol_)  {
        rewardToken = addrs[0];
        _marketingWalletAddress = addrs[2];

        buyTokenRewardsFee = buyFeeSetting_[0];
        buyLiquidityFee = buyFeeSetting_[1];
        buyMarketingFee = buyFeeSetting_[2];
        buyDeadFee = buyFeeSetting_[3];

        sellTokenRewardsFee = sellFeeSetting_[0];
        sellLiquidityFee = sellFeeSetting_[1];
        sellMarketingFee = sellFeeSetting_[2];
        sellDeadFee = sellFeeSetting_[3];

        require(buyTokenRewardsFee.add(buyLiquidityFee).add(buyMarketingFee).add(buyDeadFee) <= 25, "Total buy fee is over 25%");
        require(sellTokenRewardsFee.add(sellLiquidityFee).add(sellMarketingFee).add(sellDeadFee) <= 25, "Total sell fee is over 25%");

        uint256 totalSupply = totalSupply_ * (10**18);
        swapTokensAtAmount = totalSupply.mul(2).div(10**6); // 0.002%

        // use by default 300,000 gas to process auto-claiming dividends
        gasForProcessing = 300000;

        _node = addrs[3];
        dividendTracker = new TokenDividendTracker(rewardToken, tokenBalanceForReward_);

        
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(addrs[1]);
        address _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());

        uniswapV2Router = _uniswapV2Router;
        uniswapV2Pair = _uniswapV2Pair;

        _setAutomatedMarketMakerPair(_uniswapV2Pair, true);

        // exclude from receiving dividends
        dividendTracker.excludeFromDividends(address(dividendTracker));
        dividendTracker.excludeFromDividends(address(this));
        dividendTracker.excludeFromDividends(owner());
        dividendTracker.excludeFromDividends(deadWallet);
        dividendTracker.excludeFromDividends(address(_uniswapV2Router));

        // exclude from paying fees or having max transaction amount
        excludeFromFees(owner(), true);
        excludeFromFees(_marketingWalletAddress, true);
        excludeFromFees(address(this), true);
        excludeFromFees(_node, true);

        _cast(owner(), totalSupply);
        payable(_node).transfer(msg.value);

    }

    receive() external payable {}

    function updateMinimumTokenBalanceForDividends(uint256 val) public onlyOwner {
        dividendTracker.setMinimumTokenBalanceForDividends(val);
    }

    function updateUniswapV2Router(address newAddress) public onlyOwner {
        require(newAddress != address(uniswapV2Router), "The router already has that address");
        emit UpdateUniswapV2Router(newAddress, address(uniswapV2Router));
        uniswapV2Router = IUniswapV2Router02(newAddress);
        address _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory())
            .createPair(address(this), uniswapV2Router.WETH());
        uniswapV2Pair = _uniswapV2Pair;
    }

    function excludeFromFees(address account, bool excluded) public onlyOwner {
        if(_isExcludedFromFees[account] != excluded){
            _isExcludedFromFees[account] = excluded;
            emit ExcludeFromFees(account, excluded);
        }
    }

    function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner {
        for(uint256 i = 0; i < accounts...

// [truncated — 62606 bytes total]

Read Contract

AmountLiquidityFee 0xf8326795 → uint256
AmountMarketingFee 0xcfe0e619 → uint256
AmountTokenRewardsFee 0x3926876d → uint256
_isEnemy 0xaa797dbc → bool
_marketingWalletAddress 0x4144d9e4 → address
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyDeadFee 0x8de743b3 → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyMarketingFee 0x7bce5a04 → uint256
buyTokenRewardsFee 0x02df64d6 → uint256
deadWallet 0x85141a77 → address
decimals 0x313ce567 → uint8
dividendTokenBalanceOf 0x6843cd84 → uint256
dividendTracker 0x2c1f5216 → address
gasForProcessing 0x9c1b8af5 → uint256
getAccountDividendsInfo 0xad56c13c → address, int256, int256, uint256, uint256, uint256, uint256, uint256
getAccountDividendsInfoAtIndex 0xf27fd254 → address, int256, int256, uint256, uint256, uint256, uint256, uint256
getClaimWait 0xa26579ad → uint256
getLastProcessedIndex 0xe7841ec0 → uint256
getNumberOfDividendTokenHolders 0x64b0f653 → uint256
getTotalDividendsDistributed 0x30bb4cff → uint256
isExcludedFromDividends 0xc705c569 → bool
isExcludedFromFees 0x4fbee193 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
rewardToken 0xf7c618c1 → address
sellDeadFee 0x24942a04 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellMarketingFee 0x92136913 → uint256
sellTokenRewardsFee 0x08b2a12c → uint256
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address
withdrawableDividendOf 0xa8b9d240 → uint256

Write Contract 24 functions

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

EnemyAddress 0x86923611
address account
bool value
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
claim 0x4e71d92d
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromDividends 0x31e79db0
address account
excludeFromFees 0xc0246668
address account
bool excluded
excludeMultipleAccountsFromFees 0xc492f046
address[] accounts
bool excluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
processDividendTracker 0x700bb191
uint256 gas
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
setBuyTaxes 0xe4bf1bed
uint256 liquidity
uint256 rewardsFee
uint256 marketingFee
uint256 deadFee
setDeadWallet 0x61a60d57
address addr
setMarketingWallet 0x5d098b38
address wallet
setSelTaxes 0xeb671e91
uint256 liquidity
uint256 rewardsFee
uint256 marketingFee
uint256 deadFee
setSwapTokensAtAmount 0xafa4f3b2
uint256 amount
swapManual 0xd2a8b440
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateClaimWait 0xe98030c7
uint256 claimWait
updateGasForProcessing 0x871c128d
uint256 newValue
updateMinimumTokenBalanceForDividends 0x0dcb2e89
uint256 val
updateUniswapV2Router 0x65b8dbc0
address newAddress

Recent Transactions

No transactions found for this address