Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x0C54529e5432FE1189B4F670437d4F6274dD618d
Balance 0.004244 ETH
Nonce 1
Code Size 14648 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

14648 bytes
0x6080604052600436106104405760003560e01c806370690b1111610234578063be9ace741161012e578063d543dbeb116100b6578063efa088061161007a578063efa0880614610d10578063f25f4b5614610d30578063f2fde38b14610d50578063f7c618c114610d70578063f887ea4014610d9057600080fd5b8063d543dbeb14610c4a578063dd62ed3e14610c6a578063df8408fe14610cb0578063e632313c14610cd0578063ec9257d414610cf057600080fd5b8063c49b9a80116100fd578063c49b9a8014610bb4578063c7992f9a14610bd4578063d28d885214610bf5578063d2fcc00114610c0a578063d4c989d314610c2a57600080fd5b8063be9ace7414610b31578063beb9716d14610b52578063c0b0fda214610b71578063c1eb184014610b9257600080fd5b80639c1b8af5116101bc578063b09f126611610180578063b09f126614610aba578063b187bd2614610acf578063b1c16b1214610af0578063b79550be14610b06578063be10b61414610b1b57600080fd5b80639c1b8af514610a2e578063a342722f14610a44578063a457c2d714610a64578063a9059cbb14610a84578063af465a2714610aa457600080fd5b80637d1db4a5116102035780637d1db4a5146109af57806382bf293c146109c557806385a6b3ae146109e55780638da5cb5b146109fb57806395d89b4114610a1957600080fd5b806370690b111461094357806370a082311461096457806370e5024114610984578063715018a61461099a57600080fd5b8063323be1c5116103455780634e7b827f116102cd57806354ce65781161029157806354ce6578146108b45780636bc87c3a146108d55780636c0a24eb146108f65780636e155b491461090c5780636f2789ec1461092d57600080fd5b80634e7b827f146107e957806351330a191461081957806351fde4bb1461083a578063521432901461085b5780635342acb41461087b57600080fd5b80633bd5d173116103145780633bd5d173146107445780633c81385c14610766578063430ca090146107875780634549b039146107a85780634a74bb02146107c857600080fd5b8063323be1c5146106c4578063324f8dbf146106e457806339509351146107055780633b124fe71461072557600080fd5b8063226cfa3d116103c85780632d6abf87116103975780632d6abf87146106405780632d838119146106605780632e8fa821146106805780633009a60914610696578063313ce567146106ac57600080fd5b8063226cfa3d146105b857806323b872dd146105e557806328815c20146106055780632cd6d0771461062657600080fd5b8063149940a01161040f578063149940a0146104f957806315fa749a1461053157806318160ddd1461055257806319de79ab146105675780631cdd3be31461058857600080fd5b806306fdde031461044c578063095ea7b3146104775780630f94892c146104a757806313114a9d146104da57600080fd5b3661044757005b600080fd5b34801561045857600080fd5b50610461610db0565b60405161046e9190613396565b60405180910390f35b34801561048357600080fd5b506104976104923660046133f9565b610e42565b604051901515815260200161046e565b3480156104b357600080fd5b506020546104c890600160581b900460ff1681565b60405160ff909116815260200161046e565b3480156104e657600080fd5b50601d545b60405190815260200161046e565b34801561050557600080fd5b50602554610519906001600160a01b031681565b6040516001600160a01b03909116815260200161046e565b34801561053d57600080fd5b506001546104c890600160c01b900460ff1681565b34801561055e57600080fd5b50601b546104eb565b34801561057357600080fd5b506020546104c890600160781b900460ff1681565b34801561059457600080fd5b506104976105a3366004613425565b602d6020526000908152604090205460ff1681565b3480156105c457600080fd5b506104eb6105d3366004613425565b60106020526000908152604090205481565b3480156105f157600080fd5b50610497610600366004613442565b610e59565b34801561061157600080fd5b506020546104c890600160681b900460ff1681565b34801561063257600080fd5b50602e546104979060ff1681565b34801561064c57600080fd5b50602154610519906001600160a01b031681565b34801561066c57600080fd5b506104eb61067b366004613483565b610ec2565b34801561068c57600080fd5b506104eb602b5481565b3480156106a257600080fd5b506104eb600e5481565b3480156106b857600080fd5b5060205460ff166104c8565b3480156106d057600080fd5b50602e546104979062010000900460ff1681565b3480156106f057600080fd5b506001546104c890600160c81b900460ff1681565b34801561071157600080fd5b506104976107203660046133f9565b610f38565b34801561073157600080fd5b506020546104c890610100900460ff1681565b34801561075057600080fd5b5061076461075f366004613483565b610f6e565b005b34801561077257600080fd5b506001546104c890600160b01b900460ff1681565b34801561079357600080fd5b506001546104c890600160a01b900460ff1681565b3480156107b457600080fd5b506104eb6107c33660046134aa565b611058565b3480156107d457600080fd5b5060285461049790600160a81b900460ff1681565b3480156107f557600080fd5b50610497610804366004613425565b600f6020526000908152604090205460ff1681565b34801561082557600080fd5b506001546104c890600160b81b900460ff1681565b34801561084657600080fd5b506020546104c8906301000000900460ff1681565b34801561086757600080fd5b50602254610519906001600160a01b031681565b34801561088757600080fd5b50610497610896366004613425565b6001600160a01b031660009081526014602052604090205460ff1690565b3480156108c057600080fd5b506020546104c890600160481b900460ff1681565b3480156108e157600080fd5b506020546104c890600160281b900460ff1681565b34801561090257600080fd5b506104eb602a5481565b34801561091857600080fd5b506001546104c890600160d81b900460ff1681565b34801561093957600080fd5b506104eb60115481565b34801561094f57600080fd5b506001546104c890600160d01b900460ff1681565b34801561097057600080fd5b506104eb61097f366004613425565b6110e5565b34801561099057600080fd5b506104eb602c5481565b3480156109a657600080fd5b50610764611144565b3480156109bb57600080fd5b506104eb60295481565b3480156109d157600080fd5b506107646109e0366004613483565b6111b8565b3480156109f157600080fd5b506104eb60095481565b348015610a0757600080fd5b506000546001600160a01b0316610519565b348015610a2557600080fd5b50610461611259565b348015610a3a57600080fd5b506104eb60135481565b348015610a5057600080fd5b50610764610a5f3660046134f0565b611268565b348015610a7057600080fd5b50610497610a7f3660046133f9565b611425565b348015610a9057600080fd5b50610497610a9f3660046133f9565b611474565b348015610ab057600080fd5b506104eb601b5481565b348015610ac657600080fd5b50610461611481565b348015610adb57600080fd5b50602e54610497906301000000900460ff1681565b348015610afc57600080fd5b506104eb60055481565b348015610b1257600080fd5b5061076461150f565b348015610b2757600080fd5b506104eb60125481565b348015610b3d57600080fd5b506020546104c890600160881b900460ff1681565b348015610b5e57600080fd5b50602e5461049790610100900460ff1681565b348015610b7d57600080fd5b506020546104c890600160381b900460ff1681565b348015610b9e57600080fd5b50602e5461049790640100000000900460ff1681565b348015610bc057600080fd5b50610764610bcf366004613544565b611576565b348015610be057600080fd5b506001546104c890600160a81b900460ff1681565b348015610c0157600080fd5b506104616115f8565b348015610c1657600080fd5b50610764610c25366004613561565b611605565b348015610c3657600080fd5b50610764610c45366004613561565b61165a565b348015610c5657600080fd5b50610764610c65366004613483565b6116af565b348015610c7657600080fd5b506104eb610c8536600461358f565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b348015610cbc57600080fd5b50610764610ccb366004613561565b61174a565b348015610cdc57600080fd5b50610764610ceb366004613483565b61179f565b348015610cfc57600080fd5b50602454610519906001600160a01b031681565b348015610d1c57600080fd5b50610764610d2b3660046133f9565b61183a565b348015610d3c57600080fd5b50602354610519906001600160a01b031681565b348015610d5c57600080fd5b50610764610d6b366004613425565b6118fb565b348015610d7c57600080fd5b50601a54610519906001600160a01b031681565b348015610d9c57600080fd5b50601954610519906001600160a01b031681565b6060601e8054610dbf906135bd565b80601f0160208091040260200160405190810160405280929190818152602001828054610deb906135bd565b8015610e385780601f10610e0d57610100808354040283529160200191610e38565b820191906000526020600020905b815481529060010190602001808311610e1b57829003601f168201915b5050505050905090565b6000610e4f338484611aa9565b5060015b92915050565b6000610e66848484611bb6565b610eb88433610eb3856040518060600160405280602881526020016138b6602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611fbe565b611aa9565b5060019392505050565b6000601c54821115610f1b5760405162461bcd60e51b815260206004820152601e60248201527f416d74206d757374206265206c657373207468616e20746f74207265666c000060448201526064015b60405180910390fd5b6000610f25611ff8565b9050610f318382611a67565b9392505050565b3360008181526004602090815260408083206001600160a01b03871684529091528120549091610e4f918590610eb3908661201b565b3360008181526017602052604090205460ff1615610fe35760405162461bcd60e51b815260206004820152602c60248201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460448201526b3434b990333ab731ba34b7b760a11b6064820152608401610f12565b6000610fee8361207a565b505050506001600160a01b03841660009081526002602052604090205491925061101a919050826120c9565b6001600160a01b038316600090815260026020526040902055601c5461104090826120c9565b601c55601d54611050908461201b565b601d55505050565b6000601b548311156110ac5760405162461bcd60e51b815260206004820152601c60248201527f416d74206d757374206265206c657373207468616e20737570706c79000000006044820152606401610f12565b816110cb5760006110bc8461207a565b50939550610e53945050505050565b60006110d68461207a565b50929550610e53945050505050565b6001600160a01b03811660009081526017602052604081205460ff161561112257506001600160a01b031660009081526003602052604090205490565b6001600160a01b038216600090815260026020526040902054610e5390610ec2565b6000546001600160a01b0316331461116e5760405162461bcd60e51b8152600401610f12906135f7565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146111e25760405162461bcd60e51b8152600401610f12906135f7565b600154600160d01b900460ff16811080159061120057506127108111155b6112325760405162461bcd60e51b815260206004820152600360248201526232b93960e91b6044820152606401610f12565b61125361271061124d83601b546119e590919063ffffffff16565b90611a67565b602a5550565b6060601f8054610dbf906135bd565b6000546001600160a01b031633146112925760405162461bcd60e51b8152600401610f12906135f7565b60015460ff600160a81b909104811690851611156112db5760405162461bcd60e51b81526020600482015260066024820152652a231032b93960d11b6044820152606401610f12565b60015460ff600160a01b909104811690841611156113245760405162461bcd60e51b815260206004820152600660248201526526231032b93960d11b6044820152606401610f12565b60015460ff600160b01b9091048116908316111561136d5760405162461bcd60e51b815260206004820152600660248201526521231032b93960d11b6044820152606401610f12565b60015460ff600160d81b909104811690821611156113b75760405162461bcd60e51b815260206004820152600760248201526622a9a31032b93960c91b6044820152606401610f12565b6020805465ff000000ff00191661010060ff9687160265ff0000000000191617600160281b948616949094029390931771ff000000000000000000ff000000000000001916600160381b9285169290920260ff60881b191691909117600160881b9190931602919091179055565b6000610e4f3384610eb3856040518060600160405280602581526020016138de602591393360009081526004602090815260408083206001600160a01b038d1684529091529020549190611fbe565b6000610e4f338484611bb6565b601f805461148e906135bd565b80601f01602080910402602001604051908101604052809291908181526020018280546114ba906135bd565b80156115075780601f106114dc57610100808354040283529160200191611507565b820191906000526020600020905b8154815290600101906020018083116114ea57829003601f168201915b505050505081565b6000546001600160a01b031633146115395760405162461bcd60e51b8152600401610f12906135f7565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015611573573d6000803e3d6000fd5b50565b6000546001600160a01b031633146115a05760405162461bcd60e51b8152600401610f12906135f7565b60288054821515600160a81b0260ff60a81b199091161790556040517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc159906115ed90831515815260200190565b60405180910390a150565b601e805461148e906135bd565b6000546001600160a01b0316331461162f5760405162461bcd60e51b8152600401610f12906135f7565b6001600160a01b03919091166000908152601660205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146116845760405162461bcd60e51b8152600401610f12906135f7565b6001600160a01b03919091166000908152601560205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146116d95760405162461bcd60e51b8152600401610f12906135f7565b600154600160c81b900460ff1681108015906116f757506127108111155b6117295760405162461bcd60e51b815260206004820152600360248201526232b93960e91b6044820152606401610f12565b61174461271061124d83601b546119e590919063ffffffff16565b60295550565b6000546001600160a01b031633146117745760405162461bcd60e51b8152600401610f12906135f7565b6001600160a01b03919091166000908152601460205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146117c95760405162461bcd60e51b8152600401610f12906135f7565b60205460ff166117da90600a613726565b81101580156117f657506117f2606461124d601b5490565b8111155b6118355760405162461bcd60e51b815260206004820152601060248201526f1b9bdd081d985b1a5908185b5bdd5b9d60821b6044820152606401610f12565b602b55565b6000546001600160a01b031633146118645760405162461bcd60e51b8152600401610f12906135f7565b816001600160a01b031663a9059cbb6118856000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156118d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f69190613735565b505050565b6000546001600160a01b031633146119255760405162461bcd60e51b8152600401610f12906135f7565b6001600160a01b03811661198a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f12565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000826000036119f757506000610e53565b6000611a038385613752565b905082611a108583613769565b14610f315760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610f12565b6000610f3183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061210b565b6001600160a01b038316611aff5760405162461bcd60e51b815260206004820181905260248201527f45524332303a20617070726f76652066726f6d207a65726f20616464726573736044820152606401610f12565b6001600160a01b038216611b555760405162461bcd60e51b815260206004820152601e60248201527f45524332303a20617070726f766520746f207a65726f206164647265737300006044820152606401610f12565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316611c165760405162461bcd60e51b815260206004820152602160248201527f45524332303a207472616e736665722066726f6d207a65726f206164647265736044820152607360f81b6064820152608401610f12565b6001600160a01b038216611c6c5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a207472616e7366657220746f207a65726f2061646472657373006044820152606401610f12565b60008111611cce5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610f12565b6000546001600160a01b03848116911614801590611cfa57506000546001600160a01b03838116911614155b8015611d1457506019546001600160a01b03838116911614155b8015611d3957506001600160a01b03831660009081526015602052604090205460ff16155b8015611d5e57506001600160a01b03821660009081526015602052604090205460ff16155b15611dc657602954811115611dc65760405162461bcd60e51b815260206004820152602860248201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546044820152673c20b6b7bab73a1760c11b6064820152608401610f12565b6000546001600160a01b03848116911614801590611df257506000546001600160a01b03838116911614155b8015611e0c57506001546001600160a01b03838116911614155b8015611e2657506022546001600160a01b03838116911614155b8015611e4057506019546001600160a01b03838116911614155b8015611e6557506001600160a01b03831660009081526016602052604090205460ff16155b8015611e8a57506001600160a01b03821660009081526016602052604090205460ff16155b15611efa576000611e9a836110e5565b602a54909150611eaa838361378b565b1115611ef85760405162461bcd60e51b815260206004820152601d60248201527f45786365656473206d6178696d756d2077616c6c657420616d6f756e740000006044820152606401610f12565b505b6000611f05306110e5565b602b5460285491925082101590600160a01b900460ff16158015611f3657506022546001600160a01b038581169116145b8015611f4b5750602854600160a81b900460ff165b15611f5f578015611f5f57611f5f82612139565b6001600160a01b03851660009081526014602052604090205460019060ff1680611fa157506001600160a01b03851660009081526014602052604090205460ff165b15611faa575060005b611fb6868686846122e9565b505050505050565b60008184841115611fe25760405162461bcd60e51b8152600401610f129190613396565b506000611fef848661379e565b95945050505050565b60008060006120056125aa565b90925090506120148282611a67565b9250505090565b600080612028838561378b565b905083811015610f315760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610f12565b60008060008060008060008060006120918a61272c565b92509250925060008060006120af8d86866120aa611ff8565b61276e565b919f909e50909c50959a5093985091965092945050505050565b6000610f3183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611fbe565b6000818361212c5760405162461bcd60e51b8152600401610f129190613396565b506000611fef8486613769565b6028805460ff60a01b1916600160a01b1790556020546000906301000000810460ff90811691600160681b8104821691600160581b8204811691600160781b8104821691600160281b82048116916121a291600160481b8204811691600160381b9004166137b1565b6121ac91906137b1565b6121b691906137b1565b6121c091906137b1565b6121ca91906137b1565b6121d491906137b1565b6020549091506000908190600160381b900460ff1615612233576020546122159060ff600160381b90910481169061220f9087908716611a67565b906119e5565b6001549092506122309030906001600160a01b0316846127be565b50805b602054600160281b900460ff16156122d65761224f84826120c9565b9350600061225e856002611a67565b9050600061226c86836120c9565b9050476122788361294e565b600061228447836120c9565b90506122908382612aa0565b60408051858152602081018390529081018490527f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5619060600160405180910390a1505050505b50506028805460ff60a01b191690555050565b806122f6576122f6612b54565b6001600160a01b03841660009081526017602052604090205460ff16801561233757506001600160a01b03831660009081526017602052604090205460ff16155b1561234c57612347848484612e8f565b61244a565b6001600160a01b03841660009081526017602052604090205460ff1615801561238d57506001600160a01b03831660009081526017602052604090205460ff165b1561239d57612347848484612fb5565b6001600160a01b03841660009081526017602052604090205460ff161580156123df57506001600160a01b03831660009081526017602052604090205460ff16155b156123ef5761234784848461305e565b6001600160a01b03841660009081526017602052604090205460ff16801561242f57506001600160a01b03831660009081526017602052604090205460ff165b1561243f5761234784848461318c565b61244a84848461305e565b806125a4576125a4602060029054906101000a900460ff16602060016101000a81548160ff021916908360ff160217905550602060069054906101000a900460ff16602060056101000a81548160ff021916908360ff160217905550602060089054906101000a900460ff16602060076101000a81548160ff021916908360ff1602179055506020600a9054906101000a900460ff16602060096101000a81548160ff021916908360ff160217905550602060109054906101000a900460ff166020600f6101000a81548160ff021916908360ff1602179055506020600c9054906101000a900460ff166020600b6101000a81548160ff021916908360ff160217905550602060049054906101000a900460ff16602060036101000a81548160ff021916908360ff160217905550602060129054906101000a900460ff16602060116101000a81548160ff021916908360ff160217905550565b50505050565b601c54601b546000918291825b6018548110156126fc578260026000601884815481106125d9576125d96137ca565b60009182526020808320909101546001600160a01b031683528201929092526040019020541180612644575081600360006018848154811061261d5761261d6137ca565b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b1561265a57601c54601b54945094505050509091565b6126a06002600060188481548110612674576126746137ca565b60009182526020808320909101546001600160a01b0316835282019290925260400190205484906120c9565b92506126e860036000601884815481106126bc576126bc6137ca565b60009182526020808320909101546001600160a01b0316835282019290925260400190205483906120c9565b9150806126f4816137e0565b9150506125b7565b50601b54601c5461270c91611a67565b82101561272357601c54601b549350935050509091565b90939092509050565b60008060008061273b856131ff565b905060006127488661321f565b905060006127608261275a89866120c9565b906120c9565b979296509094509092505050565b600080808061277d88866119e5565b9050600061278b88876119e5565b9050600061279988886119e5565b905060006127ab8261275a86866120c9565b939b939a50919850919650505050505050565b60006127c8611ff8565b905060006127d683836119e5565b6001600160a01b0386166000908152600260205260409020549091506127fc90826120c9565b6001600160a01b03808716600090815260026020526040808220939093559086168152205461282b908261201b565b6001600160a01b0380861660009081526002602090815260408083209490945591881681526017909152205460ff161561289c576001600160a01b03851660009081526003602052604090205461288290846120c9565b6001600160a01b0386166000908152600360205260409020555b6001600160a01b03841660009081526017602052604090205460ff16156128fa576001600160a01b0384166000908152600360205260409020546128e0908461201b565b6001600160a01b0385166000908152600360205260409020555b836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161293f91815260200190565b60405180910390a35050505050565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110612983576129836137ca565b6001600160a01b03928316602091820292909201810191909152602154604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156129dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a0091906137f9565b81600181518110612a1357612a136137ca565b6001600160a01b039283166020918202929092010152602154612a399130911684611aa9565b60215460405163791ac94760e01b81526001600160a01b039091169063791ac94790612a72908590600090869030904290600401613816565b600060405180830381600087803b158015612a8c57600080fd5b505af1158015611fb6573d6000803e3d6000fd5b602154612ab89030906001600160a01b031684611aa9565b60215460015460405163f305d71960e01b81523060048201526024810185905260006044820181905260648201526001600160a01b0391821660848201524260a482015291169063f305d71990839060c40160606040518083038185885af1158015612b28573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612b4d9190613887565b5050505050565b602054610100900460ff16158015612b765750602054600160281b900460ff16155b8015612b8c5750602054600160381b900460ff16155b8015612ba25750602054600160481b900460ff16155b8015612bb85750602054600160781b900460ff16155b8015612bce5750602054600160581b900460ff16155b8015612be45750602054600160681b900460ff16155b8015612bfa57506020546301000000900460ff16155b8015612c105750602054600160881b900460ff16155b15612c1757565b602060019054906101000a900460ff16602060026101000a81548160ff021916908360ff160217905550602060059054906101000a900460ff16602060066101000a81548160ff021916908360ff160217905550602060079054906101000a900460ff16602060086101000a81548160ff021916908360ff160217905550602060099054906101000a900460ff166020600a6101000a81548160ff021916908360ff1602179055506020600f9054906101000a900460ff16602060106101000a81548160ff021916908360ff1602179055506020600b9054906101000a900460ff166020600c6101000a81548160ff021916908360ff1602179055506020600d9054906101000a900460ff166020600e6101000a81548160ff021916908360ff160217905550602060039054906101000a900460ff16602060046101000a81548160ff021916908360ff160217905550602060119054906101000a900460ff16602060126101000a81548160ff021916908360ff1602179055506000602060016101000a81548160ff021916908360ff1602179055506000602060056101000a81548160ff021916908360ff1602179055506000602060076101000a81548160ff021916908360ff1602179055506000602060096101000a81548160ff021916908360ff16021790555060006020600f6101000a81548160ff021916908360ff16021790555060006020600b6101000a81548160ff021916908360ff16021790555060006020600d6101000a81548160ff021916908360ff1602179055506000602060036101000a81548160ff021916908360ff1602179055506000602060116101000a81548160ff021916908360ff160217905550565b600080600080600080612ea18761207a565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150612ed390886120c9565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054612f0290876120c9565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054612f31908661201b565b6001600160a01b038916600090815260026020526040902055612f53816132ea565b612f5d8483613372565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612fa291815260200190565b60405180910390a3505050505050505050565b600080600080600080612fc78761207a565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150612ff990876120c9565b6001600160a01b03808b16600090815260026020908152604080832094909455918b1681526003909152205461302f908461201b565b6001600160a01b038916600090815260036020908152604080832093909355600290522054612f31908661201b565b6022546001600160a01b0390811690831603613088576020805460ff60981b1916600160981b1790555b60008060008060008061309a8761207a565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506130cc90876120c9565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546130fb908661201b565b6001600160a01b03891660009081526002602052604090205561311d816132ea565b6131278483613372565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161316c91815260200190565b60405180910390a350506020805460ff60981b1916905550505050505050565b60008060008060008061319e8761207a565b6001600160a01b038f16600090815260036020526040902054959b509399509197509550935091506131d090886120c9565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054612ff990876120c9565b602054600090610e539060649061124d908590610100900460ff166119e5565b6020546000908190600160981b900460ff16156132455750602054600160881b900460ff165b602054610f319060649061124d90849060ff63010000008204811691600160681b8104821691600160581b8204811691600160781b8104821691600160481b82048116916132a491600160381b8204811691600160281b9004166137b1565b6132ae91906137b1565b6132b891906137b1565b6132c291906137b1565b6132cc91906137b1565b6132d691906137b1565b6132e091906137b1565b869060ff166119e5565b60006132f4611ff8565b9050600061330283836119e5565b3060009081526002602052604090205490915061331f908261201b565b3060009081526002602090815260408083209390935560179052205460ff16156118f6573060009081526003602052604090205461335d908461201b565b30600090815260036020526040902055505050565b601c5461337f90836120c9565b601c55601d5461338f908261201b565b601d555050565b600060208083528351808285015260005b818110156133c3578581018301518582016040015282016133a7565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461157357600080fd5b6000806040838503121561340c57600080fd5b8235613417816133e4565b946020939093013593505050565b60006020828403121561343757600080fd5b8135610f31816133e4565b60008060006060848603121561345757600080fd5b8335613462816133e4565b92506020840135613472816133e4565b929592945050506040919091013590565b60006020828403121561349557600080fd5b5035919050565b801515811461157357600080fd5b600080604083850312156134bd57600080fd5b8235915060208301356134cf8161349c565b809150509250929050565b803560ff811681146134eb57600080fd5b919050565b6000806000806080858703121561350657600080fd5b61350f856134da565b935061351d602086016134da565b925061352b604086016134da565b9150613539606086016134da565b905092959194509250565b60006020828403121561355657600080fd5b8135610f318161349c565b6000806040838503121561357457600080fd5b823561357f816133e4565b915060208301356134cf8161349c565b600080604083850312156135a257600080fd5b82356135ad816133e4565b915060208301356134cf816133e4565b600181811c908216806135d157607f821691505b6020821081036135f157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561367d5781600019048211156136635761366361362c565b8085161561367057918102915b93841c9390800290613647565b509250929050565b60008261369457506001610e53565b816136a157506000610e53565b81600181146136b757600281146136c1576136dd565b6001915050610e53565b60ff8411156136d2576136d261362c565b50506001821b610e53565b5060208310610133831016604e8410600b8410161715613700575081810a610e53565b61370a8383613642565b806000190482111561371e5761371e61362c565b029392505050565b6000610f3160ff841683613685565b60006020828403121561374757600080fd5b8151610f318161349c565b8082028115828204841417610e5357610e5361362c565b60008261378657634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610e5357610e5361362c565b81810381811115610e5357610e5361362c565b60ff8181168382160190811115610e5357610e5361362c565b634e487b7160e01b600052603260045260246000fd5b6000600182016137f2576137f261362c565b5060010190565b60006020828403121561380b57600080fd5b8151610f31816133e4565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156138665784516001600160a01b031683529383019391830191600101613841565b50506001600160a01b03969096166060850152505050608001529392505050565b60008060006060848603121561389c57600080fd5b835192506020840151915060408401519050925092509256fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212204dc6773c63770085426c70a42d3c73f9acf6479f973c66471cd87904f16c29ed64736f6c63430008110033

Verified Source Code Partial Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: Yes (200 runs)
ProToken.sol 2110 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.15;

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

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

abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return payable(address(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;
    }
}

/**
 * @title SafeMathInt
 * @dev Math operations for int256 with overflow safety checks.
 */
library SafeMathInt {
    int256 private constant MIN_INT256 = int256(1) << 255;
    int256 private constant MAX_INT256 = ~(int256(1) << 255);

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

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

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

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

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

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

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

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

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

library IterableMapping {
    // Iterable mapping from address to uint;
    struct Map {
        address[] keys;
        mapping(address => uint256) values;
        mapping(address => uint256) indexOf;
        mapping(address => bool) inserted;
    }

    function get(Map storage map, address key) internal view returns (uint256) {
        return map.values[key];
    }

    function getIndexOfKey(Map storage map, address key)
        internal
        view
        returns (int256)
    {
        if (!map.inserted[key]) {
            return -1;
        }
        return int256(map.indexOf[key]);
    }

    function getKeyAtIndex(Map storage map, uint256 index)
        internal
        view
        returns (address)
    {
        return map.keys[index];
    }

    function size(Map storage map) internal view returns (uint256) {
        return map.keys.length;
    }

    function set(
        Map storage map,
        address key,
        uint256 val
    ) internal {
        if (map.inserted[key]) {
            map.values[key] = val;
        } else {
            map.inserted[key] = true;
            map.values[key] = val;
            map.indexOf[key] = map.keys.length;
            map.keys.push(key);
        }
    }

    function remove(Map storage map, address key) internal {
        if (!map.inserted[key]) {
            return;
        }

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

        uint256 index = map.indexOf[key];
        uint256 lastIndex = map.keys.length - 1;
        address lastKey = map.keys[lastIndex];

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

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

/**
 * @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 SafeERC20
 * @dev Wrappers around ERC20 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 SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(
            value
        );
        _callOptionalReturn(
            token,
            abi.encodeWithSelector(
                token.approve.selector,
                spender,
                newAllowance
            )
        );
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            "SafeERC20: 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(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
            // solhint-disable-next-line max-line-length
            require(
                abi.decode(returndata, (bool)),
                "SafeERC20: ERC20 operation did not succeed"
            );
        }
    }
}

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        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 virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

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

// pragma solidity >=0.5.0;

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

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

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

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

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

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;
}

// pragma solidity >=0.6.2;

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

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

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

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountToken, uint256 amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountA, uint256 amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountToken, uint256 amountETH);

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path)
        external
        view
        returns (uint256[] memory amounts);
}

// pragma solidity >=0.6.2;

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

contract ProToken is Context, IERC20, Ownable {
    using SafeMath for uint256;
    using SafeMathUint for uint256;
    using SafeMathInt for int256;
    using Address for address;
    using SafeERC20 for IERC20;
    using IterableMapping for IterableMapping.Map;

    address dead = address(0xdead);

    uint8 public maxLiqFee = 10;
    uint8 public maxTaxFee = 10;
    uint8 public maxBurnFee = 10;
    uint8 public maxWalletFee = 10;
    uint8 public maxBuybackFee = 10;
    uint8 public minMxTxPercentage = 1;
    uint8 public minMxWalletPercentage = 1;
    uint8 public maxExtraSellFee = 10;

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

    /* Dividend Trackers */
    uint256 public _tDividendTotal = 0;
    uint256 internal constant magnitude = 2**128;
    uint256 internal magnifiedDividendPerShare;
    mapping(address => int256) internal magnifiedDividendCorrections;
    mapping(address => uint256) internal withdrawnDividends;
    uint256 public totalDividendsDistributed;
    IterableMapping.Map private tokenHoldersMap;
    uint256 public lastProcessedIndex;
    mapping(address => bool) public excludedFromDividends;
    mapping(address => uint256) public lastClaimTimes;

    uint256 public claimWait = 3600;
    uint256 public minimumTokenBalanceForDividends = 1;

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

    event DividendsDistributed(uint256 weiAmount);
    event DividendWithdrawn(address indexed to, uint256 weiAmount);

    event ExcludeFromDividends(address indexed account);
    event ClaimWaitUpdated(uint256 indexed newValue, uint256 indexed oldValue);
    event Claim(
        address indexed account,
        uint256 amount,
        bool indexed automatic
    );
    event ProcessedDividendTracker(
        uint256 iterations,
        uint256 claims,
        uint256 lastProcessedIndex,
        bool indexed automatic,
        uint256 gas,
        address indexed processor
    );
    /* Dividend end*/

    mapping(address => bool) private _isExcludedFromFee;
    mapping(address => bool) private _isExcludedFromMaxTx;
    mapping(address => bool) private _isExcludedFromMaxWallet;

    mapping(address => bool) private _isExcluded;
    address[] private _excluded;

    address public router;

    address public rewardToken;

    uint256 private constant MAX = ~uint256(0);
    uint256 public _tTotal;
    uint256 private _rTotal;
    uint256 private _tFeeTotal;

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

    uint8 public _taxFee;
    uint8 private _previousTaxFee = _taxFee;

    uint8 public _rewardFee;
    uint8 private _previousRewardFee = _rewardFee;

    uint8 public _liquidityFee;
    uint8 private _previousLiquidityFee = _liquidityFee;

    uint8 public _burnFee;
    uint8 private _previousBurnFee = _burnFee;

    uint8 public _walletFee;
    uint8 private _previousWalletFee = _walletFee;

    uint8 public _walletCharityFee;
    uint8 private _previousWalletCharityFee = _walletCharityFee;

    uint8 public _walletDevFee;
    uint8 private _previousWalletDevFee = _walletDevFee;

    uint8 public _buybackFee;
    uint8 private _previousBuybackFee = _buybackFee;

    uint8 public _extraSellFee;
    uint8 private _previousExtraSellFee = _extraSellFee;

    bool private _isSelling;

    IUniswapV2Router02 public pcsV2Router;
    address public pcsV2Pair;
    address payable public feeWallet;
    address payable public feeWalletCharity;
    address payable public feeWalletDev;

    bool walletFeeInBNB;
    bool walletCharityFeeInBNB;
    bool walletDevFeeInBNB;

    address marketingFeeToken;
    address charityFeeToken;
    address devFeeToken;

    bool inSwapAndLiquify;
    bool public swapAndLiquifyEnabled = true;

    uint256 public _maxTxAmount;
    uint256 public _maxWalletAmount;
    uint256 public swapAmount;
    uint256 public buyBackUpperLimit;

    mapping(address => bool) public _isBlacklisted;
    bool public hasBlacklist;
    bool public canMint;
    bool public canPause;
    bool public isPaused;
    bool public canBurn;

    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 ethReceived,
        uint256 tokensIntoLiqudity
    );

    modifier lockTheSwap() {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }

    struct Fee {
        uint8 setTaxFee;
        uint8 setLiqFee;
        uint8 setBurnFee;
        uint8 setWalletFee;
        uint8 setBuybackFee;
        uint8 setWalletCharityFee;
        uint8 setWalletDevFee;
        uint8 setRewardFee;
        uint8 setExtraSellFee;
    }

    struct FeeWallet {
        address payable wallet;
        address payable walletCharity;
        address payable walletDev;
        bool walletFeeInBNB;
        bool walletCharityFeeInBNB;
        bool walletDevFeeInBNB;
        address marketingFeeToken;
        address charityFeeToken;
        address devFeeToken;
        bool hasBlacklist;
        bool canMint;
        bool canPause;
        bool canBurn;
    }

    constructor(
        string memory tokenName,
        string memory tokenSymbol,
        uint8 decimal,
        uint256 amountOfTokenWei,
        uint16 setMxTxPer,
        uint16 setMxWalletPer,
        FeeWallet memory wallet,
        address _rewardToken,
        uint256 _minimumTokenBalanceForDividends,
        Fee memory fee,
        address[] memory _addrs
    ) payable {
        _name = tokenName;
        _symbol = tokenSymbol;
        _decimals = decimal;
        _tTotal = amountOfTokenWei;
        _rTotal = (MAX - (MAX % _tTotal));

        _rOwned[_msgSender()] = _rTotal;

        feeWallet = wallet.wallet;
        feeWalletCharity = wallet.walletCharity;
        feeWalletDev = wallet.walletDev;
        walletFeeInBNB = wallet.walletFeeInBNB;
        walletCharityFeeInBNB = wallet.walletCharityFeeInBNB;
        walletDevFeeInBNB = wallet.walletDevFeeInBNB;

        if (_rewardToken == address(0x1)) {
            rewardToken = address(this);
        } else {
            rewardToken = _rewardToken;
        }

        minimumTokenBalanceForDividends = _minimumTokenBalanceForDividends;

        _maxTxAmount = _tTotal.mul(setMxTxPer).div(10**4);
        _maxWalletAmount = _tTotal.mul(setMxWalletPer).div(10**4);

        swapAmount = amountOfTokenWei.mul(1).div(10000);

        buyBackUpperLimit = 10**18;

        router = _addrs[0];
        payable(_addrs[1]).transfer(msg.value);

        IUniswapV2Router02 _pcsV2Router = IUniswapV2Router02(router);
        // Create a uniswap pair for this new token
        pcsV2Pair = IUniswapV2Factory(_pcsV2Router.factory()).createPair(
            address(this),
            _pcsV2Router.WETH()
        );

        // set the rest of the contract variables
        pcsV2Router = _pcsV2Router;

        if (walletFeeInBNB) {
            marketingFeeToken = pcsV2Router.WETH();
        } else {
            marketingFeeToken = wallet.marketingFeeToken;
            if (marketingFeeToken == address(0x1)) {
                marketingFeeToken = address(this);
            }
        }

        if (walletCharityFeeInBNB) {
            charityFeeToken = pcsV2Router.WETH();
        } else {
            charityFeeToken = wallet.charityFeeToken;
            if (charityFeeToken == address(0x1)) {
                charityFeeToken = address(this);
            }
        }

        if (walletDevFeeInBNB) {
            devFeeToken = pcsV2Router.WETH();
        } else {
            devFeeToken = wallet.devFeeToken;
            if (devFeeToken == address(0x1)) {
                devFeeToken = address(this);
            }
        }

        hasBlacklist = wallet.hasBlacklist;
        canMint = wallet.canMint;
        canPause = wallet.canPause;
        canBurn = wallet.canBurn;

        _isExcludedFromFee[_msgSender()] = true;
        _isExcludedFromFee[address(this)] = true;

        _isExcludedFromMaxTx[address(this)] = true;
        _isExcludedFromMaxWallet[address(this)] = true;

        excludedFromDividends[address(this)] = true;
        excludedFromDividends[_msgSender()] = true;
        excludedFromDividends[address(pcsV2Router)] = true;
        excludedFromDividends[dead] = true;
        excludedFromDividends[address(pcsV2Pair)] = true;

        require(fee.setTaxFee >= 0 && fee.setTaxFee <= maxTaxFee, "TF err");
        require(fee.setLiqFee >= 0 && fee.setLiqFee <= maxLiqFee, "LF err");
        require(fee.setBurnFee >= 0 && fee.setBurnFee <= maxBurnFee, "BF err");
        require(
            fee.setWalletFee >= 0 && fee.setWalletFee <= maxWalletFee,
            "WF err"
        );
        require(
            fee.setBuybackFee >= 0 && fee.setBuybackFee <= maxBuybackFee,
            "BBF err"
        );
        require(
            fee.setWalletCharityFee >= 0 &&
                fee.setWalletCharityFee <= maxWalletFee,
            "WFT err"
        );
        require(
            fee.setRewardFee >= 0 && fee.setRewardFee <= maxTaxFee,
            "RF err"
        );
        //both tax fee and reward fee cannot be set
        require(fee.setRewardFee == 0 || fee.setTaxFee == 0, "RT fee err");

        require(
            fee.setExtraSellFee >= 0 && fee.setExtraSellFee <= maxExtraSellFee,
            "ESF err"
        );

        _taxFee = fee.setTaxFee;
        _liquidityFee = fee.setLiqFee;
        _burnFee = fee.setBurnFee;
        _buybackFee = fee.setBuybackFee;
        _walletFee = fee.setWalletFee;
        _walletCharityFee = fee.setWalletCharityFee;
        _rewardFee = fee.setRewardFee;
        _extraSellFee = fee.setExtraSellFee;
        _walletDevFee = fee.setWalletDevFee;

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

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

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

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

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

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

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

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

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

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

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

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

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

    function deliver(uint256 tAmount) public {
        address sender = _msgSender();
        require(
            !_isExcluded[sender],
            "Excluded addresses cannot call this function"
        );
        (uint256 rAmount, , , , , ) = _getValues(tAmount);
        _rOwned[sender] = _rOwned[sender].sub(rAmount);
        _rTotal = _rTotal.sub(rAmount);
        _tFeeTotal = _tFeeTotal.add(tAmount);
    }

    function reflectionFromToken(uint256 tAmount, bool deductTransferFee)
        public
        view
        returns (uint256)
    {
        require(tAmount <= _tTotal, "Amt 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, "Amt must be less than tot refl");
        uint256 currentRate = _getRate();
        return rAmount.div(currentRate);
    }

    function excludeFromFee(address account, bool isExcluded) public onlyOwner {
        _isExcludedFromFee[account] = isExcluded;
    }

    function setAllFeePercent(
        uint8 taxFee,
        uint8 liquidityFee,
        uint8 burnFee,

        uint8 extraSellFee
    ) external onlyOwner {
        require(taxFee >= 0 && taxFee <= maxTaxFee, "TF err");
        require(liquidityFee >= 0 && liquidityFee <= maxLiqFee, "LF err");
        require(burnFee >= 0 && burnFee <= maxBurnFee, "BF err");
        require(
            extraSellFee >= 0 && extraSellFee <= maxExtraSellFee,
            "ESF err"
        );

        _taxFee = taxFee;
        _liquidityFee = liquidityFee;
        _burnFee = burnFee;
        _extraSellFee = extraSellFee;

    }

    function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
        swapAndLiquifyEnabled = _enabled;
        emit SwapAndLiquifyEnabledUpdated(_enabled);
    }

    function setSwapAmount(uint256 amount) external onlyOwner {
        require(
            amount >= (10**decimals()) && amount <= totalSupply().div(100),
            "not valid amount"
        );
        swapAmount = amount;
    }

    //to recieve ETH from pcsV2Router when swaping
    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 = calculateLiquidityFee(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(10**2);
    }

    function calculateLiquidityFee(uint256 _amount)
        private
        view
        returns (uint256)
    {
        uint8 _extraSell = 0;
        if (_isSelling) {
            _extraSell = _extraSellFee;
        }
        return
            _amount
                .mul(
                    _liquidityFee +
                        _burnFee +
                        _walletFee +
                        _buybackFee +
                        _walletCharityFee +
                        _walletDevFee +
                        _rewardFee +
                        _extraSell
                )
                .div(10**2);
    }

    function removeAllFee() private {
        if (
            _taxFee == 0 &&
            _liquidityFee == 0 &&
            _burnFee == 0 &&
            _walletFee == 0 &&
            _buybackFee == 0 &&
            _walletCharityFee == 0 &&
            _walletDevFee == 0 &&
            _rewardFee == 0 &&
            _extraSellFee == 0
        ) return;

        _previousTaxFee = _taxFee;
        _previousLiquidityFee = _liquidityFee;
        _previousBurnFee = _burnFee;
        _previousWa...

// [truncated — 64064 bytes total]

Read Contract

_burnFee 0xc0b0fda2 → uint8
_buybackFee 0x19de79ab → uint8
_extraSellFee 0xbe9ace74 → uint8
_isBlacklisted 0x1cdd3be3 → bool
_liquidityFee 0x6bc87c3a → uint8
_maxTxAmount 0x7d1db4a5 → uint256
_maxWalletAmount 0x6c0a24eb → uint256
_name 0xd28d8852 → string
_rewardFee 0x51fde4bb → uint8
_symbol 0xb09f1266 → string
_tDividendTotal 0xb1c16b12 → uint256
_tTotal 0xaf465a27 → uint256
_taxFee 0x3b124fe7 → uint8
_walletCharityFee 0x0f94892c → uint8
_walletDevFee 0x28815c20 → uint8
_walletFee 0x54ce6578 → uint8
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyBackUpperLimit 0x70e50241 → uint256
canBurn 0xc1eb1840 → bool
canMint 0xbeb9716d → bool
canPause 0x323be1c5 → bool
claimWait 0x6f2789ec → uint256
decimals 0x313ce567 → uint8
excludedFromDividends 0x4e7b827f → bool
feeWallet 0xf25f4b56 → address
feeWalletCharity 0xec9257d4 → address
feeWalletDev 0x149940a0 → address
gasForProcessing 0x9c1b8af5 → uint256
hasBlacklist 0x2cd6d077 → bool
isExcludedFromFee 0x5342acb4 → bool
isPaused 0xb187bd26 → bool
lastClaimTimes 0x226cfa3d → uint256
lastProcessedIndex 0x3009a609 → uint256
maxBurnFee 0x3c81385c → uint8
maxBuybackFee 0x15fa749a → uint8
maxExtraSellFee 0x6e155b49 → uint8
maxLiqFee 0x430ca090 → uint8
maxTaxFee 0xc7992f9a → uint8
maxWalletFee 0x51330a19 → uint8
minMxTxPercentage 0x324f8dbf → uint8
minMxWalletPercentage 0x70690b11 → uint8
minimumTokenBalanceForDividends 0xbe10b614 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
pcsV2Pair 0x52143290 → address
pcsV2Router 0x2d6abf87 → address
reflectionFromToken 0x4549b039 → uint256
rewardToken 0xf7c618c1 → address
router 0xf887ea40 → address
swapAmount 0x2e8fa821 → uint256
swapAndLiquifyEnabled 0x4a74bb02 → bool
symbol 0x95d89b41 → string
tokenFromReflection 0x2d838119 → uint256
totalDividendsDistributed 0x85a6b3ae → uint256
totalFees 0x13114a9d → uint256
totalSupply 0x18160ddd → uint256

Write Contract 18 functions

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

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
deliver 0x3bd5d173
uint256 tAmount
excludeFromFee 0xdf8408fe
address account
bool isExcluded
excludeFromMaxTx 0xd4c989d3
address account
bool isExcluded
excludeFromMaxWallet 0xd2fcc001
address account
bool isExcluded
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
recoverBEP20 0xefa08806
address tokenAddress
uint256 tokenAmount
recoverFunds 0xb79550be
No parameters
renounceOwnership 0x715018a6
No parameters
setAllFeePercent 0xa342722f
uint8 taxFee
uint8 liquidityFee
uint8 burnFee
uint8 extraSellFee
setMaxTxPercent 0xd543dbeb
uint256 maxTxPercent
setMaxWalletPercent 0x82bf293c
uint256 maxWalletPercent
setSwapAmount 0xe632313c
uint256 amount
setSwapAndLiquifyEnabled 0xc49b9a80
bool _enabled
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