Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x192f4bEF2B35Ebe109D35ad5899665573CcB0978
Balance 0 ETH
Nonce 2
Code Size 11789 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

11789 bytes
0x6080604052600436106103855760003560e01c806388bdd9be116101d1578063abb8105211610102578063d2fcc001116100a0578063f2fde38b1161006f578063f2fde38b14610a9f578063f66895a314610abf578063f887ea4014610ada578063f8b45b0514610afa57600080fd5b8063d2fcc00114610a29578063dd62ed3e14610a49578063e01af92c14610a69578063e2f4560514610a8957600080fd5b8063bdf1436d116100dc578063bdf1436d146109a9578063c0246668146109c9578063c18bc195146109e9578063c851cc3214610a0957600080fd5b8063abb8105214610929578063afa4f3b214610959578063b62496f51461097957600080fd5b80639a7a23d61161016f578063a8aa1b3111610149578063a8aa1b31146108a9578063a8b9d240146108c9578063a9059cbb146108e9578063aa35822c1461090957600080fd5b80639a7a23d614610849578063a11a168214610869578063a457c2d71461088957600080fd5b80638da5cb5b116101ab5780638da5cb5b146107d65780638ea5220f146107f457806392929a091461081457806395d89b411461083457600080fd5b806388bdd9be1461078057806388e765ff146107a05780638c9684f9146107b657600080fd5b8063313ce567116102b657806366d602ae11610254578063715018a611610223578063715018a6146106c957806379b447bd146106de5780637b510fe8146106fe578063864701a51461075057600080fd5b806366d602ae1461063c5780636843cd84146106525780636ddd17131461067257806370a082311461069357600080fd5b806346469afb1161029057806346469afb146105b75780634ada218b146105cd5780634e71d92d146105ee5780634fbee1931461060357600080fd5b8063313ce5671461055b578063342aa8b514610577578063395093511461059757600080fd5b80631bff7898116103235780632866ed21116102fd5780632866ed21146104cd5780632c1f5216146104ee5780632e1ab9041461052657806330bb4cff1461054657600080fd5b80631bff7898146104775780631f53ac021461048d57806323b872dd146104ad57600080fd5b80630a78097d1161035f5780630a78097d1461040e5780630bd05b691461042e57806312b77e8a1461044357806318160ddd1461045857600080fd5b80630483f7a01461039157806306fdde03146103b3578063095ea7b3146103de57600080fd5b3661038c57005b600080fd5b34801561039d57600080fd5b506103b16103ac3660046129b1565b610b10565b005b3480156103bf57600080fd5b506103c8610b83565b6040516103d591906129ea565b60405180910390f35b3480156103ea57600080fd5b506103fe6103f9366004612a38565b610c15565b60405190151581526020016103d5565b34801561041a57600080fd5b506103b1610429366004612a64565b610c2f565b34801561043a57600080fd5b506103b1610d33565b34801561044f57600080fd5b506103b1610daf565b34801561046457600080fd5b506002545b6040519081526020016103d5565b34801561048357600080fd5b5061046960135481565b34801561049957600080fd5b506103b16104a8366004612a64565b610e1b565b3480156104b957600080fd5b506103fe6104c8366004612a88565b610e45565b3480156104d957600080fd5b506007546103fe90600160b01b900460ff1681565b3480156104fa57600080fd5b5060085461050e906001600160a01b031681565b6040516001600160a01b0390911681526020016103d5565b34801561053257600080fd5b506103b1610541366004612a64565b610e69565b34801561055257600080fd5b50610469610ed4565b34801561056757600080fd5b50604051601281526020016103d5565b34801561058357600080fd5b506103b16105923660046129b1565b610f47565b3480156105a357600080fd5b506103fe6105b2366004612a38565b610fa7565b3480156105c357600080fd5b5061046960125481565b3480156105d957600080fd5b506007546103fe90600160b81b900460ff1681565b3480156105fa57600080fd5b506103b1610fc9565b34801561060f57600080fd5b506103fe61061e366004612a64565b6001600160a01b031660009081526015602052604090205460ff1690565b34801561064857600080fd5b50610469600c5481565b34801561065e57600080fd5b5061046961066d366004612a64565b611087565b34801561067e57600080fd5b506007546103fe90600160a81b900460ff1681565b34801561069f57600080fd5b506104696106ae366004612a64565b6001600160a01b031660009081526020819052604090205490565b3480156106d557600080fd5b506103b16110f7565b3480156106ea57600080fd5b506103b16106f9366004612ac9565b61110b565b34801561070a57600080fd5b5061071e610719366004612a64565b6111fe565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a0016103d5565b34801561075c57600080fd5b50600e54600f5461076b919082565b604080519283526020830191909152016103d5565b34801561078c57600080fd5b506103b161079b366004612a64565b611288565b3480156107ac57600080fd5b50610469600b5481565b3480156107c257600080fd5b506103b16107d1366004612a64565b61145a565b3480156107e257600080fd5b506005546001600160a01b031661050e565b34801561080057600080fd5b5060095461050e906001600160a01b031681565b34801561082057600080fd5b506103b161082f366004612aeb565b61149a565b34801561084057600080fd5b506103c86114c0565b34801561085557600080fd5b506103b16108643660046129b1565b6114cf565b34801561087557600080fd5b506103b1610884366004612ac9565b6114e1565b34801561089557600080fd5b506103fe6108a4366004612a38565b611566565b3480156108b557600080fd5b5060075461050e906001600160a01b031681565b3480156108d557600080fd5b506104696108e4366004612a64565b6115e1565b3480156108f557600080fd5b506103fe610904366004612a38565b611614565b34801561091557600080fd5b506103b1610924366004612ac9565b611622565b34801561093557600080fd5b506103fe610944366004612a64565b60146020526000908152604090205460ff1681565b34801561096557600080fd5b506103b1610974366004612b08565b6116a7565b34801561098557600080fd5b506103fe610994366004612a64565b60166020526000908152604090205460ff1681565b3480156109b557600080fd5b506103b16109c4366004612b08565b6116c7565b3480156109d557600080fd5b506103b16109e43660046129b1565b61178c565b3480156109f557600080fd5b506103b1610a04366004612b08565b611876565b348015610a1557600080fd5b506103b1610a24366004612a64565b6118f4565b348015610a3557600080fd5b506103b1610a443660046129b1565b61191e565b348015610a5557600080fd5b50610469610a64366004612b21565b611951565b348015610a7557600080fd5b506103b1610a84366004612aeb565b61197c565b348015610a9557600080fd5b50610469600a5481565b348015610aab57600080fd5b506103b1610aba366004612a64565b6119a2565b348015610acb57600080fd5b5060105460115461076b919082565b348015610ae657600080fd5b5060065461050e906001600160a01b031681565b348015610b0657600080fd5b50610469600d5481565b610b18611a18565b60085460405162241fbd60e51b81526001600160a01b038481166004830152831515602483015290911690630483f7a0906044015b600060405180830381600087803b158015610b6757600080fd5b505af1158015610b7b573d6000803e3d6000fd5b505050505050565b606060038054610b9290612b4f565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbe90612b4f565b8015610c0b5780601f10610be057610100808354040283529160200191610c0b565b820191906000526020600020905b815481529060010190602001808311610bee57829003601f168201915b5050505050905090565b600033610c23818585611a72565b60019150505b92915050565b610c37611a18565b806001600160a01b031663a9059cbb610c586005546001600160a01b031690565b6040516370a0823160e01b81523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015610c9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc09190612b89565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190612ba2565b5050565b610d3b611a18565b600754600160b81b900460ff1615610d9a5760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720616c726561647920656e61626c656400000000000000000060448201526064015b60405180910390fd5b6007805460ff60b81b1916600160b81b179055565b610db7611a18565b60095460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114610e08576040519150601f19603f3d011682016040523d82523d6000602084013e610e0d565b606091505b5050905080610d2f57600080fd5b610e23611a18565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b600033610e53858285611b96565b610e5e858585611c10565b506001949350505050565b610e71611a18565b60085460405163225b5ecf60e11b81526001600160a01b038381166004830152909116906344b6bd9e906024015b600060405180830381600087803b158015610eb957600080fd5b505af1158015610ecd573d6000803e3d6000fd5b5050505050565b600854604080516342d359d760e11b815290516000926001600160a01b0316916385a6b3ae9160048083019260209291908290030181865afa158015610f1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f429190612b89565b905090565b610f4f611a18565b6001600160a01b03821660009081526014602052604090205481151560ff909116151503610f7c57600080fd5b6001600160a01b03919091166000908152601460205260409020805460ff1916911515919091179055565b600033610c23818585610fba8383611951565b610fc49190612bd5565b611a72565b600754600160b01b900460ff166110165760405162461bcd60e51b815260206004820152601160248201527010db185a5b481b9bdd08195b98589b1959607a1b6044820152606401610d91565b60085460405163807ab4f760e01b81523360048201526001600160a01b039091169063807ab4f7906024016020604051808303816000875af1158015611060573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110849190612ba2565b50565b6008546040516370a0823160e01b81526001600160a01b03838116600483015260009216906370a08231906024015b602060405180830381865afa1580156110d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c299190612b89565b6110ff611a18565b61110960006121f3565b565b611113611a18565b6207a1208210156111715760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f7420736574206d6178627579206c6f776572207468616e20302e35604482015261012960f51b6064820152608401610d91565b6207a1208110156111d05760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f7420736574206d617873656c6c206c6f776572207468616e20302e60448201526201a92960ed1b6064820152608401610d91565b6111e282670de0b6b3a7640000612be8565b600b556111f781670de0b6b3a7640000612be8565b600c555050565b60085460405163fbcbc0f160e01b81526001600160a01b038381166004830152600092839283928392839291169063fbcbc0f19060240160a060405180830381865afa158015611252573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112769190612bff565b939a9299509097509550909350915050565b611290611a18565b60405162241fbd60e51b81526001600160a01b03821660048201819052600160248301528291630483f7a090604401600060405180830381600087803b1580156112d957600080fd5b505af11580156112ed573d6000803e3d6000fd5b505060405162241fbd60e51b8152306004820152600160248201526001600160a01b0384169250630483f7a09150604401600060405180830381600087803b15801561133857600080fd5b505af115801561134c573d6000803e3d6000fd5b50505050806001600160a01b0316630483f7a06113716005546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260016024820152604401600060405180830381600087803b1580156113b957600080fd5b505af11580156113cd573d6000803e3d6000fd5b505060065460405162241fbd60e51b81526001600160a01b039182166004820152600160248201529084169250630483f7a09150604401600060405180830381600087803b15801561141e57600080fd5b505af1158015611432573d6000803e3d6000fd5b5050600880546001600160a01b0319166001600160a01b039490941693909317909255505050565b611462611a18565b60085460405163497ec82360e01b81523360048201526001600160a01b0383811660248301529091169063497ec82390604401610e9f565b6114a2611a18565b60078054911515600160b01b0260ff60b01b19909216919091179055565b606060048054610b9290612b4f565b6114d7611a18565b610d2f8282612245565b6114e9611a18565b60146114f58284612bd5565b11156115385760405162461bcd60e51b8152602060048201526012602482015271466565206d757374206265203c3d2032302560701b6044820152606401610d91565b604080518082019091528281526020018190526010829055601181905561155f8183612bd5565b6013555050565b600033816115748286611951565b9050838110156115d45760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610d91565b610e5e8286868403611a72565b6008546040516302a2e74960e61b81526001600160a01b038381166004830152600092169063a8b9d240906024016110b6565b600033610c23818585611c10565b61162a611a18565b60146116368284612bd5565b11156116795760405162461bcd60e51b8152602060048201526012602482015271466565206d757374206265203c3d2032302560701b6044820152606401610d91565b60408051808201909152828152602001819052600e829055600f8190556116a08183612bd5565b6012555050565b6116af611a18565b6116c181670de0b6b3a7640000612be8565b600a5550565b6116cf611a18565b6007546008546040516323b872dd60e01b81523360048201526001600160a01b0391821660248201526044810184905260009291909116906323b872dd906064016020604051808303816000875af115801561172f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117539190612ba2565b90508015610d2f57600854604051633b79ab6760e21b8152600481018490526001600160a01b039091169063ede6ad9c90602401610b4d565b611794611a18565b6001600160a01b03821660009081526015602052604090205481151560ff9091161515036118175760405162461bcd60e51b815260206004820152602a60248201527f4163636f756e7420697320616c7265616479207468652076616c7565206f6620604482015269276578636c756465642760b01b6064820152608401610d91565b6001600160a01b038216600081815260156020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b61187e611a18565b620f42408110156118dc5760405162461bcd60e51b815260206004820152602260248201527f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e20604482015261312560f01b6064820152608401610d91565b6118ee81670de0b6b3a7640000612be8565b600d5550565b6118fc611a18565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b611926611a18565b6001600160a01b03919091166000908152601760205260409020805460ff1916911515919091179055565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611984611a18565b60078054911515600160a81b0260ff60a81b19909216919091179055565b6119aa611a18565b6001600160a01b038116611a0f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d91565b611084816121f3565b6005546001600160a01b031633146111095760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d91565b6001600160a01b038316611ad45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610d91565b6001600160a01b038216611b355760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610d91565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000611ba28484611951565b90506000198114611c0a5781811015611bfd5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610d91565b611c0a8484848403611a72565b50505050565b6001600160a01b038316611c365760405162461bcd60e51b8152600401610d9190612c48565b6001600160a01b038216611c5c5760405162461bcd60e51b8152600401610d9190612c8d565b6001600160a01b03831660009081526015602052604090205460ff16158015611c9e57506001600160a01b03821660009081526015602052604090205460ff16155b8015611cb45750600754600160a01b900460ff16155b15611e8657600754600160b81b900460ff16611d075760405162461bcd60e51b815260206004820152601260248201527154726164696e67206e6f742061637469766560701b6044820152606401610d91565b6001600160a01b03821660009081526016602052604090205460ff1615611d7f57600c54811115611d7a5760405162461bcd60e51b815260206004820152601f60248201527f596f752061726520657863656564696e67206d617853656c6c416d6f756e74006044820152606401610d91565b611df2565b6001600160a01b03831660009081526016602052604090205460ff1615611df257600b54811115611df25760405162461bcd60e51b815260206004820152601e60248201527f596f752061726520657863656564696e67206d6178427579416d6f756e7400006044820152606401610d91565b6001600160a01b03821660009081526017602052604090205460ff16611e8657600d546001600160a01b038316600090815260208190526040902054611e389083612bd5565b1115611e865760405162461bcd60e51b815260206004820152601b60248201527f556e61626c6520746f20657863656564204d61782057616c6c657400000000006044820152606401610d91565b80600003611e9f57611e9a838360006123aa565b505050565b30600090815260208190526040902054600a5481108015908190611ecd5750600754600160a01b900460ff16155b8015611ee25750600754600160a81b900460ff165b8015611f0657506001600160a01b03841660009081526016602052604090205460ff165b8015611f2b57506001600160a01b03851660009081526015602052604090205460ff16155b8015611f5057506001600160a01b03841660009081526015602052604090205460ff16155b15611f89576007805460ff60a01b1916600160a01b17905560135415611f7b57611f7b600a546124d4565b6007805460ff60a01b191690555b6007546001600160a01b03861660009081526015602052604090205460ff600160a01b909204821615911680611fd757506001600160a01b03851660009081526015602052604090205460ff165b15611fe0575060005b6001600160a01b03851660009081526016602052604090205460ff1615801561202257506001600160a01b03861660009081526016602052604090205460ff16155b1561202b575060005b80156120ca576001600160a01b03851660009081526016602052604081205460ff1615612073576064601354866120629190612be8565b61206c9190612cd0565b90506120b1565b6001600160a01b03871660009081526016602052604090205460ff16156120b1576064601254866120a49190612be8565b6120ae9190612cd0565b90505b6120bb8186612cf2565b94506120c88730836123aa565b505b6120d58686866123aa565b6008546001600160a01b031663e30443bc87612106816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561214c57600080fd5b505af192505050801561215d575060015b506008546001600160a01b031663e30443bc8661218f816001600160a01b031660009081526020819052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156121d557600080fd5b505af19250505080156121e6575060015b15610b7b57505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03821660009081526016602052604090205481151560ff9091161515036122db5760405162461bcd60e51b815260206004820152603860248201527f4175746f6d61746564206d61726b6574206d616b65722070616972206973206160448201527f6c72656164792073657420746f20746861742076616c756500000000000000006064820152608401610d91565b6001600160a01b0382166000908152601660205260409020805460ff1916821580159190911790915561236e5760085460405162241fbd60e51b81526001600160a01b0384811660048301526001602483015290911690630483f7a090604401600060405180830381600087803b15801561235557600080fd5b505af1158015612369573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6001600160a01b0383166123d05760405162461bcd60e51b8152600401610d9190612c48565b6001600160a01b0382166123f65760405162461bcd60e51b8152600401610d9190612c8d565b6001600160a01b0383166000908152602081905260409020548181101561246e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610d91565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3611c0a565b6013546010546000916002916124ea9085612be8565b6124f49190612cd0565b6124fe9190612cd0565b905060006002601354601060000154856125189190612be8565b6125229190612cd0565b61252c9190612cd0565b6013546011549192506000916125429086612be8565b61254c9190612cd0565b9050612557836127c0565b4780156125685761256883826128e4565b612571826127c0565b4780801561261e576009546040516000916001600160a01b03169083908381818185875af1925050503d80600081146125c6576040519150601f19603f3d011682016040523d82523d6000602084013e6125cb565b606091505b505090508061261c5760405162461bcd60e51b815260206004820181905260248201527f4661696c656420746f2073656e642045544820746f206465762077616c6c65746044820152606401610d91565b505b6007546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612667573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061268b9190612b89565b90508080156127b55760075460085460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052600092919091169063a9059cbb906044016020604051808303816000875af11580156126ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127129190612ba2565b905080156127b357600854604051633b79ab6760e21b8152600481018490526001600160a01b039091169063ede6ad9c90602401600060405180830381600087803b15801561276057600080fd5b505af1158015612774573d6000803e3d6000fd5b5050604080518d8152602081018690527f80195cc573b02cc48460cbca6e6e4cc85ddb91959d946e1c3025ea3d87942dc3935001905060405180910390a15b505b505050505050505050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106127f5576127f5612d05565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561284e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128729190612d1b565b8160018151811061288557612885612d05565b6001600160a01b0392831660209182029290920101526006546128ab9130911684611a72565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac94790610b4d908590600090869030904290600401612d38565b6006546128fc9030906001600160a01b031684611a72565b60065460405163f305d71960e01b8152306004820181905260248201859052600060448301819052606483015260848201524260a48201526001600160a01b039091169063f305d71990839060c40160606040518083038185885af1158015612969573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ecd9190612da9565b6001600160a01b038116811461108457600080fd5b801515811461108457600080fd5b600080604083850312156129c457600080fd5b82356129cf8161298e565b915060208301356129df816129a3565b809150509250929050565b600060208083528351808285015260005b81811015612a17578581018301518582016040015282016129fb565b506000604082860101526040601f19601f8301168501019250505092915050565b60008060408385031215612a4b57600080fd5b8235612a568161298e565b946020939093013593505050565b600060208284031215612a7657600080fd5b8135612a818161298e565b9392505050565b600080600060608486031215612a9d57600080fd5b8335612aa88161298e565b92506020840135612ab88161298e565b929592945050506040919091013590565b60008060408385031215612adc57600080fd5b50508035926020909101359150565b600060208284031215612afd57600080fd5b8135612a81816129a3565b600060208284031215612b1a57600080fd5b5035919050565b60008060408385031215612b3457600080fd5b8235612b3f8161298e565b915060208301356129df8161298e565b600181811c90821680612b6357607f821691505b602082108103612b8357634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215612b9b57600080fd5b5051919050565b600060208284031215612bb457600080fd5b8151612a81816129a3565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c2957610c29612bbf565b8082028115828204841417610c2957610c29612bbf565b600080600080600060a08688031215612c1757600080fd5b8551612c228161298e565b602087015160408801516060890151608090990151929a91995097965090945092505050565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b600082612ced57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610c2957610c29612bbf565b634e487b7160e01b600052603260045260246000fd5b600060208284031215612d2d57600080fd5b8151612a818161298e565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015612d885784516001600160a01b031683529383019391830191600101612d63565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215612dbe57600080fd5b835192506020840151915060408401519050925092509256fea26469706673582212207d7e0012163e5f0dbc359f410376df2f50b1df42e99a6aa34e286ca8dd3d30c764736f6c63430008120033

Verified Source Code Partial Match

Compiler: v0.8.18+commit.87f61d96 EVM: paris Optimization: Yes (200 runs)
LinqBot.sol 1599 lines
/*
Telegram: https://t.me/LinqBotETH

Website:  https://linqbot.org

Twitter:  https://twitter.com/LinqBot

Bot:      https://t.me/Linq_App_Bot
*/ 

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

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

        return c;
    }

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

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - 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;
    }
}

/**
 * @title SafeMathInt
 * @dev Math operations for int256 with overflow safety checks.
 */
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);
    }
}

/**
 * @title SafeMathUint
 * @dev Math operations with safety checks that revert on error
 */
library SafeMathUint {
  function toInt256Safe(uint256 a) internal pure returns (int256) {
    int256 b = int256(a);
    require(b >= 0);
    return b;
  }
}

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

/**
 * @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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * 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 default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}

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


  /// @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 IPair {
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function token0() external view returns (address);

}

interface IFactory{
        function createPair(address tokenA, address tokenB) external returns (address pair);
        function getPair(address tokenA, address tokenB) external view returns (address pair);
}

interface IUniswapRouter {
    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 swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline) external;
}

contract DividendPayingToken is ERC20, DividendPayingTokenInterface, Ownable {

  using SafeMath for uint256;
  using SafeMathUint for uint256;
  using SafeMathInt for int256;

  address public LP_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;
  uint256 public totalDividendsWithdrawn;

  constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}

  function distributeLPDividends(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);
      totalDividendsWithdrawn += _withdrawableDividend;
      emit DividendWithdrawn(user, _withdrawableDividend);
      bool success = IERC20(LP_Token).transfer(user, _withdrawableDividend);

      if(!success) {
        withdrawnDividends[user] = withdrawnDividends[user].sub(_withdrawableDividend);
        totalDividendsWithdrawn -= _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 _mint(address account, uint256 value) internal override {
    super._mint(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);
      _mint(account, mintAmount);
    } else if(newBalance < currentBalance) {
      uint256 burnAmount = currentBalance.sub(newBalance);
      _burn(account, burnAmount);
    }
  }
}

contract LinqBot is ERC20, Ownable {
    IUniswapRouter public router;
    address public pair;

    bool private swapping;
    bool public swapEnabled = true;
    bool public claimEnabled;
    bool public tradingEnabled;

    LinqBotDividendTracker public dividendTracker;

    address public devWallet;

    uint256 public swapTokensAtAmount;
    uint256 public maxBuyAmount;
    uint256 public maxSellAmount;
    uint256 public maxWallet;

    struct Taxes {
        uint256 liquidity;
        uint256 dev;
    }

    Taxes public buyTaxes = Taxes(10, 10);
    Taxes public sellTaxes = Taxes(10, 10);

    uint256 public totalBuyTax = 20;
    uint256 public totalSellTax = 20;

    mapping(address => bool) public _isBot;

    mapping(address => bool) private _isExcludedFromFees;
    mapping(address => bool) public automatedMarketMakerPairs;
    mapping(address => bool) private _isExcludedFromMaxWallet;

    ///////////////
    //   Events  //
    ///////////////

    event ExcludeFromFees(address indexed account, bool isExcluded);
    event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded);
    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
    event GasForProcessingUpdated(
        uint256 indexed newValue,
        uint256 indexed oldValue
    );
    event SendDividends(uint256 tokensSwapped, uint256 amount);
    event ProcessedDividendTracker(
        uint256 iterations,
        uint256 claims,
        uint256 lastProcessedIndex,
        bool indexed automatic,
        uint256 gas,
        address indexed processor
    );

    constructor(address _developerwallet) ERC20("LinqBot", "LinqB") {
        dividendTracker = new LinqBotDividendTracker();
        setDevWallet(_developerwallet);

        IUniswapRouter _router = IUniswapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
        address _pair = IFactory(_router.factory()).createPair(
            address(this),
            _router.WETH()
        );

        router = _router;
        pair = _pair;
        setSwapTokensAtAmount(200000); 
        updateMaxWalletAmount(1000000);
        setMaxBuyAndSell(500000, 500000);

        _setAutomatedMarketMakerPair(_pair, true);

        dividendTracker.updateLP_Token(pair);

        dividendTracker.excludeFromDividends(address(dividendTracker), true);
        dividendTracker.excludeFromDividends(address(this), true);
        dividendTracker.excludeFromDividends(owner(), true);
        dividendTracker.excludeFromDividends(address(0xdead), true);
        dividendTracker.excludeFromDividends(address(_router), true);

        excludeFromMaxWallet(address(_pair), true);
        excludeFromMaxWallet(address(this), true);
        excludeFromMaxWallet(address(_router), true);

        excludeFromFees(owner(), true);
        excludeFromFees(address(this), true);

        _mint(owner(), 100000000 * (10**18));
    }

    receive() external payable {}

    function updateDividendTracker(address newAddress) public onlyOwner {
        LinqBotDividendTracker newDividendTracker = LinqBotDividendTracker(
            payable(newAddress)
        );
        newDividendTracker.excludeFromDividends(
            address(newDividendTracker),
            true
        );
        newDividendTracker.excludeFromDividends(address(this), true);
        newDividendTracker.excludeFromDividends(owner(), true);
        newDividendTracker.excludeFromDividends(address(router), true);
        dividendTracker = newDividendTracker;
    }

    /// @notice Manual claim the dividends
    function claim() external {
        require(claimEnabled, "Claim not enabled");
        dividendTracker.processAccount(payable(msg.sender));
    }

    function updateMaxWalletAmount(uint256 newNum) public onlyOwner {
        require(newNum >= 1000000, "Cannot set maxWallet lower than 1%");
        maxWallet = newNum * 10**18;
    }

    function setMaxBuyAndSell(uint256 maxBuy, uint256 maxSell)
        public
        onlyOwner
    {
        require(maxBuy >= 500000, "Cannot set maxbuy lower than 0.5% ");
        require(maxSell >= 500000, "Cannot set maxsell lower than 0.5% ");
        maxBuyAmount = maxBuy * 10**18;
        maxSellAmount = maxSell * 10**18;
    }

    function setSwapTokensAtAmount(uint256 amount) public onlyOwner {
        swapTokensAtAmount = amount * 10**18;
    }

    function excludeFromMaxWallet(address account, bool excluded)
        public
        onlyOwner
    {
        _isExcludedFromMaxWallet[account] = excluded;
    }

    /// @notice Withdraw tokens sent by mistake.
    /// @param tokenAddress The address of the token to withdraw
    function rescueETH20Tokens(address tokenAddress) external onlyOwner {
        IERC20(tokenAddress).transfer(
            owner(),
            IERC20(tokenAddress).balanceOf(address(this))
        );
    }

    /// @notice Send remaining ETH to dev
    /// @dev It will send all ETH to dev
    function forceSend() external onlyOwner {
        uint256 ETHbalance = address(this).balance;
        (bool success, ) = payable(devWallet).call{value: ETHbalance}("");
        require(success);
    }

    function trackerRescueETH20Tokens(address tokenAddress) external onlyOwner {
        dividendTracker.trackerRescueETH20Tokens(msg.sender, tokenAddress);
    }

    function updateRouter(address newRouter) external onlyOwner {
        router = IUniswapRouter(newRouter);
    }

    /////////////////////////////////
    // Exclude / Include functions //
    /////////////////////////////////

    function excludeFromFees(address account, bool excluded) public onlyOwner {
        require(
            _isExcludedFromFees[account] != excluded,
            "Account is already the value of 'excluded'"
        );
        _isExcludedFromFees[account] = excluded;

        emit ExcludeFromFees(account, excluded);
    }

    /// @dev "true" to exlcude, "false" to include
    function excludeFromDividends(address account, bool value)
        public
        onlyOwner
    {
        dividendTracker.excludeFromDividends(account, value);
    }

    function setDevWallet(address newWallet) public onlyOwner {
        devWallet = newWallet;
    }

    function setBuyTaxes(uint256 _liquidity, uint256 _dev) external onlyOwner {
        require(_liquidity + _dev <= 20, "Fee must be <= 20%");
        buyTaxes = Taxes(_liquidity, _dev);
        totalBuyTax = _liquidity + _dev;
    }

    function setSellTaxes(uint256 _liquidity, uint256 _dev) external onlyOwner {
        require(_liquidity + _dev <= 20, "Fee must be <= 20%");
        sellTaxes = Taxes(_liquidity, _dev);
        totalSellTax = _liquidity + _dev;
    }

    /// @notice Enable or disable internal swaps
    /// @dev Set "true" to enable internal swaps for liquidity, treasury and dividends
    function setSwapEnabled(bool _enabled) external onlyOwner {
        swapEnabled = _enabled;
    }

    function activateTrading() external onlyOwner {
        require(!tradingEnabled, "Trading already enabled");
        tradingEnabled = true;
    }

    function setClaimEnabled(bool state) external onlyOwner {
        claimEnabled = state;
    }

    /// @param bot The bot address
    /// @param value "true" to blacklist, "false" to unblacklist
    function setBot(address bot, bool value) external onlyOwner {
        require(_isBot[bot] != value);
        _isBot[bot] = value;
    }

    function setLP_Token(address _lpToken) external onlyOwner {
        dividendTracker.updateLP_Token(_lpToken);
    }

    /// @dev Set new pairs created due to listing in new DEX
    function setAutomatedMarketMakerPair(address newPair, bool value)
        external
        onlyOwner
    {
        _setAutomatedMarketMakerPair(newPair, value);
    }

    function _setAutomatedMarketMakerPair(address newPair, bool value) private {
        require(
            automatedMarketMakerPairs[newPair] != value,
            "Automated market maker pair is already set to that value"
        );
        automatedMarketMakerPairs[newPair] = value;

        if (value) {
            dividendTracker.excludeFromDividends(newPair, true);
        }

        emit SetAutomatedMarketMakerPair(newPair, value);
    }

    //////////////////////
    // Getter Functions //
    //////////////////////

    function getTotalDividendsDistributed() external view returns (uint256) {
        return dividendTracker.totalDividendsDistributed();
    }

    function isExcludedFromFees(address account) public view returns (bool) {
        return _isExcludedFromFees[account];
    }

    function withdrawableDividendOf(address account)
        public
        view
        returns (uint256)
    {
        return dividendTracker.withdrawableDividendOf(account);
    }

    function dividendTokenBalanceOf(address account)
        public
        view
        returns (uint256)
    {
        return dividendTracker.balanceOf(account);
    }

    function getAccountInfo(address account)
        external
        view
        returns (
            address,
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        return dividendTracker.getAccount(account);
    }

    ////////////////////////
    // Transfer Functions //
    ////////////////////////

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal override {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        if (
            !_isExcludedFromFees[from] && !_isExcludedFromFees[to] && !swapping
        ) {
            require(tradingEnabled, "Trading not active");
            if (automatedMarketMakerPairs[to]) {
                require(
                    amount <= maxSellAmount,
                    "You are exceeding maxSellAmount"
                );
            } else if (automatedMarketMakerPairs[from])
                require(
                    amount <= maxBuyAmount,
                    "You are exceeding maxBuyAmount"
                );
            if (!_isExcludedFromMaxWallet[to]) {
                require(
                    amount + balanceOf(to) <= maxWallet,
                    "Unable to exceed Max Wallet"
                );
            }
        }

        if (amount == 0) {
            super._transfer(from, to, 0);
            return;
        }

        uint256 contractTokenBalance = balanceOf(address(this));
        bool canSwap = contractTokenBalance >= swapTokensAtAmount;

        if (
            canSwap &&
            !swapping &&
            swapEnabled &&
            automatedMarketMakerPairs[to] &&
            !_isExcludedFromFees[from] &&
            !_isExcludedFromFees[to]
        ) {
            swapping = true;

            if (totalSellTax > 0) {
                swapAndLiquify(swapTokensAtAmount);
            }

            swapping = false;
        }

        bool takeFee = !swapping;

        // if any account belongs to _isExcludedFromFee account then remove the fee
        if (_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
            takeFee = false;
        }

        if (!automatedMarketMakerPairs[to] && !automatedMarketMakerPairs[from])
            takeFee = false;

        if (takeFee) {
            uint256 feeAmt;
            if (automatedMarketMakerPairs[to])
                feeAmt = (amount * totalSellTax) / 100;
            else if (automatedMarketMakerPairs[from])
                feeAmt = (amount * totalBuyTax) / 100;

            amount = amount - feeAmt;
            super._transfer(from, address(this), feeAmt);
        }
        super._transfer(from, to, amount);

        try dividendTracker.setBalance(from, balanceOf(from)) {} catch {}
        try dividendTracker.setBalance(to, balanceOf(to)) {} catch {}
    }

    function swapAndLiquify(uint256 tokens) private {
        uint256 toSwapForLiq = ((tokens * sellTaxes.liquidity) / totalSellTax) / 2;
        uint256 tokensToAddLiquidityWith = ((tokens * sellTaxes.liquidity) / totalSellTa...

// [truncated — 55556 bytes total]

Read Contract

_isBot 0xabb81052 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyTaxes 0x864701a5 → uint256, uint256
claimEnabled 0x2866ed21 → bool
decimals 0x313ce567 → uint8
devWallet 0x8ea5220f → address
dividendTokenBalanceOf 0x6843cd84 → uint256
dividendTracker 0x2c1f5216 → address
getAccountInfo 0x7b510fe8 → address, uint256, uint256, uint256, uint256
getTotalDividendsDistributed 0x30bb4cff → uint256
isExcludedFromFees 0x4fbee193 → bool
maxBuyAmount 0x88e765ff → uint256
maxSellAmount 0x66d602ae → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
pair 0xa8aa1b31 → address
router 0xf887ea40 → address
sellTaxes 0xf66895a3 → uint256, uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalBuyTax 0x46469afb → uint256
totalSellTax 0x1bff7898 → uint256
totalSupply 0x18160ddd → uint256
tradingEnabled 0x4ada218b → bool
withdrawableDividendOf 0xa8b9d240 → uint256

Write Contract 29 functions

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

ManualLiquidityDistribution 0xbdf1436d
uint256 amount
activateTrading 0x0bd05b69
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
claim 0x4e71d92d
No parameters
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromDividends 0x0483f7a0
address account
bool value
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxWallet 0xd2fcc001
address account
bool excluded
forceSend 0x12b77e8a
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
renounceOwnership 0x715018a6
No parameters
rescueETH20Tokens 0x0a78097d
address tokenAddress
setAutomatedMarketMakerPair 0x9a7a23d6
address newPair
bool value
setBot 0x342aa8b5
address bot
bool value
setBuyTaxes 0xaa35822c
uint256 _liquidity
uint256 _dev
setClaimEnabled 0x92929a09
bool state
setDevWallet 0x1f53ac02
address newWallet
setLP_Token 0x2e1ab904
address _lpToken
setMaxBuyAndSell 0x79b447bd
uint256 maxBuy
uint256 maxSell
setSellTaxes 0xa11a1682
uint256 _liquidity
uint256 _dev
setSwapEnabled 0xe01af92c
bool _enabled
setSwapTokensAtAmount 0xafa4f3b2
uint256 amount
trackerRescueETH20Tokens 0x8c9684f9
address tokenAddress
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateDividendTracker 0x88bdd9be
address newAddress
updateMaxWalletAmount 0xc18bc195
uint256 newNum
updateRouter 0xc851cc32
address newRouter

Recent Transactions

No transactions found for this address