Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0xf89e6e2B5BF87a669a3C4cF87f0946A02efBeEbf
Balance 0 ETH
Nonce 1
Code Size 9353 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

9353 bytes
0x6080604052600436106102605760003560e01c806388e765ff11610144578063c0246668116100b6578063e884f2601161007a578063e884f2601461076c578063eba4c33314610781578063f25f4b56146107a1578063f2fde38b146107c6578063f8b45b05146107e6578063fb1c3791146107fc57600080fd5b8063c0246668146106b6578063c876d0b9146106d6578063d257b34f146106f0578063dd62ed3e14610710578063e2f456051461075657600080fd5b806395d89b411161010857806395d89b41146105f25780639a7a23d614610607578063a457c2d714610627578063a9059cbb14610647578063b62496f514610667578063bbc0c7421461069757600080fd5b806388e765ff146105695780638a8c523c1461057f5780638da5cb5b1461059457806390a0bb35146105b2578063924de9b7146105d257600080fd5b806347062402116101dd5780636ddd1713116101a15780636ddd1713146104a957806370a08231146104c9578063715018a6146104ff57806371fc468814610514578063751039fc146105345780637571336a1461054957600080fd5b806347062402146103f657806349bd5a5e1461040c5780634a62bb65146104405780634fbee1931461045a57806366d602ae1461049357600080fd5b806318160ddd1161022457806318160ddd1461036557806323b872dd146103845780632b14ca56146103a4578063313ce567146103ba57806339509351146103d657600080fd5b806306fdde031461026c578063095ea7b3146102975780630f822e80146102c757806310d5de53146102e95780631694505e1461031957600080fd5b3661026757005b600080fd5b34801561027857600080fd5b5061028161081c565b60405161028e9190611fa5565b60405180910390f35b3480156102a357600080fd5b506102b76102b2366004612013565b6108ae565b604051901515815260200161028e565b3480156102d357600080fd5b506102e76102e2366004612055565b6108c5565b005b3480156102f557600080fd5b506102b761030436600461211a565b60126020526000908152604090205460ff1681565b34801561032557600080fd5b5061034d7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b03909116815260200161028e565b34801561037157600080fd5b506002545b60405190815260200161028e565b34801561039057600080fd5b506102b761039f366004612137565b610964565b3480156103b057600080fd5b5061037660105481565b3480156103c657600080fd5b506040516012815260200161028e565b3480156103e257600080fd5b506102b76103f1366004612013565b610a0e565b34801561040257600080fd5b50610376600f5481565b34801561041857600080fd5b5061034d7f00000000000000000000000028a19dd48b732ce10a05e683ccfca4aa21ed29a181565b34801561044c57600080fd5b50600c546102b79060ff1681565b34801561046657600080fd5b506102b761047536600461211a565b6001600160a01b031660009081526011602052604090205460ff1690565b34801561049f57600080fd5b50610376600a5481565b3480156104b557600080fd5b50600c546102b79062010000900460ff1681565b3480156104d557600080fd5b506103766104e436600461211a565b6001600160a01b031660009081526020819052604090205490565b34801561050b57600080fd5b506102e7610a4a565b34801561052057600080fd5b506102e761052f366004612178565b610a80565b34801561054057600080fd5b506102b7610b02565b34801561055557600080fd5b506102e76105643660046121a1565b610b3f565b34801561057557600080fd5b5061037660095481565b34801561058b57600080fd5b506102e7610c2a565b3480156105a057600080fd5b506005546001600160a01b031661034d565b3480156105be57600080fd5b506102e76105cd3660046121a1565b610c67565b3480156105de57600080fd5b506102e76105ed3660046121d6565b610cbc565b3480156105fe57600080fd5b50610281610d02565b34801561061357600080fd5b506102e76106223660046121a1565b610d11565b34801561063357600080fd5b506102b7610642366004612013565b610dec565b34801561065357600080fd5b506102b7610662366004612013565b610e85565b34801561067357600080fd5b506102b761068236600461211a565b60136020526000908152604090205460ff1681565b3480156106a357600080fd5b50600c546102b790610100900460ff1681565b3480156106c257600080fd5b506102e76106d13660046121a1565b610e92565b3480156106e257600080fd5b50600e546102b79060ff1681565b3480156106fc57600080fd5b506102b761070b366004612178565b610f1b565b34801561071c57600080fd5b5061037661072b3660046121f1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b34801561076257600080fd5b5061037660085481565b34801561077857600080fd5b506102b7611072565b34801561078d57600080fd5b506102e761079c366004612178565b6110af565b3480156107ad57600080fd5b5060075461034d9061010090046001600160a01b031681565b3480156107d257600080fd5b506102e76107e136600461211a565b61112e565b3480156107f257600080fd5b50610376600b5481565b34801561080857600080fd5b506102e761081736600461211a565b6111c6565b60606003805461082b9061222a565b80601f01602080910402602001604051908101604052809291908181526020018280546108579061222a565b80156108a45780601f10610879576101008083540402835291602001916108a4565b820191906000526020600020905b81548152906001019060200180831161088757829003601f168201915b5050505050905090565b60006108bb338484611258565b5060015b92915050565b6005546001600160a01b031633146108f85760405162461bcd60e51b81526004016108ef90612264565b60405180910390fd5b60005b81518110156109605760016006600084848151811061091c5761091c612299565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610958816122c5565b9150506108fb565b5050565b600061097184848461137c565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156109f65760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016108ef565b610a038533858403611258565b506001949350505050565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916108bb918590610a459086906122de565b611258565b6005546001600160a01b03163314610a745760405162461bcd60e51b81526004016108ef90612264565b610a7e6000611b0d565b565b6005546001600160a01b03163314610aaa5760405162461bcd60e51b81526004016108ef90612264565b600f819055600a8110610aff5760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f742073657420666565206d6f7265207468656e203925000000000060448201526064016108ef565b50565b6005546000906001600160a01b03163314610b2f5760405162461bcd60e51b81526004016108ef90612264565b50600c805460ff19169055600190565b6005546001600160a01b03163314610b695760405162461bcd60e51b81526004016108ef90612264565b80610bff577f00000000000000000000000028a19dd48b732ce10a05e683ccfca4aa21ed29a16001600160a01b0316826001600160a01b031603610bff5760405162461bcd60e51b815260206004820152602760248201527f43616e6e6f742072656d6f766520756e697377617020706169722066726f6d2060448201526636b0bc103a3c3760c91b60648201526084016108ef565b6001600160a01b03919091166000908152601260205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610c545760405162461bcd60e51b81526004016108ef90612264565b600c805462ffff00191662010100179055565b6005546001600160a01b03163314610c915760405162461bcd60e51b81526004016108ef90612264565b6001600160a01b03919091166000908152600660205260409020805460ff1916911515919091179055565b6005546001600160a01b03163314610ce65760405162461bcd60e51b81526004016108ef90612264565b600c8054911515620100000262ff000019909216919091179055565b60606004805461082b9061222a565b6005546001600160a01b03163314610d3b5760405162461bcd60e51b81526004016108ef90612264565b7f00000000000000000000000028a19dd48b732ce10a05e683ccfca4aa21ed29a16001600160a01b0316826001600160a01b031603610de25760405162461bcd60e51b815260206004820152603960248201527f54686520706169722063616e6e6f742062652072656d6f7665642066726f6d2060448201527f6175746f6d617465644d61726b65744d616b657250616972730000000000000060648201526084016108ef565b6109608282611b5f565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610e6e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016108ef565b610e7b3385858403611258565b5060019392505050565b60006108bb33848461137c565b6005546001600160a01b03163314610ebc5760405162461bcd60e51b81526004016108ef90612264565b6001600160a01b038216600081815260116020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6005546000906001600160a01b03163314610f485760405162461bcd60e51b81526004016108ef90612264565b620186a0610f5560025490565b610f609060016122f1565b610f6a9190612308565b821015610fd75760405162461bcd60e51b815260206004820152603560248201527f5377617020616d6f756e742063616e6e6f74206265206c6f776572207468616e60448201527410181718181892903a37ba30b61039bab838363c9760591b60648201526084016108ef565b6103e8610fe360025490565b610fee9060056122f1565b610ff89190612308565b8211156110645760405162461bcd60e51b815260206004820152603460248201527f5377617020616d6f756e742063616e6e6f742062652068696768657220746861604482015273371018171a92903a37ba30b61039bab838363c9760611b60648201526084016108ef565b50600881905560015b919050565b6005546000906001600160a01b0316331461109f5760405162461bcd60e51b81526004016108ef90612264565b50600e805460ff19169055600190565b6005546001600160a01b031633146110d95760405162461bcd60e51b81526004016108ef90612264565b6010819055600a8110610aff5760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f742073657420666565206d6f7265207468656e203925000000000060448201526064016108ef565b6005546001600160a01b031633146111585760405162461bcd60e51b81526004016108ef90612264565b6001600160a01b0381166111bd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108ef565b610aff81611b0d565b6005546001600160a01b031633146111f05760405162461bcd60e51b81526004016108ef90612264565b6007546040516001600160a01b036101009092048216918316907f5deb5ef622431f0df5a39b72dd556892f68ba42aa0f3aaf0800e166ce866492890600090a3600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b0383166112ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016108ef565b6001600160a01b03821661131b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016108ef565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166113a25760405162461bcd60e51b81526004016108ef9061232a565b6001600160a01b0382166113c85760405162461bcd60e51b81526004016108ef9061236f565b6001600160a01b03831660009081526006602052604090205460ff1615801561140a57506001600160a01b03821660009081526006602052604090205460ff16155b6114465760405162461bcd60e51b815260206004820152600d60248201526c165bdd48185c99481848189bdd609a1b60448201526064016108ef565b8060000361145f5761145a83836000611bb3565b505050565b600c5460ff16156116af576005546001600160a01b0384811691161480159061149657506005546001600160a01b03838116911614155b80156114aa57506001600160a01b03821615155b80156114c157506001600160a01b03821661dead14155b80156114d0575060075460ff16155b156116af57600c54610100900460ff16611568576001600160a01b03831660009081526011602052604090205460ff168061152357506001600160a01b03821660009081526011602052604090205460ff165b6115685760405162461bcd60e51b81526020600482015260166024820152752a3930b234b7339034b9903737ba1030b1ba34bb329760511b60448201526064016108ef565b600e5460ff16156116af576005546001600160a01b038381169116148015906115c357507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b031614155b801561160157507f00000000000000000000000028a19dd48b732ce10a05e683ccfca4aa21ed29a16001600160a01b0316826001600160a01b031614155b156116af57326000908152600d6020526040902054431161169c5760405162461bcd60e51b815260206004820152604960248201527f5f7472616e736665723a3a205472616e736665722044656c617920656e61626c60448201527f65642e20204f6e6c79206f6e652070757263686173652070657220626c6f636b6064820152681030b63637bbb2b21760b91b608482015260a4016108ef565b326000908152600d602052604090204390555b6001600160a01b03831660009081526013602052604090205460ff1680156116f057506001600160a01b03821660009081526012602052604090205460ff16155b156117d257600c5460ff1615611763576009548111156117635760405162461bcd60e51b815260206004820152602860248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201526736b0bc10313abc9760c11b60648201526084016108ef565b600b546001600160a01b03831660009081526020819052604090205461178990836122de565b11156117cd5760405162461bcd60e51b815260206004820152601360248201527213585e0815d85b1b195d08115e18d959591959606a1b60448201526064016108ef565b611912565b6001600160a01b03821660009081526013602052604090205460ff16801561181357506001600160a01b03831660009081526012602052604090205460ff16155b1561188857600c5460ff16156117cd57600a548111156117cd5760405162461bcd60e51b815260206004820152602a60248201527f53656c6c207472616e7366657220616d6f756e742065786365656473207468656044820152691036b0bc1039b2b6361760b11b60648201526084016108ef565b6001600160a01b03821660009081526012602052604090205460ff1661191257600b546001600160a01b0383166000908152602081905260409020546118ce90836122de565b11156119125760405162461bcd60e51b815260206004820152601360248201527213585e0815d85b1b195d08115e18d959591959606a1b60448201526064016108ef565b306000908152602081905260409020546008548110801590819061193e5750600c5462010000900460ff165b801561194d575060075460ff16155b801561197257506001600160a01b03851660009081526013602052604090205460ff16155b801561199757506001600160a01b03851660009081526011602052604090205460ff16155b80156119bc57506001600160a01b03841660009081526011602052604090205460ff16155b156119e1576007805460ff191660011790556119d6611d09565b6007805460ff191690555b6007546001600160a01b03861660009081526011602052604090205460ff91821615911680611a2857506001600160a01b03851660009081526011602052604090205460ff165b15611a31575060005b60008115611af9576001600160a01b03861660009081526013602052604090205460ff168015611a6357506000601054115b15611a8f57611a886064611a8260105488611dba90919063ffffffff16565b90611dcd565b9050611adb565b6001600160a01b03871660009081526013602052604090205460ff168015611ab957506000600f54115b15611adb57611ad86064611a82600f5488611dba90919063ffffffff16565b90505b8015611aec57611aec873083611bb3565b611af681866123b2565b94505b611b04878787611bb3565b50505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216600081815260136020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b6001600160a01b038316611bd95760405162461bcd60e51b81526004016108ef9061232a565b6001600160a01b038216611bff5760405162461bcd60e51b81526004016108ef9061236f565b6001600160a01b03831660009081526020819052604090205481811015611c775760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016108ef565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290611cae9084906122de565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611cfa91815260200190565b60405180910390a35b50505050565b3060009081526020819052604081205490818103611d25575050565b600854611d339060146122f1565b821115611d4b57600854611d489060146122f1565b91505b47611d5583611dd9565b6000611d614783611f99565b90508015611d03576007546040516101009091046001600160a01b0316908290600081818185875af1925050503d8060008114611b04576040519150601f19603f3d011682016040523d82523d6000602084013e611b04565b6000611dc682846122f1565b9392505050565b6000611dc68284612308565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611e0e57611e0e612299565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb091906123c5565b81600181518110611ec357611ec3612299565b60200260200101906001600160a01b031690816001600160a01b031681525050611f0e307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84611258565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac94790611f639085906000908690309042906004016123e2565b600060405180830381600087803b158015611f7d57600080fd5b505af1158015611f91573d6000803e3d6000fd5b505050505050565b6000611dc682846123b2565b600060208083528351808285015260005b81811015611fd257858101830151858201604001528201611fb6565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610aff57600080fd5b803561106d81611ff3565b6000806040838503121561202657600080fd5b823561203181611ff3565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561206857600080fd5b823567ffffffffffffffff8082111561208057600080fd5b818501915085601f83011261209457600080fd5b8135818111156120a6576120a661203f565b8060051b604051601f19603f830116810181811085821117156120cb576120cb61203f565b6040529182528482019250838101850191888311156120e957600080fd5b938501935b8285101561210e576120ff85612008565b845293850193928501926120ee565b98975050505050505050565b60006020828403121561212c57600080fd5b8135611dc681611ff3565b60008060006060848603121561214c57600080fd5b833561215781611ff3565b9250602084013561216781611ff3565b929592945050506040919091013590565b60006020828403121561218a57600080fd5b5035919050565b8035801515811461106d57600080fd5b600080604083850312156121b457600080fd5b82356121bf81611ff3565b91506121cd60208401612191565b90509250929050565b6000602082840312156121e857600080fd5b611dc682612191565b6000806040838503121561220457600080fd5b823561220f81611ff3565b9150602083013561221f81611ff3565b809150509250929050565b600181811c9082168061223e57607f821691505b60208210810361225e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016122d7576122d76122af565b5060010190565b808201808211156108bf576108bf6122af565b80820281158282048414176108bf576108bf6122af565b60008261232557634e487b7160e01b600052601260045260246000fd5b500490565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b818103818111156108bf576108bf6122af565b6000602082840312156123d757600080fd5b8151611dc681611ff3565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156124325784516001600160a01b03168352938301939183019160010161240d565b50506001600160a01b0396909616606085015250505060800152939250505056fea26469706673582212201455a9dd3d5e5dfdaf5beafbd0bf74ab18a63010bf5db3b83e2cdb1bb475884964736f6c63430008110033

Verified Source Code Partial Match

Compiler: v0.8.17+commit.8df45f5f EVM: london Optimization: Yes (200 runs)
SkyProtocol.sol 1418 lines
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.17 >=0.8.10 >=0.8.0 <0.9.0;
pragma experimental ABIEncoderV2;
////// lib/openzeppelin-contracts/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

/* pragma solidity ^0.8.0; */

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

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

////// lib/openzeppelin-contracts/contracts/access/Ownable.sol
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

/* pragma solidity ^0.8.0; */

/* import "../utils/Context.sol"; */

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

/* pragma solidity ^0.8.0; */

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `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);
}

////// lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol)

/* pragma solidity ^0.8.0; */

/* import "../IERC20.sol"; */

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

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

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

////// lib/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol)

/* pragma solidity ^0.8.0; */

/* import "./IERC20.sol"; */
/* import "./extensions/IERC20Metadata.sol"; */
/* import "../../utils/Context.sol"; */

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

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

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

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

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

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

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

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

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

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

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

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

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

////// lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol
// OpenZeppelin Contracts v4.4.0 (utils/math/SafeMath.sol)

/* pragma solidity ^0.8.0; */

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

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

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

////// src/IUniswapV2Factory.sol
/* pragma solidity 0.8.10; */
/* pragma experimental ABIEncoderV2; */

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

////// src/IUniswapV2Pair.sol
/* pragma solidity 0.8.10; */
/* pragma experimental ABIEncoderV2; */

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

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

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

    function decimals() external pure returns (uint8);

    function totalSupply() external view returns (uint256);

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

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

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

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);

    function PERMIT_TYPEHASH() external pure returns (bytes32);

    function nonces(address owner) external view returns (uint256);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function factory() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to)
        external
        returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

////// src/IUniswapV2Router02.sol
/* pragma solidity 0.8.10; */
/* pragma experimental ABIEncoderV2; */

interface IUniswapV2Router02 {
    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 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 SkyProtocol is ERC20, Ownable {
    using SafeMath for uint256;

    IUniswapV2Router02 public immutable uniswapV2Router;
    address public immutable uniswapV2Pair;
    mapping (address => bool) private _blacklist;

    bool private swapping;

    address public feeWallet;

    uint256 public swapTokensAtAmount;

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

    bool public limitsInEffect = true;
    bool public tradingActive = false;
    bool public swapEnabled = false;

    // Anti-bot and anti-whale mappings and variables
    mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
    bool public transferDelayEnabled = true;

    uint256 public buyFee;

    uint256 public sellFee;

    /******************/

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


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

    event ExcludeFromFees(address indexed account, bool isExcluded);

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

    event feeWalletUpdated(
        address indexed newWallet,
        address indexed oldWallet
    );


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

    event AutoNukeLP();

    event ManualNukeLP();
    event MaxTransactionExclusion(address _address, bool excluded);

    constructor() ERC20("Sky Protocol", "SKY") {
        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
        );


        uniswapV2Router = _uniswapV2Router;

        uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory())
            .createPair(address(this), _uniswapV2Router.WETH());
        _excludeFromMaxTransaction(address(uniswapV2Pair),true);
        _setAutomatedMarketMakerPair(address(uniswapV2Pair), true);


        uint256 totalSupply = 1_000_000 * 1e18;

        swapTokensAtAmount = (totalSupply * 5) / 10000; // 0.05% swap wallet

        maxBuyAmount = (totalSupply * 1) / 100; // 1%
        maxSellAmount = (totalSupply * 1) / 100; // 1%
        maxWallet = (totalSupply * 2) / 100; // 2%

        buyFee = 20; // sniper protection, to be lowered to 9% after launch
        sellFee = 20; // sniper protection, to be lowered to 9% after launch

        feeWallet = address(0x00a5D9598c55c33B70d7b65089A6921AA14b0F6C); // set as feewallet

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

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

        /*
            _mint is an internal function in ERC20.sol that is only called here,
            and CANNOT be called ever again
        */
        _mint(msg.sender, totalSupply);
    }

    receive() external payable {}

    // once enabled, can never be turned off
    function enableTrading() external onlyOwner {
        tradingActive = true;
        swapEnabled = true;
    }

    // remove limits after token is stable
    function removeLimits() external onlyOwner returns (bool) {
        limitsInEffect = false;
        return true;
    }

    // disable Transfer delay - cannot be reenabled
    function disableTransferDelay() external onlyOwner returns (bool) {
        transferDelayEnabled = false;
        return true;
    }

    // change the minimum amount of tokens to sell from fees
    function updateSwapTokensAtAmount(uint256 newAmount)
        external
        onlyOwner
        returns (bool)
    {
        require(
            newAmount >= (totalSupply() * 1) / 100000,
            "Swap amount cannot be lower than 0.001% total supply."
        );
        require(
            newAmount <= (totalSupply() * 5) / 1000,
            "Swap amount cannot be higher than 0.5% total supply."
        );
        swapTokensAtAmount = newAmount;
        return true;
    }


    // only use to disable contract sales if absolutely necessary (emergency use only)
    function updateSwapEnabled(bool enabled) external onlyOwner {
        swapEnabled = enabled;
    }

    function updateBuyFees(
       uint256 _fee
    ) external onlyOwner {
        buyFee = _fee;
        require(_fee<10,"Cannot set fee more then 9%");
    }

    function updateSellFees(
        uint256 _fee
    ) external onlyOwner {
        sellFee = _fee;
        require(_fee<10,"Cannot set fee more then 9%");
    }

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

    function _excludeFromMaxTransaction(address updAds, bool isExcluded)
        private
    {
        _isExcludedMaxTransactionAmount[updAds] = isExcluded;
        emit MaxTransactionExclusion(updAds, isExcluded);
    }

    function excludeFromMaxTransaction(address updAds, bool isEx)
        external
        onlyOwner
    {
        if (!isEx) {
            require(
                updAds != uniswapV2Pair,
                "Cannot remove uniswap pair from max txn"
            );
        }
        _isExcludedMaxTransactionAmount[updAds] = isEx;
    }

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

        _setAutomatedMarketMakerPair(pair, value);
    }

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

        emit SetAutomatedMarketMakerPair(pair, value);
    }

    function updatefeeWallet(address _feewallet)
        external
        onlyOwner
    {
        emit feeWalletUpdated(_feewallet, feeWallet);
        feeWallet = _feewallet;
    }

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

    event BoughtEarly(address indexed sniper);

    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");
        require(!_blacklist[from] && !_blacklist[to], "You are a bot");

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

        if (limitsInEffect){
            if (
                from != owner() &&
                to != owner() &&
                to != address(0) &&
                to != address(0xdead) &&
                !swapping
            ) {
                if (!tradingActive) {
                    require(
                        _isExcludedFromFees[from] || _isExcludedFromFees[to],
                        "Trading is not active."
                    );
                }

                // at launch if the transfer delay is enabled, ensure the block timestamps for purchasers is set -- during launch.
                if (transferDelayEnabled) {
                    if (
                        to != owner() &&
                        to != address(uniswapV2Router) &&
                        to != address(uniswapV2Pair)
                    ) {
                        require(
                            _holderLastTransferTimestamp[tx.origin] <
                                block.number,
                            "_transfer:: Transfer Delay enabled.  Only one purchase per block allowed."
                        );
                        _holderLastTransferTimestamp[tx.origin] = block.number;
                    }
                }
            }
        }
                if (
                    automatedMarketMakerPairs[from] &&
                    !_isExcludedMaxTransactionAmount[to]
                ) {
                    if (limitsInEffect){
                        require(
                        amount <= maxBuyAmount,
                        "Buy transfer amount exceeds the max buy."
                    );
                    }
                    require(
                        amount + balanceOf(to) <= maxWallet,
                        "Max Wallet Exceeded"
                    );
                }
                //when sell
                else if (
                    automatedMarketMakerPairs[to] &&
                    !_isExcludedMaxTransactionAmount[from]
                ) {
                    if (limitsInEffect){
                        require(
                            amount <= maxSellAmount,
                            "Sell transfer amount exceeds the max sell."
                        );
                    }
                } else if (!_isExcludedMaxTransactionAmount[to]) {
                    require(
                        amount + balanceOf(to) <= maxWallet,
                        "Max Wallet Exceeded"
                    );
                }

        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 = !swapping;

        // 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) {
            // on sell
            if (automatedMarketMakerPairs[to] && sellFee > 0) {
                fees = amount.mul(sellFee).div(100);
            }
            // on buy
            else if (automatedMarketMakerPairs[from] && buyFee > 0) {
                fees = amount.mul(buyFee).div(100);
            }

            if (fees > 0) {
                super._transfer(from, address(this), fees);
            }

            amount -= fees;
        }

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

    function addBL(address account, bool isBlacklisted) public onlyOwner {
        _blacklist[account] = isBlacklisted;
    }
 
    function multiBL(address[] memory multiblacklist_) public onlyOwner {
        for (uint256 i = 0; i < multiblacklist_.length; i++) {
            _blacklist[multiblacklist_[i]] = true;
        }
    }

    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] = uniswapV2Router.WETH();

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

        // make the swap
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0, // accept any amount of ETH
            path,
            address(this),
            block.timestamp
        );
    }


    function swapBack() private {
        uint256 contractBalance = balanceOf(address(this));
        bool success;

        if (contractBalance == 0 ) {
            return;
        }

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

        uint256 initialETHBalance = address(this).balance;
        swapTokensForEth(contractBalance);
        uint256 deltaETH = address(this).balance.sub(initialETHBalance);
        // transfer to fee wallet
        if (deltaETH > 0) {
            (success,) = feeWallet.call{value: deltaETH}("");
        }
        
    }
}

Read Contract

_isExcludedMaxTransactionAmount 0x10d5de53 → bool
allowance 0xdd62ed3e → uint256
automatedMarketMakerPairs 0xb62496f5 → bool
balanceOf 0x70a08231 → uint256
buyFee 0x47062402 → uint256
decimals 0x313ce567 → uint8
feeWallet 0xf25f4b56 → address
isExcludedFromFees 0x4fbee193 → bool
limitsInEffect 0x4a62bb65 → bool
maxBuyAmount 0x88e765ff → uint256
maxSellAmount 0x66d602ae → uint256
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sellFee 0x2b14ca56 → uint256
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmount 0xe2f45605 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
tradingActive 0xbbc0c742 → bool
transferDelayEnabled 0xc876d0b9 → bool
uniswapV2Pair 0x49bd5a5e → address
uniswapV2Router 0x1694505e → address

Write Contract 20 functions

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

addBL 0x90a0bb35
address account
bool isBlacklisted
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
disableTransferDelay 0xe884f260
No parameters
returns: bool
enableTrading 0x8a8c523c
No parameters
excludeFromFees 0xc0246668
address account
bool excluded
excludeFromMaxTransaction 0x7571336a
address updAds
bool isEx
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
multiBL 0x0f822e80
address[] multiblacklist_
removeLimits 0x751039fc
No parameters
returns: bool
renounceOwnership 0x715018a6
No parameters
setAutomatedMarketMakerPair 0x9a7a23d6
address pair
bool value
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateBuyFees 0x71fc4688
uint256 _fee
updateSellFees 0xeba4c333
uint256 _fee
updateSwapEnabled 0x924de9b7
bool enabled
updateSwapTokensAtAmount 0xd257b34f
uint256 newAmount
returns: bool
updatefeeWallet 0xfb1c3791
address _feewallet

Recent Transactions

No transactions found for this address