Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xe3451FD6c9f259fdB065834C719f40b64DCa09F0
Balance 0 ETH
Nonce 1
Code Size 16782 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

16782 bytes
0x6080604052600436106103f35760003560e01c80638366e79a11610208578063c3cda52011610118578063e884f260116100ab578063f11a24d31161007a578063f11a24d314610c6d578063f2fde38b14610c83578063f5648a4f14610ca3578063f637434214610cb8578063fb002c9714610cce57600080fd5b8063e884f26014610bc0578063ea4cfe1214610bd5578063ee40166e14610bf5578063f1127ed814610c0b57600080fd5b8063dc3f0d0f116100e7578063dc3f0d0f14610b10578063dd62ed3e14610b30578063e2f4560514610b76578063e7a324dc14610b8c57600080fd5b8063c3cda52014610aa0578063c876d0b914610ac0578063d257b34f14610ada578063d85ba06314610afa57600080fd5b8063a1dc92bc1161019b578063b4b5ea571161016a578063b4b5ea57146109f1578063b62496f514610a11578063bbc0c74214610a41578063c024666814610a60578063c17b5b8c14610a8057600080fd5b8063a1dc92bc1461097b578063a457c2d714610991578063a9059cbb146109b1578063afcf2fc4146109d157600080fd5b80638da5cb5b116101d75780638da5cb5b146108f357806395d89b41146109265780639a7a23d61461093b578063a0712d681461095b57600080fd5b80638366e79a146108bd57806388e765ff146108dd578063893d20e8146108f35780638a8c523c1461091157600080fd5b8063499b8394116103035780636ddd171311610296578063751039fc11610265578063751039fc1461081b5780637571336a14610830578063782d6fe1146108505780637ecebe00146108705780638095d5641461089d57600080fd5b80636ddd1713146107685780636fcfff451461078857806370a08231146107d0578063715018a61461080657600080fd5b80635a139dd4116102d25780635a139dd4146107065780635c19a95c1461071c57806366d602ae1461073c5780636a486a8e1461075257600080fd5b8063499b83941461067d5780634a62bb651461069d5780634f77f6c0146106b7578063587cde1e146106cd57600080fd5b80631fc851bd116103865780632be32b61116103555780632be32b61146105d1578063313ce567146105f1578063395093511461061357806344249f0414610633578063452ed4f11461064957600080fd5b80631fc851bd1461054757806320606b701461055d5780632307b4411461059157806323b872dd146105b157600080fd5b80630d7f1441116103c25780630d7f1441146104c857806310d5de53146104ec57806318160ddd1461051c5780631a8145bb1461053157600080fd5b806306fdde03146103ff5780630758d9241461042a578063095ea7b3146104765780630c9be46d146104a657600080fd5b366103fa57005b600080fd5b34801561040b57600080fd5b50610414610ce4565b60405161042191906139fa565b60405180910390f35b34801561043657600080fd5b5061045e7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b039091168152602001610421565b34801561048257600080fd5b50610496610491366004613a64565b610d76565b6040519015158152602001610421565b3480156104b257600080fd5b506104c66104c1366004613a90565b610d8d565b005b3480156104d457600080fd5b506104de60195481565b604051908152602001610421565b3480156104f857600080fd5b50610496610507366004613a90565b601e6020526000908152604090205460ff1681565b34801561052857600080fd5b506003546104de565b34801561053d57600080fd5b506104de601b5481565b34801561055357600080fd5b506104de600f5481565b34801561056957600080fd5b506104de7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b34801561059d57600080fd5b506104966105ac366004613b83565b610e30565b3480156105bd57600080fd5b506104966105cc366004613c45565b61100c565b3480156105dd57600080fd5b506104c66105ec366004613c86565b61106b565b3480156105fd57600080fd5b5060065460405160ff9091168152602001610421565b34801561061f57600080fd5b5061049661062e366004613a64565b611178565b34801561063f57600080fd5b506104de601c5481565b34801561065557600080fd5b5061045e7f0000000000000000000000003a0cb47dbea6c4baed196dc07381c2e6749729cb81565b34801561068957600080fd5b506104c6610698366004613a90565b6111ae565b3480156106a957600080fd5b50600d546104969060ff1681565b3480156106c357600080fd5b506104de60175481565b3480156106d957600080fd5b5061045e6106e8366004613a90565b6001600160a01b039081166000908152600760205260409020541690565b34801561071257600080fd5b506104de60135481565b34801561072857600080fd5b506104c6610737366004613a90565b611277565b34801561074857600080fd5b506104de60095481565b34801561075e57600080fd5b506104de60165481565b34801561077457600080fd5b50600d546104969062010000900460ff1681565b34801561079457600080fd5b506107bb6107a3366004613a90565b60216020526000908152604090205463ffffffff1681565b60405163ffffffff9091168152602001610421565b3480156107dc57600080fd5b506104de6107eb366004613a90565b6001600160a01b031660009081526001602052604090205490565b34801561081257600080fd5b506104c6611284565b34801561082757600080fd5b506104c66112f8565b34801561083c57600080fd5b506104c661084b366004613cad565b611339565b34801561085c57600080fd5b506104de61086b366004613a64565b611425565b34801561087c57600080fd5b506104de61088b366004613a90565b60226020526000908152604090205481565b3480156108a957600080fd5b506104c66108b8366004613ce6565b611683565b3480156108c957600080fd5b506104966108d8366004613d12565b61172b565b3480156108e957600080fd5b506104de60085481565b3480156108ff57600080fd5b506000546001600160a01b031661045e565b34801561091d57600080fd5b506104c6611933565b34801561093257600080fd5b506104146119f5565b34801561094757600080fd5b506104c6610956366004613cad565b611a04565b34801561096757600080fd5b50610496610976366004613c86565b611ae4565b34801561098757600080fd5b506104de60155481565b34801561099d57600080fd5b506104966109ac366004613a64565b611b21565b3480156109bd57600080fd5b506104966109cc366004613a64565b611b70565b3480156109dd57600080fd5b50600b5461045e906001600160a01b031681565b3480156109fd57600080fd5b506104de610a0c366004613a90565b611b7d565b348015610a1d57600080fd5b50610496610a2c366004613a90565b601f6020526000908152604090205460ff1681565b348015610a4d57600080fd5b50600d5461049690610100900460ff1681565b348015610a6c57600080fd5b506104c6610a7b366004613cad565b611bf1565b348015610a8c57600080fd5b506104c6610a9b366004613ce6565b611c7a565b348015610aac57600080fd5b506104c6610abb366004613d40565b611d1d565b348015610acc57600080fd5b506011546104969060ff1681565b348015610ae657600080fd5b506104c6610af5366004613c86565b611fee565b348015610b0657600080fd5b506104de60125481565b348015610b1c57600080fd5b506104c6610b2b366004613c86565b612139565b348015610b3c57600080fd5b506104de610b4b366004613d12565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b348015610b8257600080fd5b506104de600c5481565b348015610b9857600080fd5b506104de7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b348015610bcc57600080fd5b506104c6612240565b348015610be157600080fd5b50600a5461045e906001600160a01b031681565b348015610c0157600080fd5b506104de600e5481565b348015610c1757600080fd5b50610c51610c26366004613da2565b6020808052600092835260408084209091529082529020805460019091015463ffffffff9091169082565b6040805163ffffffff9093168352602083019190915201610421565b348015610c7957600080fd5b506104de60145481565b348015610c8f57600080fd5b506104c6610c9e366004613a90565b612276565b348015610caf57600080fd5b506104c66122a9565b348015610cc457600080fd5b506104de60185481565b348015610cda57600080fd5b506104de601a5481565b606060048054610cf390613dd9565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1f90613dd9565b8015610d6c5780601f10610d4157610100808354040283529160200191610d6c565b820191906000526020600020905b815481529060010190602001808311610d4f57829003601f168201915b5050505050905090565b6000610d8333848461237f565b5060015b92915050565b6000546001600160a01b03163314610dc05760405162461bcd60e51b8152600401610db790613e14565b60405180910390fd5b6001600160a01b038116610de65760405162461bcd60e51b8152600401610db790613e49565b600b80546001600160a01b0319166001600160a01b0383169081179091556040517fff6a822e9e2c4fe74d4f27fcde00b94c5abb41dd24b73e718952279715fa663290600090a250565b600080546001600160a01b03163314610e5b5760405162461bcd60e51b8152600401610db790613e14565b600d54610100900460ff1615610ed95760405162461bcd60e51b815260206004820152603760248201527f54726164696e6720697320616c7265616479206163746976652c2063616e6e6f60448201527f742061697264726f70206166746572206c61756e63682e0000000000000000006064820152608401610db7565b8151835114610f2a5760405162461bcd60e51b815260206004820152601e60248201527f617272617973206d757374206265207468652073616d65206c656e67746800006044820152606401610db7565b60c8835110610f9a5760405162461bcd60e51b815260206004820152603660248201527f43616e206f6e6c792061697264726f70203230302077616c6c657473207065726044820152752074786e2064756520746f20676173206c696d69747360501b6064820152608401610db7565b60005b8351811015611002576000848281518110610fba57610fba613e8f565b602002602001015190506000848381518110610fd857610fd8613e8f565b60200260200101519050610fed3383836124a4565b50508080610ffa90613ebb565b915050610f9d565b5060019392505050565b600061101984848461262a565b6110028433611066856040518060600160405280602881526020016140b1602891396001600160a01b038a1660009081526002602090815260408083203384529091529020549190612f06565b61237f565b6000546001600160a01b031633146110955760405162461bcd60e51b8152600401610db790613e14565b670de0b6b3a76400006103e86110aa60035490565b6110b5906001613ed6565b6110bf9190613f0b565b6110c99190613f0b565b81101561112a5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f7420736574206d61782062757920616d6f756e74206c6f776572206044820152687468616e20302e312560b81b6064820152608401610db7565b61113c81670de0b6b3a7640000613ed6565b60088190556040519081527ffcc0366804aaa8dbf88a2924100c733b70dec8445957a5d5f8ff92898de41009906020015b60405180910390a150565b3360008181526002602090815260408083206001600160a01b03871684529091528120549091610d839185906110669086612320565b6000546001600160a01b031633146111d85760405162461bcd60e51b8152600401610db790613e14565b6001600160a01b0381166111fe5760405162461bcd60e51b8152600401610db790613e49565b600a80546001600160a01b039081166000908152601d6020526040808220805460ff1990811690915584546001600160a01b0319169386169384179094558282528082208054909416600117909355915190917f4efa56652237561d0f1fd31311aeaaa41f3b754a461545ed3cf6ced5876d298291a250565b6112813382612f40565b50565b6000546001600160a01b031633146112ae5760405162461bcd60e51b8152600401610db790613e14565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146113225760405162461bcd60e51b8152600401610db790613e14565b600d805460ff191690556011805461ffff19169055565b6000546001600160a01b031633146113635760405162461bcd60e51b8152600401610db790613e14565b806113fa577f0000000000000000000000003a0cb47dbea6c4baed196dc07381c2e6749729cb6001600160a01b0316826001600160a01b031614156113fa5760405162461bcd60e51b815260206004820152602760248201527f43616e6e6f742072656d6f766520756e697377617020706169722066726f6d2060448201526636b0bc103a3c3760c91b6064820152608401610db7565b6001600160a01b03919091166000908152601e60205260409020805460ff1916911515919091179055565b60004382106114875760405162461bcd60e51b815260206004820152602860248201527f504541524c3a3a6765745072696f72566f7465733a206e6f74207965742064656044820152671d195c9b5a5b995960c21b6064820152608401610db7565b6001600160a01b03831660009081526021602052604090205463ffffffff16806114b5576000915050610d87565b6001600160a01b0384166000908152602080526040812084916114d9600185613f1f565b63ffffffff90811682526020820192909252604001600020541611611541576001600160a01b038416600090815260208052604081209061151b600184613f1f565b63ffffffff1663ffffffff16815260200190815260200160002060010154915050610d87565b6001600160a01b03841660009081526020808052604080832083805290915290205463ffffffff1683101561157a576000915050610d87565b600080611588600184613f1f565b90505b8163ffffffff168163ffffffff16111561164e57600060026115ad8484613f1f565b6115b79190613f44565b6115c19083613f1f565b6001600160a01b03881660009081526020808052604080832063ffffffff808616855290835292819020815180830190925280549093168082526001909301549181019190915291925087141561162257602001519450610d879350505050565b805163ffffffff1687111561163957819350611647565b611644600183613f1f565b92505b505061158b565b506001600160a01b03851660009081526020808052604080832063ffffffff9094168352929052206001015491505092915050565b6000546001600160a01b031633146116ad5760405162461bcd60e51b8152600401610db790613e14565b601383905560148290556015819055806116c78385613f67565b6116d19190613f67565b6012819055600a10156117265760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420313025206f72206c6573730000006044820152606401610db7565b505050565b600080546001600160a01b031633146117565760405162461bcd60e51b8152600401610db790613e14565b6001600160a01b0383166117ac5760405162461bcd60e51b815260206004820152601a60248201527f5f746f6b656e20616464726573732063616e6e6f7420626520300000000000006044820152606401610db7565b6001600160a01b0383163014156118055760405162461bcd60e51b815260206004820152601c60248201527f43616e2774207769746864726177206e617469766520746f6b656e73000000006044820152606401610db7565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa15801561184c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118709190613f7f565b60405163a9059cbb60e01b81526001600160a01b038581166004830152602482018390529192509085169063a9059cbb906044016020604051808303816000875af11580156118c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e79190613f98565b604080516001600160a01b0387168152602081018490529193507fdeda980967fcead7b61e78ac46a4da14274af29e894d4d61e8b81ec38ab3e438910160405180910390a15092915050565b6000546001600160a01b0316331461195d5760405162461bcd60e51b8152600401610db790613e14565b600d54610100900460ff16156119b55760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207265656e61626c652074726164696e670000000000000000006044820152606401610db7565b600d805462ffff0019166201010017905543600e556040517fa56feb2d31b9a7424db0be063fd450863979c9e2382cf5110f869bd1ad361bb790600090a1565b606060058054610cf390613dd9565b6000546001600160a01b03163314611a2e5760405162461bcd60e51b8152600401610db790613e14565b7f0000000000000000000000003a0cb47dbea6c4baed196dc07381c2e6749729cb6001600160a01b0316826001600160a01b03161415611ad65760405162461bcd60e51b815260206004820152603960248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201527f6175746f6d617465644d61726b65744d616b65725061697273000000000000006064820152608401610db7565b611ae08282612fba565b5050565b600080546001600160a01b03163314611b0f5760405162461bcd60e51b8152600401610db790613e14565b611b193383613024565b506001919050565b6000610d83338461106685604051806060016040528060258152602001614134602591393360009081526002602090815260408083206001600160a01b038d1684529091529020549190612f06565b6000610d8333848461262a565b6001600160a01b03811660009081526021602052604081205463ffffffff1680611ba8576000611bea565b6001600160a01b0383166000908152602080526040812090611bcb600184613f1f565b63ffffffff1663ffffffff168152602001908152602001600020600101545b9392505050565b6000546001600160a01b03163314611c1b5760405162461bcd60e51b8152600401610db790613e14565b6001600160a01b0382166000818152601d6020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6000546001600160a01b03163314611ca45760405162461bcd60e51b8152600401610db790613e14565b60178390556018829055601981905580611cbe8385613f67565b611cc89190613f67565b6016819055601410156117265760405162461bcd60e51b815260206004820152601d60248201527f4d757374206b656570206665657320617420323025206f72206c6573730000006044820152606401610db7565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866611d48610ce4565b80519060200120611d564690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a90528251808503909101815261014084019092528151919093012061190160f01b610160830152610162820183905261018282018190529192506000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa158015611e82573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ef55760405162461bcd60e51b815260206004820152602760248201527f504541524c3a3a64656c656761746542795369673a20696e76616c6964207369604482015266676e617475726560c81b6064820152608401610db7565b6001600160a01b0381166000908152602260205260408120805491611f1983613ebb565b919050558914611f775760405162461bcd60e51b815260206004820152602360248201527f504541524c3a3a64656c656761746542795369673a20696e76616c6964206e6f6044820152626e636560e81b6064820152608401610db7565b87421115611fd75760405162461bcd60e51b815260206004820152602760248201527f504541524c3a3a64656c656761746542795369673a207369676e617475726520604482015266195e1c1a5c995960ca1b6064820152608401610db7565b611fe1818b612f40565b505050505b505050505050565b6000546001600160a01b031633146120185760405162461bcd60e51b8152600401610db790613e14565b620186a061202560035490565b612030906001613ed6565b61203a9190613f0b565b8110156120a75760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b6064820152608401610db7565b6103e86120b360035490565b6120be906001613ed6565b6120c89190613f0b565b8111156121345760405162461bcd60e51b815260206004820152603460248201527f5377617020616d6f756e742063616e6e6f742062652068696768657220746861604482015273371018171892903a37ba30b61039bab838363c9760611b6064820152608401610db7565b600c55565b6000546001600160a01b031633146121635760405162461bcd60e51b8152600401610db790613e14565b670de0b6b3a76400006103e861217860035490565b612183906001613ed6565b61218d9190613f0b565b6121979190613f0b565b8110156121f95760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420736574206d61782073656c6c20616d6f756e74206c6f776572604482015269207468616e20302e312560b01b6064820152608401610db7565b61220b81670de0b6b3a7640000613ed6565b60098190556040519081527f53c4eb831d8cfeb750f1c62590d8cd30f4c6f0380d29a05caa09f0d92588560e9060200161116d565b6000546001600160a01b0316331461226a5760405162461bcd60e51b8152600401610db790613e14565b6011805460ff19169055565b6000546001600160a01b031633146122a05760405162461bcd60e51b8152600401610db790613e14565b6112818161310a565b6000546001600160a01b031633146122d35760405162461bcd60e51b8152600401610db790613e14565b604051600090339047908381818185875af1925050503d8060008114612315576040519150601f19603f3d011682016040523d82523d6000602084013e61231a565b606091505b50505050565b60008061232d8385613f67565b905083811015611bea5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610db7565b6001600160a01b0383166123e15760405162461bcd60e51b8152602060048201526024808201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610db7565b6001600160a01b0382166124425760405162461bcd60e51b815260206004820152602260248201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610db7565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166125085760405162461bcd60e51b815260206004820152602560248201527f42455032303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610db7565b6001600160a01b03821661256a5760405162461bcd60e51b815260206004820152602360248201527f42455032303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610db7565b6125a78160405180606001604052806026815260200161410e602691396001600160a01b0386166000908152600160205260409020549190612f06565b6001600160a01b0380851660009081526001602052604080822093909355908416815220546125d69082612320565b6001600160a01b0380841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906124979085815260200190565b6001600160a01b03831661268e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610db7565b6001600160a01b0382166126f05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610db7565b8061270157611726838360006124a4565b600d5460ff1615612b0a576000546001600160a01b0384811691161480159061273857506000546001600160a01b03838116911614155b801561274c57506001600160a01b03821615155b801561276357506001600160a01b03821661dead14155b15612b0a57600d54610100900460ff166127fb576001600160a01b0383166000908152601e602052604090205460ff16806127b657506001600160a01b0382166000908152601e602052604090205460ff165b6127fb5760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b6044820152606401610db7565b601154610100900460ff16801561282a57506001600160a01b0383166000908152601f602052604090205460ff165b1561288457645d21dba0003a11156128845760405162461bcd60e51b815260206004820152601860248201527f4761732070726963652065786365656473206c696d69742e00000000000000006044820152606401610db7565b60115460ff16156129b1577f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b03161415801561290357507f0000000000000000000000003a0cb47dbea6c4baed196dc07381c2e6749729cb6001600160a01b0316826001600160a01b031614155b156129b15732600090815260106020526040902054431161299e5760405162461bcd60e51b815260206004820152604960248201527f5f7472616e736665723a3a205472616e736665722044656c617920656e61626c60448201527f65642e20204f6e6c79206f6e652070757263686173652070657220626c6f636b6064820152681030b63637bbb2b21760b91b608482015260a401610db7565b3260009081526010602052604090204390555b6001600160a01b0383166000908152601f602052604090205460ff1680156129f257506001600160a01b0382166000908152601e602052604090205460ff16155b15612a5f57600854811115612a5a5760405162461bcd60e51b815260206004820152602860248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201526736b0bc10313abc9760c11b6064820152608401610db7565b612b0a565b6001600160a01b0382166000908152601f602052604090205460ff168015612aa057506001600160a01b0383166000908152601e602052604090205460ff16155b15612b0a57600954811115612b0a5760405162461bcd60e51b815260206004820152602a60248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152691036b0bc1039b2b6361760b11b6064820152608401610db7565b30600090815260016020526040902054600c5481108015908190612b365750600d5462010000900460ff165b8015612b4c5750600b54600160a01b900460ff16155b8015612b7157506001600160a01b0385166000908152601f602052604090205460ff16155b8015612b9657506001600160a01b0385166000908152601d602052604090205460ff16155b8015612bbb57506001600160a01b0384166000908152601d602052604090205460ff16155b15612be957600b805460ff60a01b1916600160a01b179055612bdb6131ca565b600b805460ff60a01b191690555b6001600160a01b0385166000908152601d602052604090205460019060ff1680612c2b57506001600160a01b0385166000908152601d602052604090205460ff165b15612c34575060005b60008115612ef257600e5443148015612c6557506001600160a01b0387166000908152601f602052604090205460ff165b15612d15576064612c7786605f613ed6565b612c819190613f0b565b905060165460185482612c949190613ed6565b612c9e9190613f0b565b601b6000828254612caf9190613f67565b9091555050601654601754612cc49083613ed6565b612cce9190613f0b565b601a6000828254612cdf9190613f67565b9091555050601654601954612cf49083613ed6565b612cfe9190613f0b565b601c6000828254612d0f9190613f67565b90915550505b6001600160a01b0386166000908152601f602052604090205460ff168015612d3f57506000601654115b15612df757606460165486612d549190613ed6565b612d5e9190613f0b565b905060165460185482612d719190613ed6565b612d7b9190613f0b565b601b6000828254612d8c9190613f67565b9091555050601654601754612da19083613ed6565b612dab9190613f0b565b601a6000828254612dbc9190613f67565b9091555050601654601954612dd19083613ed6565b612ddb9190613f0b565b601c6000828254612dec9190613f67565b90915550612ed49050565b6001600160a01b0387166000908152601f602052604090205460ff168015612e2157506000601254115b15612ed457606460125486612e369190613ed6565b612e409190613f0b565b905060125460145482612e539190613ed6565b612e5d9190613f0b565b601b6000828254612e6e9190613f67565b9091555050601254601354612e839083613ed6565b612e8d9190613f0b565b601a6000828254612e9e9190613f67565b9091555050601254601554612eb39083613ed6565b612ebd9190613f0b565b601c6000828254612ece9190613f67565b90915550505b8015612ee557612ee58730836124a4565b612eef8186613fb5565b94505b612efd8787876124a4565b50505050505050565b60008184841115612f2a5760405162461bcd60e51b8152600401610db791906139fa565b506000612f378486613fb5565b95945050505050565b6001600160a01b03828116600081815260076020818152604080842080546001845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461231a8284836133d2565b6001600160a01b0382166000908152601f60205260409020805460ff1916821515179055612fe8828261352f565b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6001600160a01b03821661307a5760405162461bcd60e51b815260206004820152601f60248201527f42455032303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610db7565b6003546130879082612320565b6003556001600160a01b0382166000908152600160205260409020546130ad9082612320565b6001600160a01b0383166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906130fe9085815260200190565b60405180910390a35050565b6001600160a01b03811661316f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610db7565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3060009081526001602052604081205490506000601c54601a54601b546131f19190613f67565b6131fb9190613f67565b9050811580613208575080155b15613211575050565b600c5461321f90600a613ed6565b82111561323757600c5461323490600a613ed6565b91505b600080600283601b548661324b9190613ed6565b6132559190613f0b565b61325f9190613f0b565b905061327361326e8286613fb5565b613592565b601b544790819060009061328990600290613f0b565b6132939087613fb5565b601a546132a09085613ed6565b6132aa9190613f0b565b905060006002601b546132bd9190613f0b565b6132c79088613fb5565b601c546132d49086613ed6565b6132de9190613f0b565b90506132ea8183613f67565b6132f49084613fb5565b6000601b819055601a559250841580159061330f5750600083115b1561331e5761331e858461374a565b600b546040516001600160a01b03909116908290600081818185875af1925050503d806000811461336b576040519150601f19603f3d011682016040523d82523d6000602084013e613370565b606091505b5050600a546040519197506001600160a01b0316904790600081818185875af1925050503d80600081146133c0576040519150601f19603f3d011682016040523d82523d6000602084013e6133c5565b606091505b5050505050505050505050565b816001600160a01b0316836001600160a01b0316141580156133f45750600081115b15611726576001600160a01b03831615613496576001600160a01b03831660009081526021602052604081205463ffffffff169081613434576000613476565b6001600160a01b0385166000908152602080526040812090613457600185613f1f565b63ffffffff1663ffffffff168152602001908152602001600020600101545b905060006134848483613fb5565b90506134928684848461382b565b5050505b6001600160a01b03821615611726576001600160a01b03821660009081526021602052604081205463ffffffff1690816134d1576000613513565b6001600160a01b03841660009081526020805260408120906134f4600185613f1f565b63ffffffff1663ffffffff168152602001908152602001600020600101545b905060006135218483613f67565b9050611fe68584848461382b565b6001600160a01b0382166000818152601e6020908152604091829020805460ff19168515159081179091558251938452908301527f6b4f1be9103e6cbcd38ca4a922334f2c3109b260130a6676a987f94088fd6746910160405180910390a15050565b60408051600280825260608201835260009260208301908036833701905050905030816000815181106135c7576135c7613e8f565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015613645573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136699190613fcc565b8160018151811061367c5761367c613e8f565b60200260200101906001600160a01b031690816001600160a01b0316815250506136c7307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8461237f565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac9479061371c908590600090869030904290600401613fe9565b600060405180830381600087803b15801561373657600080fd5b505af1158015611fe6573d6000803e3d6000fd5b613775307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8461237f565b60405163f305d71960e01b815230600482015260248101839052600060448201819052606482015261dead60848201524260a48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b03169063f305d71990839060c40160606040518083038185885af11580156137ff573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613824919061405a565b5050505050565b600061384f436040518060600160405280603581526020016140d9603591396139ca565b905060008463ffffffff161180156138a857506001600160a01b0385166000908152602080526040812063ffffffff83169161388c600188613f1f565b63ffffffff908116825260208201929092526040016000205416145b156138f0576001600160a01b0385166000908152602080526040812083916138d1600188613f1f565b63ffffffff16815260208101919091526040016000206001015561397f565b60408051808201825263ffffffff838116825260208083018681526001600160a01b038a1660009081528280528581208a851682529092529390209151825463ffffffff19169116178155905160019182015561394e908590614088565b6001600160a01b0386166000908152602160205260409020805463ffffffff191663ffffffff929092169190911790555b60408051848152602081018490526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b60008164010000000084106139f25760405162461bcd60e51b8152600401610db791906139fa565b509192915050565b600060208083528351808285015260005b81811015613a2757858101830151858201604001528201613a0b565b81811115613a39576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461128157600080fd5b60008060408385031215613a7757600080fd5b8235613a8281613a4f565b946020939093013593505050565b600060208284031215613aa257600080fd5b8135611bea81613a4f565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613aec57613aec613aad565b604052919050565b600067ffffffffffffffff821115613b0e57613b0e613aad565b5060051b60200190565b600082601f830112613b2957600080fd5b81356020613b3e613b3983613af4565b613ac3565b82815260059290921b84018101918181019086841115613b5d57600080fd5b8286015b84811015613b785780358352918301918301613b61565b509695505050505050565b60008060408385031215613b9657600080fd5b823567ffffffffffffffff80821115613bae57600080fd5b818501915085601f830112613bc257600080fd5b81356020613bd2613b3983613af4565b82815260059290921b84018101918181019089841115613bf157600080fd5b948201945b83861015613c18578535613c0981613a4f565b82529482019490820190613bf6565b96505086013592505080821115613c2e57600080fd5b50613c3b85828601613b18565b9150509250929050565b600080600060608486031215613c5a57600080fd5b8335613c6581613a4f565b92506020840135613c7581613a4f565b929592945050506040919091013590565b600060208284031215613c9857600080fd5b5035919050565b801515811461128157600080fd5b60008060408385031215613cc057600080fd5b8235613ccb81613a4f565b91506020830135613cdb81613c9f565b809150509250929050565b600080600060608486031215613cfb57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215613d2557600080fd5b8235613d3081613a4f565b91506020830135613cdb81613a4f565b60008060008060008060c08789031215613d5957600080fd5b8635613d6481613a4f565b95506020870135945060408701359350606087013560ff81168114613d8857600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215613db557600080fd5b8235613dc081613a4f565b9150602083013563ffffffff81168114613cdb57600080fd5b600181811c90821680613ded57607f821691505b60208210811415613e0e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526026908201527f5f6f7065726174696f6e734164647265737320616464726573732063616e6e6f60408201526507420626520360d41b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613ecf57613ecf613ea5565b5060010190565b6000816000190483118215151615613ef057613ef0613ea5565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613f1a57613f1a613ef5565b500490565b600063ffffffff83811690831681811015613f3c57613f3c613ea5565b039392505050565b600063ffffffff80841680613f5b57613f5b613ef5565b92169190910492915050565b60008219821115613f7a57613f7a613ea5565b500190565b600060208284031215613f9157600080fd5b5051919050565b600060208284031215613faa57600080fd5b8151611bea81613c9f565b600082821015613fc757613fc7613ea5565b500390565b600060208284031215613fde57600080fd5b8151611bea81613a4f565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156140395784516001600160a01b031683529383019391830191600101614014565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561406f57600080fd5b8351925060208401519150604084015190509250925092565b600063ffffffff8083168185168083038211156140a7576140a7613ea5565b0194935050505056fe42455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365504541524c3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d6265722065786365656473203332206269747342455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220978f9ba368807d6ca36bd58b6f12b9cd953fe8e98061d85d3ec5d37eef4217af64736f6c634300080b0033

Verified Source Code Partial Match

Compiler: v0.8.11+commit.d7f03943 EVM: london Optimization: Yes (200 runs)
PearlToken.sol 2189 lines
// SPDX-License-Identifier: MIT

pragma solidity 0.8.11;


// 
/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, 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;
    }

    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

// 
interface IBEP20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external view returns (address);

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

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

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

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

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

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

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

// 
/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            codehash := extcodehash(account)
        }
        return (codehash != accountHash && codehash != 0x0);
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{value: amount}('');
        require(success, 'Address: unable to send value, recipient may have reverted');
    }

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

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

// 
/**
 * @title SafeBEP20
 * @dev Wrappers around BEP20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeBEP20 for IBEP20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeBEP20 {
    using SafeMath for uint256;
    using Address for address;

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

    function safeTransferFrom(
        IBEP20 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
     * {IBEP20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IBEP20 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'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            'SafeBEP20: approve from non-zero to non-zero allowance'
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

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

    function safeDecreaseAllowance(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            'SafeBEP20: decreased allowance below zero'
        );
        _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(IBEP20 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, 'SafeBEP20: low-level call failed');
        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), 'SafeBEP20: BEP20 operation did not succeed');
        }
    }
}

// 
/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor() {}

    function _msgSender() internal view returns (address payable) {
        return payable(msg.sender);
    }

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

// 
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
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() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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 onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), 'Ownable: new owner is the zero address');
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// 
/**
 * @dev Implementation of the {IBEP20} 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 {BEP20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-BEP20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of BEP20 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 {IBEP20-approve}.
 */
contract BEP20 is Context, IBEP20, Ownable {
    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the bep token owner.
     */
    function getOwner() external override view returns (address) {
        return owner();
    }

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

    /**
     * @dev Returns the token decimals.
     */
    function decimals() public override view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev Returns the token symbol.
     */
    function symbol() public override view returns (string memory) {
        return _symbol;
    }

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

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

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

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

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

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

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

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {BEP20-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 returns (bool) {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender].sub(subtractedValue, 'BEP20: decreased allowance below zero')
        );
        return true;
    }

    /**
     * @dev Creates `amount` tokens and assigns them to `msg.sender`, increasing
     * the total supply.
     *
     * Requirements
     *
     * - `msg.sender` must be the token owner
     */
    function mint(uint256 amount) public onlyOwner returns (bool) {
        _mint(_msgSender(), amount);
        return true;
    }

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

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

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

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

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

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

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is 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 {
        require(owner != address(0), 'BEP20: approve from the zero address');
        require(spender != address(0), 'BEP20: approve to the zero address');

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

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(
            account,
            _msgSender(),
            _allowances[account][_msgSender()].sub(amount, 'BEP20: burn amount exceeds allowance')
        );
    }
}

interface IDexRouter {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );
}

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

// PearlToken with Governance.
contract PearlToken is BEP20('Pearl Token', 'PEARL') {

    mapping (address => address) internal _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    IDexRouter public immutable dexRouter;
    address public immutable lpPair;

    uint256 public maxBuyAmount;
    uint256 public maxSellAmount;

    address public operationsAddress;
    address public charityAddress;

    bool private swapping;
    uint256 public swapTokensAtAmount;

    bool public limitsInEffect = true;
    bool public tradingActive = false;
    bool public swapEnabled = false;
    
    uint256 public tradingActiveBlock = 0; // 0 means trading is not active
    uint256 public earlyBuyPenaltyEnd; // determines when snipers/bots can sell without extra penalty
    
     // Anti-bot and anti-whale mappings and variables
    mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
    bool public transferDelayEnabled = true;

    bool private gasLimitActive = true;
    uint256 private constant gasPriceLimit = 400 * 1 gwei; // do not allow over x gwei for launch

    uint256 public buyTotalFees;
    uint256 public buyOperationsFee;
    uint256 public buyLiquidityFee;
    uint256 public buyCharityFee;

    uint256 public sellTotalFees;
    uint256 public sellOperationsFee;
    uint256 public sellLiquidityFee;
    uint256 public sellCharityFee;

    uint256 public tokensForOperations;
    uint256 public tokensForLiquidity;
    uint256 public tokensForCharity;
    
    /******************/

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

    // store addresses that a automatic market maker pairs. Any transfer *to* these addresses
    // could be subject to a maximum transfer amount
    mapping (address => bool) public automatedMarketMakerPairs;

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

    event BoughtEarly(address indexed sniper);
    
    event RemovedSniper(address indexed notsnipersupposedly);

    event EnabledTrading();

    event ExcludeFromFees(address indexed account, bool isExcluded);

    event UpdatedMaxBuyAmount(uint256 newAmount);

    event UpdatedMaxSellAmount(uint256 newAmount);

    event UpdatedOperationsAddress(address indexed newWallet);

    event UpdatedCharityAddress(address indexed newWallet);

    event MaxTransactionExclusion(address _address, bool excluded);

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

    event TransferForeignToken(address token, uint256 amount);

    /// @notice A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

      /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    constructor() {
        
        address newOwner = msg.sender; // can leave alone if owner is deployer.
        
        IDexRouter _dexRouter = IDexRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);

        _excludeFromMaxTransaction(address(_dexRouter), true);
        dexRouter = _dexRouter;
        
        lpPair = IDexFactory(_dexRouter.factory()).createPair(address(this), _dexRouter.WETH());
        _setAutomatedMarketMakerPair(address(lpPair), true);
 
        uint256 totalSupply = 10* 1e12 * 1e18;
        
        maxBuyAmount = totalSupply * 1 / 1000;
        maxSellAmount = totalSupply * 1 / 1000; 
        swapTokensAtAmount = totalSupply * 1 / 10000; // 0.01% swap amount

        buyOperationsFee = 5;
        buyLiquidityFee = 5;
        buyCharityFee = 0;
        buyTotalFees = buyOperationsFee + buyLiquidityFee + buyCharityFee;

        sellOperationsFee = 10;
        sellLiquidityFee = 10;
        sellCharityFee = 0;
        sellTotalFees = sellOperationsFee + sellLiquidityFee + sellCharityFee;

        _excludeFromMaxTransaction(newOwner, true);
        _excludeFromMaxTransaction(address(this), true);
        _excludeFromMaxTransaction(address(0xdead), true);

        excludeFromFees(newOwner, true);

        operationsAddress = address(0x5bFf5d0a17d48dCb3EeCa101eE758cBe5dB68A44);
        charityAddress = address(0x5bFf5d0a17d48dCb3EeCa101eE758cBe5dB68A44);
        
        _mint(newOwner, totalSupply);
        transferOwnership(newOwner);
    }

    receive() external payable {
  	}

    // once enabled, can never be turned off
    function enableTrading() external onlyOwner {
        require(!tradingActive, "Cannot reenable trading");
        tradingActive = true;
        swapEnabled = true;
        tradingActiveBlock = block.number;
        emit EnabledTrading();
    }
    
    // remove limits after token is stable
    function removeLimits() external onlyOwner {
        limitsInEffect = false;
        transferDelayEnabled = false;
        gasLimitActive = false;
    }
    
    // disable Transfer delay - cannot be reenabled
    function disableTransferDelay() external onlyOwner {
        transferDelayEnabled = false;
    }
    
    function updateMaxBuyAmount(uint256 newNum) external onlyOwner {
        require(newNum >= (totalSupply() * 1 / 1000)/1e18, "Cannot set max buy amount lower than 0.1%");
        maxBuyAmount = newNum * (10**18);
        emit UpdatedMaxBuyAmount(maxBuyAmount);
    }
    
    function updateMaxSellAmount(uint256 newNum) external onlyOwner {
        require(newNum >= (totalSupply() * 1 / 1000)/1e18, "Cannot set max sell amount lower than 0.1%");
        maxSellAmount = newNum * (10**18);
        emit UpdatedMaxSellAmount(maxSellAmount);
    }

    // change the minimum amount of tokens to sell from fees
    function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner {
  	    require(newAmount >= totalSupply() * 1 / 100000, "Swap amount cannot be lower than 0.001% total supply.");
  	    require(newAmount <= totalSupply() * 1 / 1000, "Swap amount cannot be higher than 0.1% total supply.");
  	    swapTokensAtAmount = newAmount;
  	}
    
    function _excludeFromMaxTransaction(address updAds, bool isExcluded) private {
        _isExcludedMaxTransactionAmount[updAds] = isExcluded;
        emit MaxTransactionExclusion(updAds, isExcluded);
    }

    function airdropToWallets(address[] memory airdropWallets, uint256[] memory amounts) external onlyOwner returns (bool){
        require(!tradingActive, "Trading is already active, cannot airdrop after launch.");
        require(airdropWallets.length == amounts.length, "arrays must be the same length");
        require(airdropWallets.length < 200, "Can only airdrop 200 wallets per txn due to gas limits"); // allows for airdrop + launch at the same exact time, reducing delays and reducing sniper input.
        for(uint256 i = 0; i < airdropWallets.length; i++){
            address wallet = airdropWallets[i];
            uint256 amount = amounts[i];
            super._transfer(msg.sender, wallet, amount);
        }
        return true;
    }
    
    function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner {
        if(!isEx){
            require(updAds != lpPair, "Cannot remove uniswap pair from max txn");
        }
        _isExcludedMaxTransactionAmount[updAds] = isEx;
    }

    function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner {
        require(pair != lpPair, "The pair cannot be removed from automatedMarketMakerPairs");

        _setAutomatedMarketMakerPair(pair, value);
    }

    function _setAutomatedMarketMakerPair(address pair, bool value) private {
        automatedMarketMakerPairs[pair] = value;
        
        _excludeFromMaxTransaction(pair, value);

        emit SetAutomatedMarketMakerPair(pair, value);
    }

    function updateBuyFees(uint256 _operationsFee, uint256 _liquidityFee, uint256 _charityFee) external onlyOwner {
        buyOperationsFee = _operationsFee;
        buyLiquidityFee = _liquidityFee;
        buyCharityFee = _charityFee;
        buyTotalFees = buyOperationsFee + buyLiquidityFee + buyCharityFee;
        require(buyTotalFees <= 10, "Must keep fees at 10% or less");
    }

    function updateSellFees(uint256 _operationsFee, uint256 _liquidityFee, uint256 _charityFee) external onlyOwner {
        sellOperationsFee = _operationsFee;
        sellLiquidityFee = _liquidityFee;
        sellCharityFee = _charityFee;
        sellTotalFees = sellOperationsFee + sellLiquidityFee + sellCharityFee;
        require(sellTotalFees <= 20, "Must keep fees at 20% or less");
    }

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

    function _transfer(address from, address to, uint256 amount) internal override {

        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");
        if(amount == 0){
            super._transfer(from, to, 0);
            return;
        }
        
        if(limitsInEffect){
            if (from != owner() && to != owner() && to != address(0) && to != address(0xdead)){
                if(!tradingActive){
                    require(_isExcludedMaxTransactionAmount[from] || _isExcludedMaxTransactionAmount[to], "Trading is not active.");
                }

                // only use to prevent sniper buys in the first blocks.
                if (gasLimitActive && automatedMarketMakerPairs[from]) {
                    require(tx.gasprice <= gasPriceLimit, "Gas price exceeds limit.");
                }
                
                // at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.  
                if (transferDelayEnabled){
                    if (to != address(dexRouter) && to != address(lpPair)){
                        require(_holderLastTransferTimestamp[tx.origin] < block.number, "_transfer:: Transfer Delay enabled.  Only one purchase per block allowed.");
                        _holderLastTransferTimestamp[tx.origin] = block.number;
                    }
                }
                 
                //when buy
                if (automatedMarketMakerPairs[from] && !_isExcludedMaxTransactionAmount[to]) {
                        require(amount <= maxBuyAmount, "Buy transfer amount exceeds the max buy.");
                } 
                //when sell
                else if (automatedMarketMakerPairs[to] && !_isExcludedMaxTransactionAmount[from]) {
                        require(amount <= maxSellAmount, "Sell transfer amount exceeds the max sell.");
                }
            }
        }

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

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

            swapBack();

            swapping = false;
        }

        bool takeFee = true;
        // if any account belongs to _isExcludedFromFee account then remove the fee
        if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) {
            takeFee = false;
        }
        
        uint256 fees = 0;
        // only take fees on buys/sells, do not take on wallet transfers
        if(takeFee){
            if(block.number == tradingActiveBlock && automatedMarketMakerPairs[from]){
                fees = amount * 95 / 100;
                tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees;
                tokensForOperations += fees * sellOperationsFee / sellTotalFees;
                tokensForCharity += fees * sellCharityFee / sellTotalFees;
            }
            // on sell
            if (automatedMarketMakerPairs[to] && sellTotalFees > 0){
                fees = amount * sellTotalFees /100;
                tokensForLiquidity += fees * sellLiquidityFee / sellTotalFees;
                tokensForOperations += fees * sellOperationsFee / sellTotalFees;
                tokensForCharity += fees * sellCharityFee / sellTotalFees;
            }
            // on buy
            else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) {
        	    fees = amount * buyTotalFees / 100;
        	    tokensForLiquidity += fees * buyLiquidityFee / buyTotalFees;
                tokensForOperations += fees * buyOperationsFee / buyTotalFees;
                tokensForCharity += fees * buyCharityFee / buyTotalFees;
            }
            
            if(fees > 0){    
                super._transfer(from, address(this), fees);
            }
        	
        	amount -= fees;
        }

        super._transfer(from, to, amount);
    }

    function swapTokensForEth(uint256 tokenAmount) private {

        // generate the uniswap pair path of token -> weth
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = dexRouter.WETH();

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

        // make the swap
        dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }
    
    function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
        // approve token transfer to cover all possible scenarios
        _approve(address(this), address(dexRouter), tokenAmount);

        // add the liquidity
        dexRouter.addLiquidityETH{value: ethAmount}(
            address(this),
            tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            address(0xdead),
            block.timestamp
        );
    }

    function swapBack() private {
        uint256 contractBalance = balanceOf(address(this));
        uint256 totalTokensToSwap = tokensForLiquidity + tokensForOperations + tokensForCharity;
        
        if(contractBalance == 0 || totalTokensToSwap == 0) {return;}

        if(contractBalance > swapTokensAtAmount * 10){
            contractBalance = swapTokensAtAmount * 10;
        }

        bool success;
        
        // Halve the amount of liquidity tokens
        uint256 liquidityTokens = contractBalance * tokensForLiquidity / totalTokensToSwap / 2;
        
        swapTokensForEth(contractBalance - liquidityTokens); 
        
        uint256 ethBalance = address(this).balance;
        uint256 ethForLiquidity = ethBalance;
...

// [truncated — 80591 bytes total]

Read Contract

DELEGATION_TYPEHASH 0xe7a324dc → bytes32
DOMAIN_TYPEHASH 0x20606b70 → bytes32
_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyCharityFee 0xa1dc92bc → uint256
buyLiquidityFee 0xf11a24d3 → uint256
buyOperationsFee 0x5a139dd4 → uint256
buyTotalFees 0xd85ba063 → uint256
charityAddress 0xafcf2fc4 → address
checkpoints 0xf1127ed8 → uint32, uint256
decimals 0x313ce567 → uint8
delegates 0x587cde1e → address
dexRouter 0x0758d924 → address
earlyBuyPenaltyEnd 0x1fc851bd → uint256
getCurrentVotes 0xb4b5ea57 → uint256
getOwner 0x893d20e8 → address
getPriorVotes 0x782d6fe1 → uint256
limitsInEffect 0x4a62bb65 → bool
lpPair 0x452ed4f1 → address
maxBuyAmount 0x88e765ff → uint256
maxSellAmount 0x66d602ae → uint256
name 0x06fdde03 → string
nonces 0x7ecebe00 → uint256
numCheckpoints 0x6fcfff45 → uint32
operationsAddress 0xea4cfe12 → address
owner 0x8da5cb5b → address
sellCharityFee 0x0d7f1441 → uint256
sellLiquidityFee 0xf6374342 → uint256
sellOperationsFee 0x4f77f6c0 → uint256
sellTotalFees 0x6a486a8e → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
tokensForCharity 0x44249f04 → uint256
tokensForLiquidity 0x1a8145bb → uint256
tokensForOperations 0xfb002c97 → uint256
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
tradingActiveBlock 0xee40166e → uint256
transferDelayEnabled 0xc876d0b9 → bool

Write Contract 26 functions

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

airdropToWallets 0x2307b441
address[] airdropWallets
uint256[] amounts
returns: bool
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
delegate 0x5c19a95c
address delegatee
delegateBySig 0xc3cda520
address delegatee
uint256 nonce
uint256 expiry
uint8 v
bytes32 r
bytes32 s
disableTransferDelay 0xe884f260
No parameters
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0xa0712d68
uint256 amount
returns: bool
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
setCharityAddress 0x0c9be46d
address _charityAddress
setOperationsAddress 0x499b8394
address _operationsAddress
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferForeignToken 0x8366e79a
address _token
address _to
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x8095d564
uint256 _operationsFee
uint256 _liquidityFee
uint256 _charityFee
updateMaxBuyAmount 0x2be32b61
uint256 newNum
updateMaxSellAmount 0xdc3f0d0f
uint256 newNum
updateSellFees 0xc17b5b8c
uint256 _operationsFee
uint256 _liquidityFee
uint256 _charityFee
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
withdrawStuckETH 0xf5648a4f
No parameters

Recent Transactions

No transactions found for this address