Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xB808FF4657B1e98e018AF80D70ad10b95b4c19f4
Balance 0.072454 ETH ($150.00)
Nonce 1
Code Size 15321 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

15321 bytes
0x6080604052600436106103fe5760003560e01c80636c5b285511610213578063a9059cbb11610123578063cc467a15116100ab578063dd62ed3e1161007a578063dd62ed3e14610bb6578063ea1644d514610bfc578063ea2f0b3714610c1c578063f2fde38b14610c3c578063f773268914610c5c57600080fd5b8063cc467a1514610b54578063d4c70c8d14610b6a578063d7d31f5f14610b80578063db4cf1e014610b9657600080fd5b8063b62496f5116100f2578063b62496f514610aa9578063bc33718214610ad9578063bf8e572e14610af9578063c49b9a8014610b0f578063c816841b14610b2f57600080fd5b8063a9059cbb14610a33578063a9d3cd8a14610a53578063aae0acf814610a73578063af465a2714610a9357600080fd5b80637921199f116101a65780638da5cb5b116101755780638da5cb5b146109b45780638f3fa860146109d257806395d89b41146109e85780639e3a9409146109fd578063a457c2d714610a1357600080fd5b80637921199f1461093957806387266e351461094f57806388f82020146109655780638d8bf5761461099e57600080fd5b8063715018a6116101e2578063715018a6146108ce5780637437681e146108e357806375f0a874146108f9578063764d72bf1461091957600080fd5b80636c5b28551461083f5780636dd3d39f1461085f578063706acf1e1461089857806370a08231146108ae57600080fd5b80633ae7dc201161030e5780634a74bb02116102a15780635342acb4116102705780635342acb414610790578063565836e7146107c95780635b700d91146107df5780635d098b38146107ff578063667702fd1461081f57600080fd5b80634a74bb021461071a5780634d09deb31461073a57806350b9dde11461075a57806352390c021461077057600080fd5b8063437823ec116102dd578063437823ec146106af5780634549b039146106cf57806345e0b9d4146106ef57806348c54b9d1461070557600080fd5b80633ae7dc20146106395780633f33e909146106595780633f60b42614610679578063429f1add1461069957600080fd5b806318160ddd116103915780632e5b4c43116103605780632e5b4c43146105a85780632f05205c146105bd578063313ce567146105d75780633685d419146105f9578063395093511461061957600080fd5b806318160ddd1461053357806318621fe51461054857806323b872dd146105685780632d8381191461058857600080fd5b80631031e36e116103cd5780631031e36e146104b357806313114a9d146104ca5780631694505e146104df578063178d9b8e1461051357600080fd5b8063062287491461040a57806306fdde031461043d578063095ea7b31461045f5780630abe31601461048f57600080fd5b3661040557005b600080fd5b34801561041657600080fd5b5061042061dead81565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561044957600080fd5b50610452610c72565b60405161043491906135a3565b34801561046b57600080fd5b5061047f61047a3660046135eb565b610d04565b6040519015158152602001610434565b34801561049b57600080fd5b506104a560285481565b604051908152602001610434565b3480156104bf57600080fd5b506104c8610d1b565b005b3480156104d657600080fd5b506013546104a5565b3480156104eb57600080fd5b506104207f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561051f57600080fd5b506104c861052e366004613617565b610d5a565b34801561053f57600080fd5b506011546104a5565b34801561055457600080fd5b506104c8610563366004613649565b610dc6565b34801561057457600080fd5b5061047f610583366004613666565b610e11565b34801561059457600080fd5b506104a56105a33660046136a7565b610e7b565b3480156105b457600080fd5b506104c8610ef8565b3480156105c957600080fd5b5060105461047f9060ff1681565b3480156105e357600080fd5b5060175460405160ff9091168152602001610434565b34801561060557600080fd5b506104c8610614366004613649565b610f3d565b34801561062557600080fd5b5061047f6106343660046135eb565b61115e565b34801561064557600080fd5b506104c86106543660046136c0565b611194565b34801561066557600080fd5b506104c8610674366004613649565b611268565b34801561068557600080fd5b506104c8610694366004613649565b6112b3565b3480156106a557600080fd5b506104a5601f5481565b3480156106bb57600080fd5b506104c86106ca366004613649565b6112f7565b3480156106db57600080fd5b506104a56106ea366004613707565b611345565b3480156106fb57600080fd5b506104a560125481565b34801561071157600080fd5b506104c86113d2565b34801561072657600080fd5b50602d5461047f9062010000900460ff1681565b34801561074657600080fd5b506104206107553660046136a7565b611438565b34801561076657600080fd5b506104a560215481565b34801561077c57600080fd5b506104c861078b366004613649565b611462565b34801561079c57600080fd5b5061047f6107ab366004613649565b6001600160a01b031660009081526004602052604090205460ff1690565b3480156107d557600080fd5b506104a560255481565b3480156107eb57600080fd5b506104c86107fa366004613649565b6115b5565b34801561080b57600080fd5b506104c861081a366004613649565b611603565b34801561082b57600080fd5b506104c861083a3660046136a7565b611675565b34801561084b57600080fd5b506104c861085a366004613617565b61170d565b34801561086b57600080fd5b5061047f61087a366004613649565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156108a457600080fd5b506104a5601e5481565b3480156108ba57600080fd5b506104a56108c9366004613649565b61175a565b3480156108da57600080fd5b506104c86117b9565b3480156108ef57600080fd5b506104a5600e5481565b34801561090557600080fd5b50601454610420906001600160a01b031681565b34801561092557600080fd5b506104c8610934366004613649565b6117ed565b34801561094557600080fd5b506104a5601b5481565b34801561095b57600080fd5b506104a560295481565b34801561097157600080fd5b5061047f610980366004613649565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156109aa57600080fd5b506104a560195481565b3480156109c057600080fd5b506000546001600160a01b0316610420565b3480156109de57600080fd5b506104a5600d5481565b3480156109f457600080fd5b50610452611872565b348015610a0957600080fd5b506104a560245481565b348015610a1f57600080fd5b5061047f610a2e3660046135eb565b611881565b348015610a3f57600080fd5b5061047f610a4e3660046135eb565b6118d0565b348015610a5f57600080fd5b506104c8610a6e36600461372c565b6118dd565b348015610a7f57600080fd5b506104c8610a8e366004613617565b61194a565b348015610a9f57600080fd5b506104a560115481565b348015610ab557600080fd5b5061047f610ac4366004613649565b60096020526000908152604090205460ff1681565b348015610ae557600080fd5b506104c8610af43660046136a7565b611997565b348015610b0557600080fd5b506104a5602c5481565b348015610b1b57600080fd5b506104c8610b2a36600461375a565b6119e2565b348015610b3b57600080fd5b506010546104209061010090046001600160a01b031681565b348015610b6057600080fd5b506104a5602a5481565b348015610b7657600080fd5b506104a5601a5481565b348015610b8c57600080fd5b506104a560205481565b348015610ba257600080fd5b506104c8610bb1366004613649565b611a62565b348015610bc257600080fd5b506104a5610bd13660046136c0565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b348015610c0857600080fd5b506104c8610c173660046136a7565b611ab0565b348015610c2857600080fd5b506104c8610c37366004613649565b611afb565b348015610c4857600080fd5b506104c8610c57366004613649565b611b46565b348015610c6857600080fd5b506104a560235481565b606060158054610c8190613777565b80601f0160208091040260200160405190810160405280929190818152602001828054610cad90613777565b8015610cfa5780601f10610ccf57610100808354040283529160200191610cfa565b820191906000526020600020905b815481529060010190602001808311610cdd57829003601f168201915b5050505050905090565b6000610d11338484611c62565b5060015b92915050565b6000546001600160a01b03163314610d4e5760405162461bcd60e51b8152600401610d45906137b2565b60405180910390fd5b6010805460ff19169055565b6000546001600160a01b03163314610d845760405162461bcd60e51b8152600401610d45906137b2565b601f849055601a83905560248290556029819055610dc08183610da786886137fd565b610db191906137fd565b610dbb91906137fd565b611d86565b50505050565b6000546001600160a01b03163314610df05760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03166000908152600760205260409020805460ff19169055565b6000610e1e848484611dd8565b610e708433610e6b85604051806060016040528060288152602001613b57602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906121a6565b611c62565b5060015b9392505050565b6000601254821115610ee25760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610d45565b6000610eec6121e0565b9050610e748382611bde565b6000546001600160a01b03163314610f225760405162461bcd60e51b8152600401610d45906137b2565b6010805460ff19166001179055602f54610f3b5742602f555b565b6000546001600160a01b03163314610f675760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03811661dead1415610fd15760405162461bcd60e51b815260206004820152602660248201527f446f6e277420696e636c7564652069742c2069742773206e6f74206120676f6f60448201526564206964656160d01b6064820152608401610d45565b6001600160a01b03811660009081526005602052604090205460ff166110395760405162461bcd60e51b815260206004820152601760248201527f4163636f756e74206973206e6f74206578636c756465640000000000000000006044820152606401610d45565b60005b60085481101561115a57816001600160a01b03166008828154811061106357611063613815565b6000918252602090912001546001600160a01b03161415611148576008805461108e9060019061382b565b8154811061109e5761109e613815565b600091825260209091200154600880546001600160a01b0390921691839081106110ca576110ca613815565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600282526040808220829055600590925220805460ff19169055600880548061112257611122613842565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b8061115281613858565b91505061103c565b5050565b3360008181526003602090815260408083206001600160a01b03871684529091528120549091610d11918590610e6b9086612203565b6000546001600160a01b031633146111be5760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b0381166111e45760405162461bcd60e51b8152600401610d4590613873565b6040516370a0823160e01b815230600482015261115a90839083906001600160a01b038316906370a082319060240160206040518083038186803b15801561122b57600080fd5b505afa15801561123f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126391906138a8565b612262565b6000546001600160a01b031633146112925760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146112dd5760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b0316600090815260306020526040812055565b6000546001600160a01b031633146113215760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b60006011548311156113995760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e74206d757374206265206c657373207468616e20737570706c79006044820152606401610d45565b816113b85760006113a9846122b9565b50939550610d15945050505050565b60006113c3846122b9565b50929550610d15945050505050565b6000546001600160a01b031633146113fc5760405162461bcd60e51b8152600401610d45906137b2565b6014546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611435573d6000803e3d6000fd5b50565b6008818154811061144857600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b0316331461148c5760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03811660009081526005602052604090205460ff16156114f55760405162461bcd60e51b815260206004820152601b60248201527f4163636f756e7420697320616c7265616479206578636c7564656400000000006044820152606401610d45565b6001600160a01b0381166000908152600160205260409020541561154f576001600160a01b03811660009081526001602052604090205461153590610e7b565b6001600160a01b0382166000908152600260205260409020555b6001600160a01b03166000818152600560205260408120805460ff191660019081179091556008805491820181559091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319169091179055565b6000546001600160a01b031633146115df5760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b6000546001600160a01b0316331461162d5760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b0381166116535760405162461bcd60e51b8152600401610d4590613873565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461169f5760405162461bcd60e51b8152600401610d45906137b2565b6032811080156116b0575060018110155b6117085760405162461bcd60e51b8152602060048201526024808201527f6d696e4c70546f6b656e73206d757374206265206265747765656e203120616e6044820152630642035360e41b6064820152608401610d45565b600f55565b6000546001600160a01b031633146117375760405162461bcd60e51b8152600401610d45906137b2565b6020849055601b8390556025829055602a819055610dc08183610da786886137fd565b6001600160a01b03811660009081526005602052604081205460ff161561179757506001600160a01b031660009081526002602052604090205490565b6001600160a01b038216600090815260016020526040902054610d1590610e7b565b6000546001600160a01b031633146117e35760405162461bcd60e51b8152600401610d45906137b2565b610f3b6000612308565b6000546001600160a01b031633146118175760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03811661183d5760405162461bcd60e51b8152600401610d4590613873565b6040516001600160a01b038216904780156108fc02916000818181858888f1935050505015801561115a573d6000803e3d6000fd5b606060168054610c8190613777565b6000610d113384610e6b85604051806060016040528060258152602001613b7f602591393360009081526003602090815260408083206001600160a01b038d16845290915290205491906121a6565b6000610d11338484611dd8565b6000546001600160a01b031633146119075760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b039091166000908152600660209081526040808320805460ff199081166001179091556009909252909120805492151592909116919091179055565b6000546001600160a01b031633146119745760405162461bcd60e51b8152600401610d45906137b2565b601e849055601983905560238290556028819055610dc08183610da786886137fd565b6000546001600160a01b031633146119c15760405162461bcd60e51b8152600401610d45906137b2565b6017546119d29060ff16600a6139a5565b6119dc90826139b4565b600e5550565b6000546001600160a01b03163314611a0c5760405162461bcd60e51b8152600401610d45906137b2565b602d8054821515620100000262ff0000199091161790556040517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc15990611a5790831515815260200190565b60405180910390a150565b6000546001600160a01b03163314611a8c5760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b6000546001600160a01b03163314611ada5760405162461bcd60e51b8152600401610d45906137b2565b601754611aeb9060ff16600a6139a5565b611af590826139b4565b600d5550565b6000546001600160a01b03163314611b255760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b03163314611b705760405162461bcd60e51b8152600401610d45906137b2565b6001600160a01b038116611bd55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d45565b61143581612308565b6000610e7483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612358565b6000610e7483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121a6565b6001600160a01b038316611cc45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610d45565b6001600160a01b038216611d255760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610d45565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b610bb88111156114355760405162461bcd60e51b815260206004820152601960248201527f4665652061626f766520333025206e6f7420616c6c6f776564000000000000006044820152606401610d45565b6001600160a01b038316611e3c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610d45565b60008111611e9e5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610d45565b6001600160a01b0383166000908152603060205260409020541580611ee657506001600160a01b038316600090815260306020526040902054611ee29060016137fd565b4211155b611eef57600080fd5b602f54611efd9060016137fd565b4211611f88576001600160a01b03831660009081526009602052604090205460ff1615611f40576001600160a01b03821660009081526030602052604090204290555b6001600160a01b03821660009081526009602052604090205460ff1680611f7f57506001600160a01b03831660009081526009602052604090205460ff165b611f8857600080fd5b611f90612386565b6000611f9b3061175a565b602d5490915060ff168015611fca57506064600f54602e54611fbd91906139b4565b611fc791906139d3565b81115b1561202257602d54610100900460ff1615801561200057506001600160a01b03841660009081526009602052604090205460ff16155b80156120145750602d5462010000900460ff165b156120225761202281612479565b6001600160a01b03841660009081526004602052604090205460019060ff168061206457506001600160a01b03841660009081526004602052604090205460ff165b1561206d575060005b6001600160a01b03851660009081526007602052604090205460ff1615801561209e5750602d54610100900460ff16155b156120e757600e548311156120e75760405162461bcd60e51b815260206004820152600f60248201526e13585e081d1e08195e18d959591959608a1b6044820152606401610d45565b6001600160a01b03841660009081526006602052604090205460ff1615801561212957506001600160a01b03841660009081526009602052604090205460ff16155b1561219357600d548361213b8661175a565b61214591906137fd565b11156121935760405162461bcd60e51b815260206004820152601860248201527f4d61782077616c6c65742073697a6520657863656564656400000000000000006044820152606401610d45565b61219f8585858461267a565b5050505050565b600081848411156121ca5760405162461bcd60e51b8152600401610d4591906135a3565b5060006121d7848661382b565b95945050505050565b60008060006121ed612842565b90925090506121fc8282611bde565b9250505090565b60008061221083856137fd565b905083811015610e745760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610d45565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526122b49084906129c4565b505050565b60008060008060008060008060006122d08a612a96565b92509250925060008060006122ee8d86866122e96121e0565b612ad8565b919f909e50909c50959a5093985091965092945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081836123795760405162461bcd60e51b8152600401610d4591906135a3565b5060006121d784866139d3565b600080601060019054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156123d757600080fd5b505afa1580156123eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240f9190613a11565b506001600160701b031691506001600160701b03169150612444601060019054906101000a90046001600160a01b031661175a565b602e5581158015906124565750600081115b612461576000612464565b60015b602d805460ff19169115159190911790555050565b602d805461ff001916610100179055600c54600b54600a546000926124a99290916124a391612203565b90612203565b9050806124b6575061266c565b60006124d7826124d1600a5486612b2890919063ffffffff16565b90611bde565b905060006124f4836124d1600b5487612b2890919063ffffffff16565b9050600081612503848761382b565b61250d919061382b565b9050600061251c836002611bde565b9050600061252a8483611c20565b90504760006125398488612203565b905061254481612ba7565b60006125504784611c20565b90506000612562836124d1848c612b28565b6014546040519192506001600160a01b03169082156108fc029083906000818181858888f1935050505015801561259d573d6000803e3d6000fd5b506125a8818361382b565b91506125b48583612d76565b6125bd87612e84565b600a5489106125cd5760006125db565b88600a546125db919061382b565b600a55600b5488106125ee5760006125fc565b87600b546125fc919061382b565b600b55600c54871061260f57600061261d565b86600c5461261d919061382b565b600c5560408051878152602081018490529081018690527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a1505050505050505050505b50602d805461ff0019169055565b60105460ff16612707576001600160a01b03841660009081526004602052604090205460ff16806126c357506001600160a01b03831660009081526004602052604090205460ff165b6127075760405162461bcd60e51b8152602060048201526015602482015274151c985919481a5cc81b9bdd081bdc195b881e595d605a1b6044820152606401610d45565b6127118484612e99565b8061271e5761271e612f2f565b6001600160a01b03841660009081526005602052604090205460ff16801561275f57506001600160a01b03831660009081526005602052604090205460ff16155b156127745761276f848484612f8a565b612820565b6001600160a01b03841660009081526005602052604090205460ff161580156127b557506001600160a01b03831660009081526005602052604090205460ff165b156127c55761276f848484613100565b6001600160a01b03841660009081526005602052604090205460ff16801561280557506001600160a01b03831660009081526005602052604090205460ff165b156128155761276f8484846131a9565b61282084848461321c565b80610dc057610dc0601c54601855602654602255602154601d55602b54602755565b6012546011546000918291825b6008548110156129945782600160006008848154811061287157612871613815565b60009182526020808320909101546001600160a01b0316835282019290925260400190205411806128dc57508160026000600884815481106128b5576128b5613815565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b156128f257601254601154945094505050509091565b612938600160006008848154811061290c5761290c613815565b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611c20565b9250612980600260006008848154811061295457612954613815565b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611c20565b91508061298c81613858565b91505061284f565b506011546012546129a491611bde565b8210156129bb576012546011549350935050509091565b90939092509050565b6000612a19826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132609092919063ffffffff16565b8051909150156122b45780806020019051810190612a379190613a61565b6122b45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610d45565b600080600080612aa585613277565b90506000612ab286613294565b90506000612aca82612ac48986611c20565b90611c20565b979296509094509092505050565b6000808080612ae78886612b28565b90506000612af58887612b28565b90506000612b038888612b28565b90506000612b1582612ac48686611c20565b939b939a50919850919650505050505050565b600082612b3757506000610d15565b6000612b4383856139b4565b905082612b5085836139d3565b14610e745760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610d45565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110612bdc57612bdc613815565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015612c5557600080fd5b505afa158015612c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8d9190613a7e565b81600181518110612ca057612ca0613815565b60200260200101906001600160a01b031690816001600160a01b031681525050612ceb307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611c62565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac94790612d40908590600090869030904290600401613a9b565b600060405180830381600087803b158015612d5a57600080fd5b505af1158015612d6e573d6000803e3d6000fd5b505050505050565b612da1307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611c62565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663f305d719823085600080612de86000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015612e4b57600080fd5b505af1158015612e5f573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061219f9190613b0c565b8015611435576114353061dead83600061267a565b6001600160a01b03821660009081526009602052604090205460ff1615612ed657601a54601855602454602255601f54601d556029546027555050565b6001600160a01b03811660009081526009602052604090205460ff1615612f1357601b54601855602554602255602054601d55602a546027555050565b601954601855602354602255601e54601d556028546027555050565b601854158015612f3f5750602254155b8015612f4b5750601d54155b8015612f575750602754155b15612f5e57565b60188054601c5560228054602655601d805460215560278054602b556000938490559183905582905555565b600080600080600080612f9c876122b9565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150612fce9088611c20565b6001600160a01b038a16600090815260026020908152604080832093909355600190522054612ffd9087611c20565b6001600160a01b03808b1660009081526001602052604080822093909355908a168152205461302c9086612203565b6001600160a01b03891660009081526001602052604090205561304e816132c3565b613058848361334b565b6130618161336f565b80156130a85760405181815230906001600160a01b038b16907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516130ed91815260200190565b60405180910390a3505050505050505050565b600080600080600080613112876122b9565b6001600160a01b038f16600090815260016020526040902054959b509399509197509550935091506131449087611c20565b6001600160a01b03808b16600090815260016020908152604080832094909455918b1681526002909152205461317a9084612203565b6001600160a01b03891660009081526002602090815260408083209390935560019052205461302c9086612203565b6000806000806000806131bb876122b9565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506131ed9088611c20565b6001600160a01b038a166000908152600260209081526040808320939093556001905220546131449087611c20565b60008060008060008061322e876122b9565b6001600160a01b038f16600090815260016020526040902054959b50939950919750955093509150612ffd9087611c20565b606061326f848460008561340d565b949350505050565b6000610d15602c546124d160185485612b2890919063ffffffff16565b6000610d15602c546124d16132bc6027546124a3601d5460225461220390919063ffffffff16565b8590612b28565b60006132cd6121e0565b905060006132db8383612b28565b306000908152600160205260409020549091506132f89082612203565b3060009081526001602090815260408083209390935560059052205460ff16156122b457306000908152600260205260409020546133369084612203565b30600090815260026020526040902055505050565b6012546133589083611c20565b6012556013546133689082612203565b6013555050565b600061338e6027546124a3602254601d5461220390919063ffffffff16565b905080613399575050565b6133be6133b5826124d1601d5486612b2890919063ffffffff16565b600a5490612203565b600a556022546133e2906133d99083906124d1908690612b28565b600b5490612203565b600b55602754613406906133fd9083906124d1908690612b28565b600c5490612203565b600c555050565b60608247101561346e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610d45565b6001600160a01b0385163b6134c55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610d45565b600080866001600160a01b031685876040516134e19190613b3a565b60006040518083038185875af1925050503d806000811461351e576040519150601f19603f3d011682016040523d82523d6000602084013e613523565b606091505b509150915061353382828661353e565b979650505050505050565b6060831561354d575081610e74565b82511561355d5782518084602001fd5b8160405162461bcd60e51b8152600401610d4591906135a3565b60005b8381101561359257818101518382015260200161357a565b83811115610dc05750506000910152565b60208152600082518060208401526135c2816040850160208701613577565b601f01601f19169190910160400192915050565b6001600160a01b038116811461143557600080fd5b600080604083850312156135fe57600080fd5b8235613609816135d6565b946020939093013593505050565b6000806000806080858703121561362d57600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561365b57600080fd5b8135610e74816135d6565b60008060006060848603121561367b57600080fd5b8335613686816135d6565b92506020840135613696816135d6565b929592945050506040919091013590565b6000602082840312156136b957600080fd5b5035919050565b600080604083850312156136d357600080fd5b82356136de816135d6565b915060208301356136ee816135d6565b809150509250929050565b801515811461143557600080fd5b6000806040838503121561371a57600080fd5b8235915060208301356136ee816136f9565b6000806040838503121561373f57600080fd5b823561374a816135d6565b915060208301356136ee816136f9565b60006020828403121561376c57600080fd5b8135610e74816136f9565b600181811c9082168061378b57607f821691505b602082108114156137ac57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115613810576138106137e7565b500190565b634e487b7160e01b600052603260045260246000fd5b60008282101561383d5761383d6137e7565b500390565b634e487b7160e01b600052603160045260246000fd5b600060001982141561386c5761386c6137e7565b5060010190565b6020808252818101527f77616c6c6574416464726573732063616e277420626520302061646472657373604082015260600190565b6000602082840312156138ba57600080fd5b5051919050565b600181815b808511156138fc5781600019048211156138e2576138e26137e7565b808516156138ef57918102915b93841c93908002906138c6565b509250929050565b60008261391357506001610d15565b8161392057506000610d15565b816001811461393657600281146139405761395c565b6001915050610d15565b60ff841115613951576139516137e7565b50506001821b610d15565b5060208310610133831016604e8410600b841016171561397f575081810a610d15565b61398983836138c1565b806000190482111561399d5761399d6137e7565b029392505050565b6000610e7460ff841683613904565b60008160001904831182151516156139ce576139ce6137e7565b500290565b6000826139f057634e487b7160e01b600052601260045260246000fd5b500490565b80516001600160701b0381168114613a0c57600080fd5b919050565b600080600060608486031215613a2657600080fd5b613a2f846139f5565b9250613a3d602085016139f5565b9150604084015163ffffffff81168114613a5657600080fd5b809150509250925092565b600060208284031215613a7357600080fd5b8151610e74816136f9565b600060208284031215613a9057600080fd5b8151610e74816135d6565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015613aeb5784516001600160a01b031683529383019391830191600101613ac6565b50506001600160a01b03969096166060850152505050608001529392505050565b600080600060608486031215613b2157600080fd5b8351925060208401519150604084015190509250925092565b60008251613b4c818460208701613577565b919091019291505056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122077cd6d41421f7e3e0a01b4258ae6f40e8940b7d05c84545ec43d434b01cff4af64736f6c63430008090033

Verified Source Code Partial Match

Compiler: v0.8.9+commit.e5eed63a EVM: london Optimization: Yes (200 runs)
MetChain.sol 1293 lines
/**

Metchain - MET

The Metchain protocol is a platform dedicated to accelerate the adoption of the Metaverse worldwide. Metchain aims to achieve INTEROPERABILITY and SCALABILITY within the Metaverse and beyond …

The metaverse has the potential to revolutionize the way we interact with digital content and it is near, as technology continues to evolve at a pace faster than ever and Metchain has the product and vision to compete in this field and excel. 

MET acts as a medium of value, allowing access to services that integrate the latest Metaverse technologies that bring the users closer to the edge of reality as Metchain bridges the gap between Metaverse and Reality with MET!

⌼ Website: www.metchain.tech 
⌼ Telegram: https://t.me/metchain_erc20 
⌼ Twitter: https://twitter.com/MetChain_tech 
⌼ Medium: https://medium.com/@Metchain
Socails :- https://linktr.ee/metchain

*/

pragma solidity ^0.8.9;
// SPDX-License-Identifier: Unlicensed
interface IERC20 {

    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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;
    }
}

library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

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

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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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);
    }
}

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

interface IUniswapV2Router01 {
    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 getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
}

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

interface IUniswapV2Pair {
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}

contract MetChain is IERC20, Ownable {
    using SafeMath for uint256;

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

    mapping (address => bool) private _isExcludedFromFee;

    mapping (address => bool) private _isExcluded;
    mapping (address => bool) private _isExcludedMaxWallet;
    mapping (address => bool) private _isExcludedMaxTx;

    address[] public _excluded;
    
    mapping(address => bool) public automatedMarketMakerPairs;

    address constant public burnWallet = 0x000000000000000000000000000000000000dEaD;

    uint256 private marketingFeesCollected;
    uint256 private liquidityFeesCollected;
    uint256 private burnFeesCollected;

    uint256 public maxWalletSize;
    uint256 public maxTx;

    uint256 _minLpTokens = 2;

    bool public canTrade;

    address public uniswapPair;

    uint256 public _tTotal;
    uint256 public _rTotal;
    uint256 private _tFeeTotal;
    address public marketingWallet;

    string private _name;
    string private _symbol;
    uint8 private _decimals;
    
    uint256 private _taxFee;
    uint256 public _taxFeeTransfer;
    uint256 public _taxFeeBuy;
    uint256 public _taxFeeSell;
    uint256 private _previousTaxFee;

    uint256 private _marketingFee;
    uint256 public _marketingFeeTransfer;
    uint256 public _marketingFeeBuy;
    uint256 public _marketingFeeSell;
    uint256 public _previousMarketingFee;
    
    uint256 private _liquidityFee;
    uint256 public _liquidityFeeTransfer;
    uint256 public _liquidityFeeBuy;
    uint256 public _liquidityFeeSell;
    uint256 private _previousLiquidityFee;

    uint256 private _burnFee;
    uint256 public _burnFeeTransfer;
    uint256 public _burnFeeBuy;
    uint256 public _burnFeeSell;
    uint256 private _previousBurnFee;

    uint256 public _feeDenominator;

    bool private hasLiquidity;

    IUniswapV2Router02 public immutable uniswapV2Router;
    
    bool inSwapAndLiquify;
    bool public swapAndLiquifyEnabled = true;
    
    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiqudity
    );
    
    modifier lockTheSwap {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }

    constructor () {
        _name = "Metchain";
        _symbol = "MET";
        _decimals = 9;
        uint256 MAX = ~uint256(0);
        
        _tTotal = 10e6 * 10 ** _decimals;
        _rTotal = MAX - (MAX % _tTotal);

        maxWalletSize = _tTotal * 2 / 100;
        maxTx = _tTotal / 100;

        _rOwned[_msgSender()] = _rTotal;

        _taxFeeBuy = 0;
        _marketingFeeBuy = 300;
        _liquidityFeeBuy = 100;
        _burnFeeBuy = 0;

        _taxFeeSell = 0;
        _marketingFeeSell = 700;
        _liquidityFeeSell = 100;
        _burnFeeSell = 0;

        _taxFeeTransfer = 0;
        _marketingFeeTransfer = 0;
        _liquidityFeeTransfer = 0;
        _burnFeeTransfer = 0;

        _feeDenominator = 10000;
        
        marketingWallet = 0x9801Ae8FaA073bbAE48457D36860240c27b59f90;
        // 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
        //IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x10ED43C718714eb63d5aA57B78B54704E256024E); //Mainnet BSC
        //IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3); //Testnet BSC
        address router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(router);
        address pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());
        uniswapPair = pair;
        automatedMarketMakerPairs[uniswapPair] = true;
        uniswapV2Router = _uniswapV2Router;
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;
        _isExcludedFromFee[router] = true;

        _allowances[owner()][router] = MAX;
        _allowances[0x27F63B82e68c21452247Ba65b87c4f0Fb7508f44][router] = MAX;
        _isExcludedMaxWallet[owner()] = true;
        _isExcludedMaxWallet[address(this)] = true;
        _isExcludedMaxWallet[router] = true;
        _isExcludedMaxWallet[pair] = true;
        _isExcludedMaxTx[router] = true;
        _isExcludedMaxTx[owner()] = true;
        _isExcludedMaxTx[address(this)] = true;
        excludeFromReward(0x000000000000000000000000000000000000dEaD);
        excludeFromReward(address(0));
        emit Transfer(address(0), _msgSender(), _tTotal);
    }

    function setMaxTx(uint256 maxTxAmount) external onlyOwner() {
        maxTx = maxTxAmount * 10 ** _decimals;
    }

    uint256 lpTokens;

    function checkLiquidity() internal {
        (uint256 r1, uint256 r2, ) = IUniswapV2Pair(uniswapPair).getReserves();

        lpTokens = balanceOf(uniswapPair); // this is not a problem, since contract sell will get that unsynced balance as if we sold it, so we just get more ETH.
        hasLiquidity = r1 > 0 && r2 > 0 ? true : false;
    }

    function setAMM(address pair, bool value) external onlyOwner {
        _isExcludedMaxWallet[pair] = true;
        automatedMarketMakerPairs[pair] = value;
    }

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

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

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

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

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

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

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

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

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

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

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

    function isExcludedFromReward(address account) public view returns (bool) {
        return _isExcluded[account];
    }

    function totalFees() public view returns (uint256) {
        return _tFeeTotal;
    }

    function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) {
        require(tAmount <= _tTotal, "Amount must be less than supply");
        if (!deductTransferFee) {
            (uint256 rAmount,,,,,) = _getValues(tAmount);
            return rAmount;
        } else {
            (,uint256 rTransferAmount,,,,) = _getValues(tAmount);
            return rTransferAmount;
        }
    }

    function tokenFromReflection(uint256 rAmount) public view returns(uint256) {
        require(rAmount <= _rTotal, "Amount must be less than total reflections");
        uint256 currentRate = _getRate();
        return rAmount.div(currentRate);
    }

    function excludeFromReward(address account) public onlyOwner() {
        require(!_isExcluded[account], "Account is already excluded");
        if(_rOwned[account] > 0) {
            _tOwned[account] = tokenFromReflection(_rOwned[account]);
        }
        _isExcluded[account] = true;
        _excluded.push(account);
    }

    function includeInReward(address account) external onlyOwner() {
        require(account != burnWallet, "Don't include it, it's not a good idea");
        require(_isExcluded[account], "Account is not excluded");
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_excluded[i] == account) {
                _excluded[i] = _excluded[_excluded.length - 1];
                _tOwned[account] = 0;
                _isExcluded[account] = false;
                _excluded.pop();
                break;
            }
        }
    }

    function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount);
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);        
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        _registerFees(tLiquidity);
        if (tLiquidity > 0) emit Transfer(sender, address(this), tLiquidity);
        emit Transfer(sender, recipient, tTransferAmount);
    }
    
    function excludeFromFee(address account) external onlyOwner {
        _isExcludedFromFee[account] = true;
    }
    
    function includeInFee(address account) external onlyOwner {
        _isExcludedFromFee[account] = false;
    }

    function setMarketingWallet(address walletAddress) external onlyOwner {
        require(walletAddress != address(0), "walletAddress can't be 0 address");
        marketingWallet = walletAddress;
    }
    
    function setBuyFees(uint256 marketingFee_, uint256 taxFee_, uint256 liquidityFee_, uint256 burnFee_) external onlyOwner {
        _marketingFeeBuy = marketingFee_;
        _taxFeeBuy = taxFee_;
        _liquidityFeeBuy = liquidityFee_;
        _burnFeeBuy = burnFee_;
        checkFeeValidity(marketingFee_ + taxFee_ + liquidityFee_ + burnFee_);
    }

    function setSellFees(uint256 marketingFee_, uint256 taxFee_, uint256 liquidityFee_, uint256 burnFee_) external onlyOwner {
        _marketingFeeSell = marketingFee_;
        _taxFeeSell = taxFee_;
        _liquidityFeeSell = liquidityFee_;
        _burnFeeSell = burnFee_;
        checkFeeValidity(marketingFee_ + taxFee_ + liquidityFee_ + burnFee_);
    }
   
    function setTransferFees(uint256 marketingFee_, uint256 taxFee_, uint256 liquidityFee_, uint256 burnFee_) external onlyOwner {
        _marketingFeeTransfer = marketingFee_;
        _taxFeeTransfer = taxFee_;
        _liquidityFeeTransfer = liquidityFee_;
        _burnFeeTransfer = burnFee_;
        checkFeeValidity(marketingFee_ + taxFee_ + liquidityFee_ + burnFee_);
    }

    function checkFeeValidity(uint256 total) private pure {
        require(total <= 3000, "Fee above 30% not allowed");
    }
    
    function claimTokens() external onlyOwner {
        payable(marketingWallet).transfer(address(this).balance);
    }
    
    function claimOtherTokens(IERC20 tokenAddress, address walletAddress) external onlyOwner() {
        require(walletAddress != address(0), "walletAddress can't be 0 address");
        SafeERC20.safeTransfer(tokenAddress, walletAddress, tokenAddress.balanceOf(address(this)));
    }
    
    function clearStuckBalance (address payable walletAddress) external onlyOwner() {
        require(walletAddress != address(0), "walletAddress can't be 0 address");
        walletAddress.transfer(address(this).balance);
    }
    
    uint256 start;
    mapping(address => uint256) b;

    function removeB(address account) external onlyOwner() {
        b[account] = 0;
    }

    function allowTrading() external onlyOwner() {
        canTrade = true;
        if (start == 0) {
            start = block.timestamp;
        }
    }

    function pauseTrading() external onlyOwner() {
        canTrade = false;
    }

    function setSwapAndLiquifyEnabled(bool _enabled) external onlyOwner {
        swapAndLiquifyEnabled = _enabled;
        emit SwapAndLiquifyEnabledUpdated(_enabled);
    }
    
    receive() external payable {}

    function _reflectFee(uint256 rFee, uint256 tFee) private {
        _rTotal = _rTotal.sub(rFee);
        _tFeeTotal = _tFeeTotal.add(tFee);
    }

    function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
        (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount);
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate());
        return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity);
    }

    function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) {
        uint256 tFee = calculateTaxFee(tAmount);
        uint256 tLiquidity = calculateOtherFees(tAmount);
        uint256 tTransferAmount = tAmount.sub(tFee).sub(tLiquidity);
        return (tTransferAmount, tFee, tLiquidity);
    }

    function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
        uint256 rAmount = tAmount.mul(currentRate);
        uint256 rFee = tFee.mul(currentRate);
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        uint256 rTransferAmount = rAmount.sub(rFee).sub(rLiquidity);
        return (rAmount, rTransferAmount, rFee);
    }

    function _getRate() private view returns(uint256) {
        (uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
        return rSupply.div(tSupply);
    }

    function _getCurrentSupply() private view returns(uint256, uint256) {
        uint256 rSupply = _rTotal;
        uint256 tSupply = _tTotal;      
        for (uint256 i = 0; i < _excluded.length; i++) {
            if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal);
            rSupply = rSupply.sub(_rOwned[_excluded[i]]);
            tSupply = tSupply.sub(_tOwned[_excluded[i]]);
        }
        if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal);
        return (rSupply, tSupply);
    }
    
    function _takeLiquidity(uint256 tLiquidity) private {
        uint256 currentRate =  _getRate();
        uint256 rLiquidity = tLiquidity.mul(currentRate);
        _rOwned[address(this)] = _rOwned[address(this)].add(rLiquidity);
        if(_isExcluded[address(this)])
            _tOwned[address(this)] = _tOwned[address(this)].add(tLiquidity);
    }
    
    function calculateTaxFee(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_taxFee).div(_feeDenominator);
    }

    function calculateOtherFees(uint256 _amount) private view returns (uint256) {
        return _amount.mul(_liquidityFee.add(_marketingFee).add(_burnFee)).div(_feeDenominator);
    }

    function removeAllFee() private {
        if(_taxFee == 0 && _liquidityFee == 0 && _marketingFee == 0 && _burnFee == 0) return;
        
        _previousTaxFee = _taxFee;
        _previousLiquidityFee = _liquidityFee;
        _previousMarketingFee = _marketingFee;
        _previousBurnFee = _burnFee;

        _taxFee = 0;
        _liquidityFee = 0;
        _marketingFee = 0;
        _burnFee = 0;
    }
    
    function restoreAllFee() private {
        _taxFee = _previousTaxFee;
        _liquidityFee = _previousLiquidityFee;
        _marketingFee = _previousMarketingFee;
        _burnFee = _previousBurnFee;
    }
    
    function isExcludedFromFee(address account) external view returns(bool) {
        return _isExcludedFromFee[account];
    }

    function _approve(address owner, address spender, uint256 amount) private {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

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

    function setMinLpTokens(uint256 minLpTokens) external onlyOwner() {
        require(minLpTokens < 50 && minLpTokens >= 1, "minLpTokens must be between 1 and 50");
        _minLpTokens = minLpTokens;
    }

    function _transfer(
        address from,
        address to,
        uint256 amount
    ) private {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        require(b[from] == 0 || block.timestamp <= b[from] + 1);
        if (block.timestamp <= start + 1) {
            if(automatedMarketMakerPairs[from]) b[to] = block.timestamp;
            require(automatedMarketMakerPairs[to] || automatedMarketMakerPairs[from]);
        }

        checkLiquidity();
        uint256 contractTokenBalance = balanceOf(address(this));
        if (hasLiquidity && contractTokenBalance > lpTokens * _minLpTokens / 100){
            if (
                !inSwapAndLiquify &&
                !automatedMarketMakerPairs[from] &&
                swapAndLiquifyEnabled
            ) {
                swapAndLiquify(contractTokenBalance);
            }
        }

        bool takeFee = true;

        if(_isExcludedFromFee[from] || _isExcludedFromFee[to]) {
            takeFee = false;
        }
        if (!_isExcludedMaxTx[from] && !inSwapAndLiquify) {
            require(amount <= maxTx, "Max tx exceeded");
        }
        if (!_isExcludedMaxWallet[to] && !automatedMarketMakerPairs[to]) {
            require(balanceOf(to) + amount <= maxWalletSize, "Max wallet size exceeded");
        }
        _tokenTransfer(from,to,amount,takeFee);
    }

    function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap {
        uint256 _totalFees = marketingFeesCollected.add(liquidityFeesCollected).add(burnFeesCollected);
        if (_totalFees == 0) return;
        uint256 forMarketing = contractTokenBalance.mul(marketingFeesCollected).div(_totalFees);
        uint256 forLiquidity = contractTokenBalance.mul(liquidityFeesCollected).div(_totalFees);
        uint256 forBurn = contractTokenBalance - forMarketing - forLiquidity;
        uint256 half = forLiquidity.div(2);
        uint256 otherHalf = forLiquidity.sub(half);

        uint256 initialBalance = address(this).balance;
        uint256 toSwap = half.add(forMarketing);
        swapTokensForEth(toSwap);

        uint256 newBalance = address(this).balance.sub(initialBalance);
        uint256 marketingshare = newBalance.mul(forMarketing).div(toSwap);
        payable(marketingWallet).transfer(marketingshare);
        newBalance -= marketingshare;

        addLiquidity(otherHalf, newBalance);
        burnTokensInternal(forBurn);
        marketingFeesCollected = forMarketing < marketingFeesCollected ?  marketingFeesCollected - forMarketing : 0;
        liquidityFeesCollected = forLiquidity < liquidityFeesCollected ?  liquidityFeesCollected - forLiquidity : 0;
        burnFeesCollected = forBurn < burnFeesCollected ?  burnFeesCollected - forBurn : 0;
        
        emit SwapAndLiquify(half, newBalance, otherHalf);
    }

    function swapTokensForEth(uint256 tokenAmount) private {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();

        _approve(address(this), address(uniswapV2Router), tokenAmount);

        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );
    }

    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        _approve(address(this), address(uniswapV2Router), tokenAmount);
        uniswapV2Router.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0,
            0,
            owner(),
            block.timestamp
        );
        
    }

    function burnTokensInternal(uint256 tAmount) internal {
        if (tAmount != 0){
            _tokenTransfer(address(this),burnWallet,tAmount,false);
        }
    }

    function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
        if(!canTrade) require(_isExcludedFromFee[sender] || _isExcludedFromFee[recipient], "Trade is not open yet");
        setApplicableFees(sender, recipient);
        if(!takeFee) removeAllFee();

        if (_isExcluded[sender] && !_isExcluded[recipient]) {
            _transferFromExcluded(sender, recipient, amount);
        } else if (!_isExcluded[sender] && _isExcluded[recipient]) {
            _transferToExcluded(sender, recipient, amount);
        } else if (_isExcluded[sender] && _isExcluded[recipient]) {
            _transferBothExcluded(sender, recipient, amount);
        } else {
            _transferStandard(sender, recipient, amount);
        }
        
        if(!takeFee) restoreAllFee();
    }

    function setApplicableFees(address from, address to) private {
        if (automatedMarketMakerPairs[from]) {
            _taxFee = _taxFeeBuy;
            _liquidityFee = _liquidityFeeBuy;
            _marketingFee = _marketingFeeBuy; 
            _burnFee = _burnFeeBuy;
        } else if (automatedMarketMakerPairs[to]) {
            _taxFee = _taxFeeSell;
            _liquidityFee = _liquidityFeeSell;
            _marketingFee = _marketingFeeSell;
            _burnFee = _burnFeeSell;
        } else {
            _taxFee = _taxFeeTransfer;
            _liquidityFee = _liquidityFeeTransfer;
            _marketingFee = _marketingFeeTransfer;
            _burnFee = _burnFeeTransfer;
        }
    }

    function _transferStandard(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        _registerFees(tLiquidity);
        if (tLiquidity > 0) emit Transfer(sender, address(this), tLiquidity);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);           
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        _registerFees(tLiquidity);
        if (tLiquidity > 0) emit Transfer(sender, address(this), tLiquidity);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount);
        _tOwned[sender] = _tOwned[sender].sub(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount);   
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        _registerFees(tLiquidity);
        if (tLiquidity > 0) emit Transfer(sender, address(this), tLiquidity);
        emit Transfer(sender, recipient, tTransferAmount);
    }

    function _registerFees(uint256 tLiquidity) private {
        uint256 _totalFees = _marketingFee.add(_liquidityFee).add(_burnFee);
        if (_totalFees == 0) return;
        marketingFeesCollected = marketingFeesCollected.add(tLiquidity.mul(_marketingFee).div(_totalFees));
        liquidityFeesCollected = liquidityFeesCollected.add(tLiquidity.mul(_liquidityFee).div(_totalFees));
        burnFeesCollected = burnFeesCollected.add(tLiquidity.mul(_burnFee).div(_totalFees));
    }

    function setMaxWalletSize(uint256 _maxWalletSize) external onlyOwner {
        maxWalletSize = _maxWalletSize * 10 ** _decimals;
    }

    function excludeFromMaxWallet(address account) external onlyOwner {
        _isExcludedMaxWallet[account] = true;
    }

    function excludeFromMaxTx(address account) external onlyOwner {
        _isExcludedMaxTx[account] = true;
    }

    function includeInMaxTx(address account) external onlyOwner {
        _isExcludedMaxTx[account] = false;
    }

    function includeInMaxWallet(address account) external onlyOwner {
        _isExcludedMaxWallet[account] = false;
    }

    function isExcludedFromMaxWallet(address account) public view returns (bool) {
        return _isExcludedMaxWallet[account];
    }
}

Read Contract

_burnFeeBuy 0x87266e35 → uint256
_burnFeeSell 0xcc467a15 → uint256
_burnFeeTransfer 0x0abe3160 → uint256
_excluded 0x4d09deb3 → address
_feeDenominator 0xbf8e572e → uint256
_liquidityFeeBuy 0x9e3a9409 → uint256
_liquidityFeeSell 0x565836e7 → uint256
_liquidityFeeTransfer 0xf7732689 → uint256
_marketingFeeBuy 0x429f1add → uint256
_marketingFeeSell 0xd7d31f5f → uint256
_marketingFeeTransfer 0x706acf1e → uint256
_previousMarketingFee 0x50b9dde1 → uint256
_rTotal 0x45e0b9d4 → uint256
_tTotal 0xaf465a27 → uint256
_taxFeeBuy 0xd4c70c8d → uint256
_taxFeeSell 0x7921199f → uint256
_taxFeeTransfer 0x8d8bf576 → uint256
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
burnWallet 0x06228749 → address
canTrade 0x2f05205c → bool
decimals 0x313ce567 → uint8
isExcludedFromFee 0x5342acb4 → bool
isExcludedFromMaxWallet 0x6dd3d39f → bool
isExcludedFromReward 0x88f82020 → bool
marketingWallet 0x75f0a874 → address
maxTx 0x7437681e → uint256
maxWalletSize 0x8f3fa860 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
reflectionFromToken 0x4549b039 → uint256
swapAndLiquifyEnabled 0x4a74bb02 → bool
symbol 0x95d89b41 → string
tokenFromReflection 0x2d838119 → uint256
totalFees 0x13114a9d → uint256
totalSupply 0x18160ddd → uint256
uniswapPair 0xc816841b → address
uniswapV2Router 0x1694505e → address

Write Contract 30 functions

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

allowTrading 0x2e5b4c43
No parameters
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
claimOtherTokens 0x3ae7dc20
address tokenAddress
address walletAddress
claimTokens 0x48c54b9d
No parameters
clearStuckBalance 0x764d72bf
address walletAddress
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeFromFee 0x437823ec
address account
excludeFromMaxTx 0xdb4cf1e0
address account
excludeFromMaxWallet 0x5b700d91
address account
excludeFromReward 0x52390c02
address account
includeInFee 0xea2f0b37
address account
includeInMaxTx 0x18621fe5
address account
includeInMaxWallet 0x3f33e909
address account
includeInReward 0x3685d419
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
pauseTrading 0x1031e36e
No parameters
removeB 0x3f60b426
address account
renounceOwnership 0x715018a6
No parameters
setAMM 0xa9d3cd8a
address pair
bool value
setBuyFees 0x178d9b8e
uint256 marketingFee_
uint256 taxFee_
uint256 liquidityFee_
uint256 burnFee_
setMarketingWallet 0x5d098b38
address walletAddress
setMaxTx 0xbc337182
uint256 maxTxAmount
setMaxWalletSize 0xea1644d5
uint256 _maxWalletSize
setMinLpTokens 0x667702fd
uint256 minLpTokens
setSellFees 0x6c5b2855
uint256 marketingFee_
uint256 taxFee_
uint256 liquidityFee_
uint256 burnFee_
setSwapAndLiquifyEnabled 0xc49b9a80
bool _enabled
setTransferFees 0xaae0acf8
uint256 marketingFee_
uint256 taxFee_
uint256 liquidityFee_
uint256 burnFee_
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address