Contract 0x47e28936d9c7944d106e46295d87a8e4c1be818c 2

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x34f3013c20a618a274af02fa79a6e05508c88fd68973449c909090ade754e71fClaim BNB Reward121573142021-10-28 7:02:041 hr 2 mins ago0x9bda8a47e34a06a23b6e1851f011734a073f18c5 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00131778
0x4b02bdb659f12471e74a5bb6c571854aac28bfb6a2df105619554215f5821dc6Approve121570712021-10-28 6:49:551 hr 14 mins ago0x6c8fa94b9fa3a7098078b247cdd3aad833dfe92d IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.000223095
0x2c288a934cd607cf888b4cd506f4560e3d36e17f272a741d9c03d472c2497045Claim BNB Reward121269062021-10-27 5:17:021 day 2 hrs ago0x14e0f7ec96c33857c76a22870916029a673fb739 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00131778
0xcb932bd5fdbc8d04cd95006c3243d3e6b19fbb0aafc9de23cfa3d42c74670a3dApprove120945072021-10-26 2:04:482 days 5 hrs ago0xb2fbcadaa1c9738438821f619a2f5365d8da6690 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.0000745518
0xf88bd5ad3b52bed0dd57122830cc8d61d7b60e4fb5037b7c79fb01febd6b1c51Claim BNB Reward120812002021-10-25 14:58:032 days 17 hrs ago0xeaf1d8acad35e84401154a68804c018088a55a7c IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00131778
0x9260cd5cea69202fb6e7e8177805a5ebb8802cb44de78eb6ea96cfff8b51bc33Approve120446502021-10-24 8:02:584 days 1 min ago0x76e6cd748d888156f2633ffde45e6659f12696ad IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.0000745518
0x7ffe6c8266556ed7284a137ac6b2553af87ff7d8b95190df994237b35aa87070Claim BNB Reward120400422021-10-24 4:10:124 days 3 hrs ago0xec0664b7a8875f7453b7168c09962b93611c9ce8 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00131778
0xdbf0e25ec43b871742745cc553100ad4d2c22bb4bf0b9ca1e4afc52f7a8eb8bdApprove120245842021-10-23 15:13:594 days 16 hrs ago0xa4c6ab5f9a623bb1da2e2dd182727b2a5914621f IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.0000745518
0x998a96c18cb502f4e171d5f7e449c50a3ace952ca33a92228fc2e4353d6cc8d0Transfer120131922021-10-23 5:41:555 days 2 hrs ago0x2d5e814f32940972563fa36df22acdba6955b5ce IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.0049732905
0xcbded2628c1f1fc25cf3c439e9233602ac001afb63e124f24955b27d30ad1e7eClaim BNB Reward120095482021-10-23 2:35:385 days 5 hrs ago0x4bc59999f9dadff96a0478d44966bdb9528a6890 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00131778
0x97fdde70cfd2c4d64f6aba41242bfab3ea3eca3947c6f7d20bd0b5cbfd818b76Approve120011912021-10-22 19:33:055 days 12 hrs ago0xf22c71677c8b7b0497f579ee9701daf04b0144cf IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.000223095
0xe42f59b0b16cbbaa043f8962752df48c09c51d8789efd6b00577e560d877d986Claim BNB Reward119936592021-10-22 13:14:105 days 18 hrs ago0xf3e0b65862dce0bff77d4b6bc869c8c55969145e IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00131778
0x8584d6e915a2765281645f1aac3c7236cf83828db27880841479aa7e57385f9dApprove119791512021-10-22 0:40:506 days 7 hrs ago0xbcb3b7cbe0c57f929760378d2707ba8b96e9511d IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.000223095
0x93e3cc01f927aa07345cd1b7f85653d88b776aef7e45c5b7d528324cee8e7ef0Approve119674792021-10-21 14:52:396 days 17 hrs ago0xab71ae67b4f1735234eed73696023f75e219213f IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00007309
0x55b4e57ddb5dd84808576bd0e6915a2c39df9c5d9f64c14c511f4436be277b3bApprove119599832021-10-21 8:22:156 days 23 hrs ago0xa243f59d627bb38659923b9e6b3abe996a144173 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.000223095
0x7d8bd1c59b0380db8d6cbc1e9de406743d0f986eefcac26d64fd698347bf9358Approve119406072021-10-20 16:00:097 days 16 hrs ago0xb3035cfd8eac5c292d0b326dcbfd2d431b4d99b5 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.000312333
0x80cbe2bbaf9d120b0c4bcb34a5611727c7e65addd684bc053209ec1fd3370031Approve119229512021-10-20 1:11:488 days 6 hrs ago0x3f801be9d50159de202ec126099457795494f6a1 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00007309
0x1508482e0e239725a1ae61f156c2b54bdf6ec61949fa3148d8ed2b6053e2e735Approve119210082021-10-19 23:33:398 days 8 hrs ago0x2616d29da22f9c69bdaeb253e591fa26d8947906 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00007309
0xc1c476bbb183462cb78a4453489a9d4c56b00984a2f6fe7deccb592e0f74d12dApprove119201442021-10-19 22:50:028 days 9 hrs ago0x98deacb7b3fe693227bd4357769f4e27b21eda43 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.000223095
0x6d6380031930e823b2c9049bfb1e5ec332ba216a4301bf7063b2f64347326dddApprove119173972021-10-19 20:31:148 days 11 hrs ago0x4d4fd8319bdc7955b2247ed069af2ef155b6296b IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00007309
0xb9d4b0d9833d545e17844836ba4d1e7662beda5eabdb82bad360a54af5cacd5fApprove118545272021-10-17 15:23:1710 days 16 hrs ago0x7ecab74478eb2c776726d463fde60115b7f87a90 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.000102326
0x9fa25f1f5db328da80688df6bd911d15154eb6febdda71f85995f4bc5a3999b0Transfer118470112021-10-17 9:03:5110 days 23 hrs ago0x2a88bf3d746f701eec50c4e20477cf1d0bc21626 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.004728185
0xfdb4c45f7507f727ec8c7afb45d53df6f57a124ebd4155f98b00ef11ab014d4bClaim BNB Reward118411342021-10-17 4:09:5611 days 3 hrs ago0xec0664b7a8875f7453b7168c09962b93611c9ce8 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00131778
0x9a733ea6bcda7649833a835e4b22c0415f2f27c9b20cd593373cb84fb1045181Transfer117961372021-10-15 14:29:3912 days 17 hrs ago0x2a88bf3d746f701eec50c4e20477cf1d0bc21626 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.004875715
0x7a6478de0819152188138507a6806a27c620d9b83d92da5fd26acaca378bbf33Transfer117960692021-10-15 14:26:0912 days 17 hrs ago0x2a88bf3d746f701eec50c4e20477cf1d0bc21626 IN  0x47e28936d9c7944d106e46295d87a8e4c1be818c0 BNB0.00013351
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x34f3013c20a618a274af02fa79a6e05508c88fd68973449c909090ade754e71f121573142021-10-28 7:02:041 hr 2 mins ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c0x9bda8a47e34a06a23b6e1851f011734a073f18c50.000265197786086859 BNB
0xe0bcfc69531b68adf4a6e23446046895705aff6c666c58ecf7efabcc36744e1e121570832021-10-28 6:50:311 hr 14 mins ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003019216142651513 BNB
0xe0bcfc69531b68adf4a6e23446046895705aff6c666c58ecf7efabcc36744e1e121570832021-10-28 6:50:311 hr 14 mins ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009057648427954541 BNB
0xce8b4a66b44cc9b21851107d193d8a2ce8ecde072062fde821a1442a47f34e17121392382021-10-27 15:57:0116 hrs 7 mins ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003019387768542049 BNB
0xce8b4a66b44cc9b21851107d193d8a2ce8ecde072062fde821a1442a47f34e17121392382021-10-27 15:57:0116 hrs 7 mins ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009058163305626149 BNB
0x2c288a934cd607cf888b4cd506f4560e3d36e17f272a741d9c03d472c2497045121269062021-10-27 5:17:021 day 2 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c0x14e0f7ec96c33857c76a22870916029a673fb7390.00011979628228175 BNB
0xf88bd5ad3b52bed0dd57122830cc8d61d7b60e4fb5037b7c79fb01febd6b1c51120812002021-10-25 14:58:032 days 17 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c0xeaf1d8acad35e84401154a68804c018088a55a7c0.001281241663617517 BNB
0x8259086c38fa5fbff15b48af672ce4eba818fa69c7b5a184a1f3cf07ae702430120438562021-10-24 7:22:554 days 41 mins ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003019550821525137 BNB
0x8259086c38fa5fbff15b48af672ce4eba818fa69c7b5a184a1f3cf07ae702430120438562021-10-24 7:22:554 days 41 mins ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009058652464575411 BNB
0x7ffe6c8266556ed7284a137ac6b2553af87ff7d8b95190df994237b35aa87070120400422021-10-24 4:10:124 days 3 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c0xec0664b7a8875f7453b7168c09962b93611c9ce80.003616367532960029 BNB
0x44ae3ccf91e1c8b33eb37f095926de813aa77bbd8284881e11dfddfb462a1bc9120290892021-10-23 19:00:434 days 13 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003019682938289946 BNB
0x44ae3ccf91e1c8b33eb37f095926de813aa77bbd8284881e11dfddfb462a1bc9120290892021-10-23 19:00:434 days 13 hrs ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009059048814869839 BNB
0x998a96c18cb502f4e171d5f7e449c50a3ace952ca33a92228fc2e4353d6cc8d0120131922021-10-23 5:41:555 days 2 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003019750749565992 BNB
0x998a96c18cb502f4e171d5f7e449c50a3ace952ca33a92228fc2e4353d6cc8d0120131922021-10-23 5:41:555 days 2 hrs ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009059252248697977 BNB
0xcbded2628c1f1fc25cf3c439e9233602ac001afb63e124f24955b27d30ad1e7e120095482021-10-23 2:35:385 days 5 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c0x4bc59999f9dadff96a0478d44966bdb9528a68900.000069844505850564 BNB
0x05f048506e4ccbfd724ee4427ef07a64c9ae0c33b916875280f3e9d0316e0e96120012252021-10-22 19:34:495 days 12 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003019991265610781 BNB
0x05f048506e4ccbfd724ee4427ef07a64c9ae0c33b916875280f3e9d0316e0e96120012252021-10-22 19:34:495 days 12 hrs ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009059973796832345 BNB
0xbf62265a6205b76a7eb5ac872bcf5289659d921617e780e583e89825ce5a0c9e119967072021-10-22 15:46:575 days 16 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003020144133487228 BNB
0xbf62265a6205b76a7eb5ac872bcf5289659d921617e780e583e89825ce5a0c9e119967072021-10-22 15:46:575 days 16 hrs ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009060432400461685 BNB
0xe42f59b0b16cbbaa043f8962752df48c09c51d8789efd6b00577e560d877d986119936592021-10-22 13:14:105 days 18 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c0xf3e0b65862dce0bff77d4b6bc869c8c55969145e0.000138507150182579 BNB
0x3d9516c55f0b2a9d28d961f3f17108b1ea13df2ac7450c341c5b22f59ff5f963119791602021-10-22 0:41:176 days 7 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003020459506007507 BNB
0x3d9516c55f0b2a9d28d961f3f17108b1ea13df2ac7450c341c5b22f59ff5f963119791602021-10-22 0:41:176 days 7 hrs ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009061378518022521 BNB
0xddba4c1e7f650e0f85473191a6f7631c5070af84c0bb3f5e819ae9812359d4e3119599872021-10-21 8:22:316 days 23 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003021460330428714 BNB
0xddba4c1e7f650e0f85473191a6f7631c5070af84c0bb3f5e819ae9812359d4e3119599872021-10-21 8:22:316 days 23 hrs ago PancakeSwap: Router v2 0x47e28936d9c7944d106e46295d87a8e4c1be818c0.009064380991286142 BNB
0x8e5d4ded5fd2d1d3d35236b621c29b84fed229cd443df186fe017d7b9e2bd5ea119410032021-10-20 16:19:577 days 15 hrs ago 0x47e28936d9c7944d106e46295d87a8e4c1be818c PancakeSwap: Router v20.003021652175783888 BNB
[ Download CSV Export 
Loading
This contract contains unverified libraries: Utils

Contract Source Code Verified (Exact Match)

Contract Name:
Moonbar

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : Moonbar.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

import "./interfaces/IPancakeFactory.sol";
import "./interfaces/IPancakePair.sol";
import "./interfaces/IPancakeRouter.sol";
import "./libraries/Utils.sol";

// solhint-disable-next-line max-states-count
contract Moonbar is Context, IERC20, Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using Address for address;

    mapping(address => uint256) private rOwned;
    mapping(address => uint256) private tOwned;
    mapping(address => mapping(address => uint256)) private allowances;

    mapping(address => bool) private isExcludedFromFee;
    mapping(address => bool) private isExcluded;
    mapping(address => bool) private isExcludedFromMaxTx;

    address[] private excluded;

    uint256 private constant MAX = ~uint256(0);
    uint256 private tTotal = 1000000000 * 10**9; // 1 Billion * decimals
    uint256 private rTotal = (MAX - (MAX % tTotal));
    uint256 private tFeeTotal;

    string private _name = "MOONBAR";
    string private _symbol = "MOONBAR";
    uint8 private _decimals = 9;

    IPancakeRouter02 public immutable pancakeRouter;
    address public immutable pancakePair;

    bool private inSwapAndLiquify = false;

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

    event ClaimBNBSuccessfully(address recipient, uint256 ethReceived, uint256 nextAvailableClaimDate);

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

    constructor(address payable routerAddress) {
        rOwned[_msgSender()] = rTotal;

        IPancakeRouter02 _pancakeRouter = IPancakeRouter02(routerAddress);
        // Create a pancake pair for this new token
        pancakePair = IPancakeFactory(_pancakeRouter.factory()).createPair(address(this), _pancakeRouter.WETH());

        // set the rest of the contract variables
        pancakeRouter = _pancakeRouter;

        //exclude owner and this contract from fee
        isExcludedFromFee[owner()] = true;
        isExcludedFromFee[address(this)] = true;

        // exclude from max tx
        isExcludedFromMaxTx[owner()] = true;
        isExcludedFromMaxTx[address(this)] = true;
        isExcludedFromMaxTx[address(0x000000000000000000000000000000000000dEaD)] = true;
        isExcludedFromMaxTx[address(0)] = true;

        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, 0);
        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, 0);
        _approve(
            _sender,
            _msgSender(),
            allowances[_sender][_msgSender()].sub(_amount, "BEP20: 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, "BEP20: decreased allowance below zero")
        );
        return true;
    }

    function isExcludedFromReward(address _account) public view returns (bool) {
        return isExcluded[_account];
    }

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

    function 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, "Amount must be less than supply");
        if (!_deductTransferFee) {
            (uint256 rAmount, , , , , ) = _getValues(_tAmount);
            return rAmount;
        } else {
            (, uint256 rTransferAmount, , , , ) = _getValues(_tAmount);
            return rTransferAmount;
        }
    }

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

    /** @dev excludes an address from reward */
    function excludeFromReward(address _account) public onlyOwner {
        require(!isExcluded[_account], "Account is already excluded");
        if (rOwned[_account] > 0) {
            tOwned[_account] = tokenFromReflection(rOwned[_account]);
        }
        isExcluded[_account] = true;
        excluded.push(_account);
    }

    /** @dev includes an address that was excluded to rewards */
    function includeInReward(address _account) external onlyOwner {
        require(isExcluded[_account], "Account is already included");
        for (uint256 i = 0; i < excluded.length; i++) {
            if (excluded[i] == _account) {
                excluded[i] = excluded[excluded.length - 1];
                tOwned[_account] = 0;
                isExcluded[_account] = false;
                excluded.pop();
                break;
            }
        }
    }

    function _transferBothExcluded(
        address _sender,
        address _recipient,
        uint256 _tAmount
    ) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) =
            _getValues(_tAmount);
        tOwned[_sender] = tOwned[_sender].sub(_tAmount);
        rOwned[_sender] = rOwned[_sender].sub(rAmount);
        tOwned[_recipient] = tOwned[_recipient].add(tTransferAmount);
        rOwned[_recipient] = rOwned[_recipient].add(rTransferAmount);
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(_sender, _recipient, tTransferAmount);
    }

    /** @dev excludes an address from fee */
    function excludeFromFee(address _account) public onlyOwner {
        isExcludedFromFee[_account] = true;
    }

    /** @dev includes an address to pay fees */
    function includeInFee(address _account) public onlyOwner {
        isExcludedFromFee[_account] = false;
    }

    /** @dev sets tax fee percentage */
    function setTaxFeePercent(uint256 _taxFee) external onlyOwner {
        taxFee = _taxFee;
    }

    /** @dev sets liquidity fee percentage */
    function setLiquidityFeePercent(uint256 _liquidityFee) external onlyOwner {
        liquidityFee = _liquidityFee;
    }

    /** @dev enables/disables swap and liquify */
    function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
        swapAndLiquifyEnabled = _enabled;
        emit SwapAndLiquifyEnabledUpdated(_enabled);
    }

    // to receive BNB from pancakeRouter when swapping
    // solhint-disable-next-line no-empty-blocks
    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) {
        return _amount.mul(liquidityFee).div(10**2);
    }

    function removeAllFee() private {
        if (taxFee == 0 && liquidityFee == 0) return;

        previousTaxFee = taxFee;
        previousLiquidityFee = liquidityFee;

        taxFee = 0;
        liquidityFee = 0;
    }

    function restoreAllFee() private {
        taxFee = previousTaxFee;
        liquidityFee = previousLiquidityFee;
    }

    function accIsExcludedFromFee(address _account) public view returns (bool) {
        return isExcludedFromFee[_account];
    }

    function _approve(
        address _owner,
        address _spender,
        uint256 _amount
    ) private {
        require(_owner != address(0), "BEP20: approve from the zero address");
        require(_spender != address(0), "BEP20: approve to the zero address");

        allowances[_owner][_spender] = _amount;
        emit Approval(_owner, _spender, _amount);
    }

    function _transfer(
        address _from,
        address _to,
        uint256 _amount,
        uint256 _value
    ) private {
        require(_from != address(0), "BEP20: transfer from zero address");
        require(_to != address(0), "BEP20: transfer to zero address");
        require(_amount > 0, "Transfer amount must be greater than zero");

        ensureMaxTxAmount(_from, _to, _amount, _value);

        // swap and liquify
        swapAndLiquify(_from, _to);

        //indicates if fee should be deducted _from transfer
        bool takeFee = true;

        //if any account belongs to isExcludedFromFee account then remove the fee
        if (isExcludedFromFee[_from] || isExcludedFromFee[_to]) {
            takeFee = false;
        }

        //transfer amount, it will take tax, burn, liquidity fee
        _tokenTransfer(_from, _to, _amount, takeFee);
    }

    //this method is responsible for taking all fee, if takeFee is true
    function _tokenTransfer(
        address _sender,
        address _recipient,
        uint256 _amount,
        bool _takeFee
    ) private {
        if (!_takeFee) removeAllFee();

        // top up claim cycle
        topUpClaimCycleAfterTransfer(_recipient, _amount);

        if (isExcluded[_sender] && !isExcluded[_recipient]) {
            _transferFromExcluded(_sender, _recipient, _amount);
        } else if (!isExcluded[_sender] && isExcluded[_recipient]) {
            _transferToExcluded(_sender, _recipient, _amount);
        } else if (!isExcluded[_sender] && !isExcluded[_recipient]) {
            _transferStandard(_sender, _recipient, _amount);
        } else if (isExcluded[_sender] && isExcluded[_recipient]) {
            _transferBothExcluded(_sender, _recipient, _amount);
        } else {
            _transferStandard(_sender, _recipient, _amount);
        }

        if (!_takeFee) restoreAllFee();
    }

    function _transferStandard(
        address _sender,
        address _recipient,
        uint256 _tAmount
    ) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) =
            _getValues(_tAmount);
        rOwned[_sender] = rOwned[_sender].sub(rAmount);
        rOwned[_recipient] = rOwned[_recipient].add(rTransferAmount);
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(_sender, _recipient, tTransferAmount);
    }

    function _transferToExcluded(
        address _sender,
        address _recipient,
        uint256 _tAmount
    ) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) =
            _getValues(_tAmount);
        rOwned[_sender] = rOwned[_sender].sub(rAmount);
        tOwned[_recipient] = tOwned[_recipient].add(tTransferAmount);
        rOwned[_recipient] = rOwned[_recipient].add(rTransferAmount);
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(_sender, _recipient, tTransferAmount);
    }

    function _transferFromExcluded(
        address _sender,
        address _recipient,
        uint256 _tAmount
    ) private {
        (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) =
            _getValues(_tAmount);
        tOwned[_sender] = tOwned[_sender].sub(_tAmount);
        rOwned[_sender] = rOwned[_sender].sub(rAmount);
        rOwned[_recipient] = rOwned[_recipient].add(rTransferAmount);
        _takeLiquidity(tLiquidity);
        _reflectFee(rFee, tFee);
        emit Transfer(_sender, _recipient, tTransferAmount);
    }

    // Innovation for protocol by Moonbar Team
    uint256 public rewardCycleBlock = 7 days;
    uint256 public easyRewardCycleBlock = 1 days;
    uint256 public threshHoldTopUpRate = 2; // 2 percent
    uint256 public maxTxAmount = tTotal; // should be 0.01% percent per transaction, will be set again at activateContract() function
    uint256 public disruptiveCoverageFee = 2 ether; // antiwhale
    mapping(address => uint256) public nextAvailableClaimDate;
    bool public swapAndLiquifyEnabled = false; // will be set to to true in activateContract()
    uint256 public disruptiveTransferEnabledFrom = 0;
    uint256 public disableEasyRewardFrom = 0;
    uint256 public winningDoubleRewardPercentage = 5;

    uint256 public taxFee = 1;
    uint256 private previousTaxFee = taxFee;

    uint256 public liquidityFee = 9; // 4.5% will be added pool, 4.5% will be converted to BNB
    uint256 private previousLiquidityFee = liquidityFee;
    uint256 public rewardThreshold = 1 ether;

    uint256 private minTokenNumberToSell = tTotal.mul(1).div(10000).div(10); // 0.001% max tx amount will trigger swap and add liquidity

    modifier isHuman() {
        // solhint-disable-next-line avoid-tx-origin
        require(tx.origin == msg.sender, "sorry humans only");
        _;
    }

    /** @dev sets max tx amount (1 is 0.01%) as a percentage of total supply. */
    function setMaxTxPercent(uint256 _maxTxPercent) public onlyOwner {
        maxTxAmount = tTotal.mul(_maxTxPercent).div(10000);
    }

    /** @dev sets an address to exclude from max tx amount */
    function setExcludeFromMaxTx(address _address, bool _value) public onlyOwner {
        isExcludedFromMaxTx[_address] = _value;
    }

    function calculateBNBReward(address _ofAddress) public view returns (uint256) {
        uint256 totalSup =
            uint256(tTotal)
                .sub(balanceOf(address(0)))
                .sub(balanceOf(0x000000000000000000000000000000000000dEaD)) // exclude burned wallet
                .sub(balanceOf(address(pancakePair)));
        // exclude liquidity wallet

        return
            Utils.calculateBNBReward(
                balanceOf(address(_ofAddress)),
                address(this).balance,
                winningDoubleRewardPercentage,
                totalSup
            );
    }

    function getRewardCycleBlock() public view returns (uint256) {
        if (block.timestamp >= disableEasyRewardFrom) return rewardCycleBlock;
        return easyRewardCycleBlock;
    }

    function claimBNBReward() public isHuman nonReentrant {
        require(nextAvailableClaimDate[msg.sender] <= block.timestamp, "cannot claim yet");
        require(balanceOf(msg.sender) >= 0, "must own MOONBAR to claim reward");

        uint256 reward = calculateBNBReward(msg.sender);

        // reward threshold
        if (reward >= rewardThreshold) {
            Utils.swapETHForTokens(address(pancakeRouter), address(0x000000000000000000000000000000000000dEaD), reward.div(5));
            reward = reward.sub(reward.div(5));
        }

        // update rewardCycleBlock
        nextAvailableClaimDate[msg.sender] = block.timestamp + getRewardCycleBlock();
        emit ClaimBNBSuccessfully(msg.sender, reward, nextAvailableClaimDate[msg.sender]);

        // solhint-disable-next-line avoid-low-level-calls
        (bool sent, ) = address(msg.sender).call{value: reward}("");
        require(sent, "Cannot withdraw reward");
    }

    function topUpClaimCycleAfterTransfer(address _recipient, uint256 _amount) private {
        uint256 currentRecipientBalance = balanceOf(_recipient);
        uint256 basedRewardCycleBlock = getRewardCycleBlock();

        nextAvailableClaimDate[_recipient] =
            nextAvailableClaimDate[_recipient] +
            Utils.calculateTopUpClaim(currentRecipientBalance, basedRewardCycleBlock, threshHoldTopUpRate, _amount);
    }

    function ensureMaxTxAmount(
        address _from,
        address _to,
        uint256 _amount,
        uint256 _value
    ) private view {
        if (
            isExcludedFromMaxTx[_from] == false && // default will be false
            isExcludedFromMaxTx[_to] == false // default will be false
        ) {
            if (_value < disruptiveCoverageFee && block.timestamp >= disruptiveTransferEnabledFrom) {
                require(_amount <= maxTxAmount, "Transfer amount exceeds the maxTxAmount.");
            }
        }
    }

    function disruptiveTransfer(address _recipient, uint256 _amount) public payable returns (bool) {
        _transfer(_msgSender(), _recipient, _amount, msg.value);
        return true;
    }

    function swapAndLiquify(address _from, address _to) private {
        // is the token balance of this contract address over the min number of
        // tokens that we need to initiate a swap + liquidity lock?
        // also, don't get caught in a circular liquidity event.
        // also, don't swap & liquify if sender is pancake pair.
        uint256 contractTokenBalance = balanceOf(address(this));

        if (contractTokenBalance >= maxTxAmount) {
            contractTokenBalance = maxTxAmount;
        }

        bool shouldSell = contractTokenBalance >= minTokenNumberToSell;

        if (
            !inSwapAndLiquify &&
            shouldSell &&
            _from != pancakePair &&
            swapAndLiquifyEnabled &&
            !(_from == address(this) && _to == address(pancakePair)) // swap 1 time
        ) {
            // only sell for minTokenNumberToSell, decouple from maxTxAmount
            contractTokenBalance = minTokenNumberToSell;

            // add liquidity
            // split the contract balance into 3 pieces
            uint256 pooledBNB = contractTokenBalance.div(2);
            uint256 piece = contractTokenBalance.sub(pooledBNB).div(2);
            uint256 otherPiece = contractTokenBalance.sub(piece);

            uint256 tokenAmountToBeSwapped = pooledBNB.add(piece);

            uint256 initialBalance = address(this).balance;

            // block.timestamp is to lock into staking pool
            Utils.swapTokensForEth(address(pancakeRouter), tokenAmountToBeSwapped);

            // how much BNB did we just swap into?

            // capture the contract's current BNB balance.
            // this is so that we can capture exactly the amount of BNB that the
            // swap creates, and not make the liquidity event include any BNB that
            // has been manually sent to the contract
            uint256 deltaBalance = address(this).balance.sub(initialBalance);

            uint256 bnbToBeAddedToLiquidity = deltaBalance.div(3);

            // add liquidity to pancake
            Utils.addLiquidity(address(pancakeRouter), owner(), otherPiece, bnbToBeAddedToLiquidity);

            emit SwapAndLiquify(piece, deltaBalance, otherPiece);
        }
    }

    // activates the contract and enables disruptive transfer for whales,
    // start ticking the tock for easy reward cycle, and enables swap and liquify.
    function activateContract() public onlyOwner {
        // reward claim
        disableEasyRewardFrom = block.timestamp + 1 weeks;
        rewardCycleBlock = 7 days;
        easyRewardCycleBlock = 1 days;

        winningDoubleRewardPercentage = 5;

        // protocol
        disruptiveCoverageFee = 2 ether;
        disruptiveTransferEnabledFrom = block.timestamp;
        setMaxTxPercent(1); // set to 0.01%
        setSwapAndLiquifyEnabled(true);

        // approve contract
        _approve(address(this), address(pancakeRouter), 2**256 - 1);
    }
}

File 2 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 3 of 13 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 4 of 13 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // 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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 5 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        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;
    }
}

File 6 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT

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 no longer needed starting with Solidity 0.8. 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. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * 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;
        }
    }
}

File 7 of 13 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}

File 8 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT

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

File 9 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @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 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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

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

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

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

File 10 of 13 : IPancakeFactory.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

interface IPancakeFactory {
    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;
}

File 11 of 13 : IPancakePair.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

interface IPancakePair {
    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;
}

File 12 of 13 : IPancakeRouter.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

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

    // solhint-disable-next-line func-name-mixedcase
    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);
}

interface IPancakeRouter02 is IPancakeRouter01 {
    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;
}

File 13 of 13 : Utils.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "../interfaces/IPancakeRouter.sol";

library Utils {
    using SafeMath for uint256;

    function calculateBNBReward(
        uint256 _currentBalance,
        uint256 _currentBNBPool,
        uint256 _winningDoubleRewardPercentage,
        uint256 _totalSupply
    ) public view returns (uint256) {
        uint256 bnbPool = _currentBNBPool;

        // calculate reward to send
        bool isLotteryWonOnClaim = isLotteryWon(_currentBalance, _winningDoubleRewardPercentage);
        uint256 multiplier = 100;

        if (isLotteryWonOnClaim) {
            multiplier = random(150, 200, _currentBalance);
        }

        // calculate reward
        uint256 reward = bnbPool.mul(multiplier).mul(_currentBalance).div(100).div(_totalSupply);

        return reward;
    }

    function calculateTopUpClaim(
        uint256 _currentRecipientBalance,
        uint256 _basedRewardCycleBlock,
        uint256 _threshHoldTopUpRate,
        uint256 _amount
    ) public view returns (uint256) {
        if (_currentRecipientBalance == 0) {
            return block.timestamp + _basedRewardCycleBlock;
        } else {
            uint256 rate = _amount.mul(100).div(_currentRecipientBalance);

            if (uint256(rate) >= _threshHoldTopUpRate) {
                uint256 incurCycleBlock = _basedRewardCycleBlock.mul(uint256(rate)).div(100);

                if (incurCycleBlock >= _basedRewardCycleBlock) {
                    incurCycleBlock = _basedRewardCycleBlock;
                }

                return incurCycleBlock;
            }

            return 0;
        }
    }

    function swapTokensForEth(address _routerAddress, uint256 _tokenAmount) public {
        IPancakeRouter02 pancakeRouter = IPancakeRouter02(_routerAddress);

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

        // make the swap
        pancakeRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
            _tokenAmount,
            0, // accept any amount of BNB
            path,
            address(this),
            block.timestamp
        );
    }

    function swapETHForTokens(
        address _routerAddress,
        address _recipient,
        uint256 _ethAmount
    ) public {
        IPancakeRouter02 pancakeRouter = IPancakeRouter02(_routerAddress);

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

        // make the swap
        pancakeRouter.swapExactETHForTokensSupportingFeeOnTransferTokens{value: _ethAmount}(
            0, // accept any amount of BNB
            path,
            address(_recipient),
            block.timestamp + 360
        );
    }

    function addLiquidity(
        address _routerAddress,
        address _owner,
        uint256 _tokenAmount,
        uint256 _ethAmount
    ) public {
        IPancakeRouter02 pancakeRouter = IPancakeRouter02(_routerAddress);

        // add the liquidity
        pancakeRouter.addLiquidityETH{value: _ethAmount}(
            address(this),
            _tokenAmount,
            0, // slippage is unavoidable
            0, // slippage is unavoidable
            _owner,
            block.timestamp + 360
        );
    }

    function random(
        uint256 _from,
        uint256 _to,
        uint256 _salty
    ) private view returns (uint256) {
        uint256 seed =
            uint256(
                keccak256(
                    abi.encodePacked(
                        block.timestamp +
                            block.difficulty +
                            ((uint256(keccak256(abi.encodePacked(block.coinbase)))) / (block.timestamp)) +
                            block.gaslimit +
                            ((uint256(keccak256(abi.encodePacked(msg.sender)))) / (block.timestamp)) +
                            block.number +
                            _salty
                    )
                )
            );
        return seed.mod(_to - _from) + _from;
    }

    function isLotteryWon(uint256 _salty, uint256 _winningDoubleRewardPercentage) private view returns (bool) {
        uint256 luckyNumber = random(0, 100, _salty);
        uint256 winPercentage = _winningDoubleRewardPercentage;
        return luckyNumber <= winPercentage;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/libraries/Utils.sol": {
      "Utils": "0x81cb9e0b2a2f4bbab7568b250fdf20b2fae8bd04"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"routerAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"ethReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nextAvailableClaimDate","type":"uint256"}],"name":"ClaimBNBSuccessfully","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensIntoLiqudity","type":"uint256"}],"name":"SwapAndLiquify","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SwapAndLiquifyEnabledUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"accIsExcludedFromFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activateContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_ofAddress","type":"address"}],"name":"calculateBNBReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimBNBReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tAmount","type":"uint256"}],"name":"deliver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableEasyRewardFrom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disruptiveCoverageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"disruptiveTransfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"disruptiveTransferEnabledFrom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"easyRewardCycleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"excludeFromFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"excludeFromReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardCycleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"includeInFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"includeInReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isExcludedFromReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTxAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nextAvailableClaimDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pancakePair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pancakeRouter","outputs":[{"internalType":"contract IPancakeRouter02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tAmount","type":"uint256"},{"internalType":"bool","name":"_deductTransferFee","type":"bool"}],"name":"reflectionFromToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardCycleBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_value","type":"bool"}],"name":"setExcludeFromMaxTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liquidityFee","type":"uint256"}],"name":"setLiquidityFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTxPercent","type":"uint256"}],"name":"setMaxTxPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setSwapAndLiquifyEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_taxFee","type":"uint256"}],"name":"setTaxFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapAndLiquifyEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"threshHoldTopUpRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rAmount","type":"uint256"}],"name":"tokenFromReflection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"winningDoubleRewardPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c0604052670de0b6b3a7640000600981905562000020906000196200069a565b6200002e9060001962000643565b600a556040805180820190915260078082526626a7a7a72120a960c91b60209092019182526200006191600c9162000522565b506040805180820190915260078082526626a7a7a72120a960c91b60209092019182526200009291600d9162000522565b50600e8054600960ff19918216811761ff00191690925562093a80600f5562015180601055600260115581546012819055671bc16d674ec800006013556015805490921690915560006016819055601755600560185560016019819055601a819055601b839055601c92909255670de0b6b3a7640000601d556200014491600a916200013091612710918391620004ec602090811b6200184117901c565b6200050160201b6200184d1790919060201c565b601e553480156200015457600080fd5b50604051620035c3380380620035c38339810160408190526200017791620005c8565b6000620001836200050f565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055600a5460026000620001e26200050f565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000819050806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156200024557600080fd5b505afa1580156200025a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002809190620005c8565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015620002c957600080fd5b505afa158015620002de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003049190620005c8565b6040518363ffffffff1660e01b815260040162000323929190620005e7565b602060405180830381600087803b1580156200033e57600080fd5b505af115801562000353573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003799190620005c8565b6001600160601b0319606091821b811660a0529082901b16608052600160056000620003a462000513565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff199586161790553081526005909252812080549092166001908117909255600790620003f462000513565b6001600160a01b0316815260208082019290925260409081016000908120805494151560ff19958616179055308152600790925281208054831660019081179091557fb0c2646e02af70b79e3fe9277b98373379f54150e4e26b2b5650139f7a75a65d80548416821790559080527f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df8054909216179055620004956200050f565b6001600160a01b031660006001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600954604051620004dc919062000601565b60405180910390a35050620006f6565b6000620004fa828462000621565b9392505050565b6000620004fa82846200060a565b3390565b6000546001600160a01b031690565b82805462000530906200065d565b90600052602060002090601f0160209004810192826200055457600085556200059f565b82601f106200056f57805160ff19168380011785556200059f565b828001600101855582156200059f579182015b828111156200059f57825182559160200191906001019062000582565b50620005ad929150620005b1565b5090565b5b80821115620005ad5760008155600101620005b2565b600060208284031215620005da578081fd5b8151620004fa81620006dd565b6001600160a01b0392831681529116602082015260400190565b90815260200190565b6000826200061c576200061c620006c7565b500490565b60008160001904831182151516156200063e576200063e620006b1565b500290565b600082821015620006585762000658620006b1565b500390565b6002810460018216806200067257607f821691505b602082108114156200069457634e487b7160e01b600052602260045260246000fd5b50919050565b600082620006ac57620006ac620006c7565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b0381168114620006f357600080fd5b50565b60805160601c60a05160601c612e70620007536000396000818161094c015281816115bc01528181611b6f0152611bce015260008181611147015281816114bf015281816115e001528181611c7e0152611d1a0152612e706000f3fe6080604052600436106102b25760003560e01c806370a08231116101755780639bb4dc60116100dc578063c21ebd0711610095578063dd62ed3e1161006f578063dd62ed3e146107a0578063ea2f0b37146107c0578063f2fde38b146107e0578063fda48a7314610800576102b9565b8063c21ebd071461074b578063c49b9a8014610760578063d543dbeb14610780576102b9565b80639bb4dc60146106ac578063a071dcf4146106c1578063a457c2d7146106d6578063a9059cbb146106f6578063b47fd56314610716578063b8c9d25c14610736576102b9565b80638ee88c531161012e5780638ee88c53146106235780638fda356d146106435780638feed79a1461065857806395ba68d71461066d57806395d89b411461068257806398118cb414610697576102b9565b806370a0823114610582578063715018a6146105a25780637217f4bc146105b757806388f82020146105cc5780638c0b5e22146105ec5780638da5cb5b14610601576102b9565b8063395093511161021957806352390c02116101d257806352390c02146104ee5780635b89029c1461050e5780635e4196ab1461052e5780635ea4d29c146105435780636a40701c146105585780636d33a4681461056d576102b9565b806339509351146104465780633bd5d173146104665780633d87ea7514610486578063437823ec146104995780634549b039146104b95780634a74bb02146104d9576102b9565b80632060995e1161026b5780632060995e1461038f57806323b872dd146103af5780632d838119146103cf578063313ce567146103ef5780633685d4191461041157806337ad7cf514610431576102b9565b8063061c82d0146102be57806306fdde03146102e0578063095ea7b31461030b57806313114a9d1461033857806314c5f49c1461035a57806318160ddd1461037a576102b9565b366102b957005b600080fd5b3480156102ca57600080fd5b506102de6102d936600461274a565b610815565b005b3480156102ec57600080fd5b506102f5610862565b6040516103029190612842565b60405180910390f35b34801561031757600080fd5b5061032b610326366004612707565b6108f5565b6040516103029190612837565b34801561034457600080fd5b5061034d610913565b6040516103029190612ccb565b34801561036657600080fd5b5061032b610375366004612657565b610919565b34801561038657600080fd5b5061034d61093b565b34801561039b57600080fd5b5061034d6103aa366004612657565b610941565b3480156103bb57600080fd5b5061032b6103ca3660046126a3565b610a3a565b3480156103db57600080fd5b5061034d6103ea36600461274a565b610ac3565b3480156103fb57600080fd5b50610404610afd565b6040516103029190612d05565b34801561041d57600080fd5b506102de61042c366004612657565b610b06565b34801561043d57600080fd5b5061034d610cdb565b34801561045257600080fd5b5061032b610461366004612707565b610ce1565b34801561047257600080fd5b506102de61048136600461274a565b610d2f565b61032b610494366004612707565b610dea565b3480156104a557600080fd5b506102de6104b4366004612657565b610dff565b3480156104c557600080fd5b5061034d6104d436600461277a565b610e62565b3480156104e557600080fd5b5061032b610ebf565b3480156104fa57600080fd5b506102de610509366004612657565b610ec8565b34801561051a57600080fd5b506102de6105293660046126de565b611000565b34801561053a57600080fd5b5061034d61106a565b34801561054f57600080fd5b5061034d611070565b34801561056457600080fd5b506102de611076565b34801561057957600080fd5b5061034d6112c5565b34801561058e57600080fd5b5061034d61059d366004612657565b6112cb565b3480156105ae57600080fd5b506102de61132d565b3480156105c357600080fd5b5061034d6113b6565b3480156105d857600080fd5b5061032b6105e7366004612657565b6113bc565b3480156105f857600080fd5b5061034d6113da565b34801561060d57600080fd5b506106166113e0565b604051610302919061279c565b34801561062f57600080fd5b506102de61063e36600461274a565b6113ef565b34801561064f57600080fd5b506102de611433565b34801561066457600080fd5b5061034d6114e8565b34801561067957600080fd5b5061034d6114ee565b34801561068e57600080fd5b506102f56114f4565b3480156106a357600080fd5b5061034d611503565b3480156106b857600080fd5b5061034d611509565b3480156106cd57600080fd5b5061034d611524565b3480156106e257600080fd5b5061032b6106f1366004612707565b61152a565b34801561070257600080fd5b5061032b610711366004612707565b611592565b34801561072257600080fd5b5061034d610731366004612657565b6115a8565b34801561074257600080fd5b506106166115ba565b34801561075757600080fd5b506106166115de565b34801561076c57600080fd5b506102de61077b366004612730565b611602565b34801561078c57600080fd5b506102de61079b36600461274a565b61168a565b3480156107ac57600080fd5b5061034d6107bb366004612671565b6116f0565b3480156107cc57600080fd5b506102de6107db366004612657565b61171b565b3480156107ec57600080fd5b506102de6107fb366004612657565b61177b565b34801561080c57600080fd5b5061034d61183b565b61081d611859565b6001600160a01b031661082e6113e0565b6001600160a01b03161461085d5760405162461bcd60e51b815260040161085490612b17565b60405180910390fd5b601955565b6060600c805461087190612d81565b80601f016020809104026020016040519081016040528092919081815260200182805461089d90612d81565b80156108ea5780601f106108bf576101008083540402835291602001916108ea565b820191906000526020600020905b8154815290600101906020018083116108cd57829003601f168201915b505050505090505b90565b6000610909610902611859565b848461185d565b5060015b92915050565b600b5490565b6001600160a01b03811660009081526005602052604090205460ff165b919050565b60095490565b60008061099a6109707f00000000000000000000000000000000000000000000000000000000000000006112cb565b61099461097e61dead6112cb565b61099461098b60006112cb565b60095490611911565b90611911565b90507381cb9e0b2a2f4bbab7568b250fdf20b2fae8bd046333065a3a6109bf856112cb565b47601854856040518563ffffffff1660e01b81526004016109e39493929190612cea565b60206040518083038186803b1580156109fb57600080fd5b505af4158015610a0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a339190612762565b9392505050565b6000610a49848484600061191d565b610ab984610a55611859565b610ab485604051806060016040528060288152602001612dee602891396001600160a01b038a16600090815260046020526040812090610a93611859565b6001600160a01b0316815260208101919091526040016000205491906119fd565b61185d565b5060019392505050565b6000600a54821115610ae75760405162461bcd60e51b815260040161085490612910565b6000610af1611a29565b9050610a33838261184d565b600e5460ff1690565b610b0e611859565b6001600160a01b0316610b1f6113e0565b6001600160a01b031614610b455760405162461bcd60e51b815260040161085490612b17565b6001600160a01b03811660009081526006602052604090205460ff16610b7d5760405162461bcd60e51b8152600401610854906129d7565b60005b600854811015610cd757816001600160a01b031660088281548110610bb557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03161415610cc55760088054610be090600190612d6a565b81548110610bfe57634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600880546001600160a01b039092169183908110610c3857634e487b7160e01b600052603260045260246000fd5b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559184168152600382526040808220829055600690925220805460ff191690556008805480610c9e57634e487b7160e01b600052603160045260246000fd5b600082815260209020810160001990810180546001600160a01b0319169055019055610cd7565b80610ccf81612dbc565b915050610b80565b5050565b60105481565b6000610909610cee611859565b84610ab48560046000610cff611859565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611a4c565b6000610d39611859565b6001600160a01b03811660009081526006602052604090205490915060ff1615610d755760405162461bcd60e51b815260040161085490612c3d565b6000610d8083611a58565b505050506001600160a01b038416600090815260026020526040902054919250610dac91905082611911565b6001600160a01b038316600090815260026020526040902055600a54610dd29082611911565b600a55600b54610de29084611a4c565b600b55505050565b6000610909610df7611859565b84843461191d565b610e07611859565b6001600160a01b0316610e186113e0565b6001600160a01b031614610e3e5760405162461bcd60e51b815260040161085490612b17565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6000600954831115610e865760405162461bcd60e51b815260040161085490612a43565b81610ea5576000610e9684611a58565b5093955061090d945050505050565b6000610eb084611a58565b5092955061090d945050505050565b60155460ff1681565b610ed0611859565b6001600160a01b0316610ee16113e0565b6001600160a01b031614610f075760405162461bcd60e51b815260040161085490612b17565b6001600160a01b03811660009081526006602052604090205460ff1615610f405760405162461bcd60e51b8152600401610854906129a0565b6001600160a01b03811660009081526002602052604090205415610f9a576001600160a01b038116600090815260026020526040902054610f8090610ac3565b6001600160a01b0382166000908152600360205260409020555b6001600160a01b03166000818152600660205260408120805460ff191660019081179091556008805491820181559091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319169091179055565b611008611859565b6001600160a01b03166110196113e0565b6001600160a01b03161461103f5760405162461bcd60e51b815260040161085490612b17565b6001600160a01b03919091166000908152600760205260409020805460ff1916911515919091179055565b60165481565b601d5481565b3233146110955760405162461bcd60e51b815260040161085490612ac2565b600260015414156110b85760405162461bcd60e51b815260040161085490612c06565b6002600155336000908152601460205260409020544210156110ec5760405162461bcd60e51b815260040161085490612aed565b60006110f7336112cb565b10156111155760405162461bcd60e51b815260040161085490612a0e565b600061112033610941565b9050601d5481106111e3577381cb9e0b2a2f4bbab7568b250fdf20b2fae8bd0463c549d3ae7f000000000000000000000000000000000000000000000000000000000000000061dead61117485600561184d565b6040518463ffffffff1660e01b8152600401611192939291906127b0565b60006040518083038186803b1580156111aa57600080fd5b505af41580156111be573d6000803e3d6000fd5b505050506111e06111d960058361184d90919063ffffffff16565b8290611911565b90505b6111eb611509565b6111f59042612d13565b3360008181526014602052604090819020839055517f76a3a606d310d32750e15a3d246d186b789084096189d51661559b0f97f3bec9926112399291859190612816565b60405180910390a16000336001600160a01b03168260405161125a906108f2565b60006040518083038185875af1925050503d8060008114611297576040519150601f19603f3d011682016040523d82523d6000602084013e61129c565b606091505b50509050806112bd5760405162461bcd60e51b815260040161085490612b95565b505060018055565b60135481565b6001600160a01b03811660009081526006602052604081205460ff161561130b57506001600160a01b038116600090815260036020526040902054610936565b6001600160a01b03821660009081526002602052604090205461090d90610ac3565b611335611859565b6001600160a01b03166113466113e0565b6001600160a01b03161461136c5760405162461bcd60e51b815260040161085490612b17565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600f5481565b6001600160a01b031660009081526006602052604090205460ff1690565b60125481565b6000546001600160a01b031690565b6113f7611859565b6001600160a01b03166114086113e0565b6001600160a01b03161461142e5760405162461bcd60e51b815260040161085490612b17565b601b55565b61143b611859565b6001600160a01b031661144c6113e0565b6001600160a01b0316146114725760405162461bcd60e51b815260040161085490612b17565b61147f4262093a80612d13565b60175562093a80600f55620151806010556005601855671bc16d674ec80000601355426016556114af600161168a565b6114b96001611602565b6114e6307f000000000000000000000000000000000000000000000000000000000000000060001961185d565b565b60185481565b60175481565b6060600d805461087190612d81565b601b5481565b6000601754421061151d5750600f546108f2565b5060105490565b60195481565b6000610909611537611859565b84610ab485604051806060016040528060258152602001612e166025913960046000611561611859565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906119fd565b600061090961159f611859565b8484600061191d565b60146020526000908152604090205481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b61160a611859565b6001600160a01b031661161b6113e0565b6001600160a01b0316146116415760405162461bcd60e51b815260040161085490612b17565b6015805460ff19168215151790556040517f53726dfcaf90650aa7eb35524f4d3220f07413c8d6cb404cc8c18bf5591bc1599061167f908390612837565b60405180910390a150565b611692611859565b6001600160a01b03166116a36113e0565b6001600160a01b0316146116c95760405162461bcd60e51b815260040161085490612b17565b6116ea6127106116e48360095461184190919063ffffffff16565b9061184d565b60125550565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b611723611859565b6001600160a01b03166117346113e0565b6001600160a01b03161461175a5760405162461bcd60e51b815260040161085490612b17565b6001600160a01b03166000908152600560205260409020805460ff19169055565b611783611859565b6001600160a01b03166117946113e0565b6001600160a01b0316146117ba5760405162461bcd60e51b815260040161085490612b17565b6001600160a01b0381166117e05760405162461bcd60e51b81526004016108549061295a565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60115481565b6000610a338284612d4b565b6000610a338284612d2b565b3390565b6001600160a01b0383166118835760405162461bcd60e51b815260040161085490612895565b6001600160a01b0382166118a95760405162461bcd60e51b815260040161085490612c89565b6001600160a01b0380841660008181526004602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590611904908590612ccb565b60405180910390a3505050565b6000610a338284612d6a565b6001600160a01b0384166119435760405162461bcd60e51b815260040161085490612bc5565b6001600160a01b0383166119695760405162461bcd60e51b8152600401610854906128d9565b600082116119895760405162461bcd60e51b815260040161085490612b4c565b61199584848484611aa7565b61199f8484611b2e565b6001600160a01b03841660009081526005602052604090205460019060ff16806119e157506001600160a01b03841660009081526005602052604090205460ff165b156119ea575060005b6119f685858584611dda565b5050505050565b60008184841115611a215760405162461bcd60e51b81526004016108549190612842565b505050900390565b6000806000611a36611f52565b9092509050611a45828261184d565b9250505090565b6000610a338284612d13565b6000806000806000806000806000611a6f8a61210f565b9250925092506000806000611a8d8d8686611a88611a29565b61214b565b919f909e50909c50959a5093985091965092945050505050565b6001600160a01b03841660009081526007602052604090205460ff16158015611ae957506001600160a01b03831660009081526007602052604090205460ff16155b15611b285760135481108015611b0157506016544210155b15611b2857601254821115611b285760405162461bcd60e51b815260040161085490612a7a565b50505050565b6000611b39306112cb565b90506012548110611b4957506012545b601e54600e549082101590610100900460ff16158015611b665750805b8015611ba457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031614155b8015611bb2575060155460ff165b8015611c0457506001600160a01b03841630148015611c0257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316145b155b15611b2857601e5491506000611c1b83600261184d565b90506000611c2e60026116e48685611911565b90506000611c3c8583611911565b90506000611c4a8484611a4c565b6040516356feb11b60e01b815290915047907381cb9e0b2a2f4bbab7568b250fdf20b2fae8bd04906356feb11b90611ca8907f00000000000000000000000000000000000000000000000000000000000000009086906004016127fd565b60006040518083038186803b158015611cc057600080fd5b505af4158015611cd4573d6000803e3d6000fd5b505050506000611ced824761191190919063ffffffff16565b90506000611cfc82600361184d565b90507381cb9e0b2a2f4bbab7568b250fdf20b2fae8bd0463cf6c62ea7f0000000000000000000000000000000000000000000000000000000000000000611d416113e0565b88856040518563ffffffff1660e01b8152600401611d6294939291906127d4565b60006040518083038186803b158015611d7a57600080fd5b505af4158015611d8e573d6000803e3d6000fd5b505050507f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb561868387604051611dc593929190612cd4565b60405180910390a15050505050505050505050565b80611de757611de761219b565b611df183836121cc565b6001600160a01b03841660009081526006602052604090205460ff168015611e3257506001600160a01b03831660009081526006602052604090205460ff16155b15611e4757611e428484846122b9565b611f45565b6001600160a01b03841660009081526006602052604090205460ff16158015611e8857506001600160a01b03831660009081526006602052604090205460ff165b15611e9857611e428484846123dd565b6001600160a01b03841660009081526006602052604090205460ff16158015611eda57506001600160a01b03831660009081526006602052604090205460ff16155b15611eea57611e42848484612486565b6001600160a01b03841660009081526006602052604090205460ff168015611f2a57506001600160a01b03831660009081526006602052604090205460ff165b15611f3a57611e428484846124ca565b611f45848484612486565b80611b2857611b2861253d565b600a546009546000918291825b6008548110156120dd57826002600060088481548110611f8f57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b0316835282019290925260400190205411806120085750816003600060088481548110611fe157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b1561201f57600a546009549450945050505061210b565b612073600260006008848154811061204757634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611911565b92506120c9600360006008848154811061209d57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611911565b9150806120d581612dbc565b915050611f5f565b50600954600a546120ed9161184d565b82101561210557600a5460095493509350505061210b565b90925090505b9091565b60008060008061211e8561254b565b9050600061212b86612567565b9050600061213d826109948986611911565b979296509094509092505050565b600080808061215a8886611841565b905060006121688887611841565b905060006121768888611841565b90506000612188826109948686611911565b939b939a50919850919650505050505050565b6019541580156121ab5750601b54155b156121b5576114e6565b60198054601a55601b8054601c5560009182905555565b60006121d7836112cb565b905060006121e3611509565b601154604051638958b5a960e01b81529192507381cb9e0b2a2f4bbab7568b250fdf20b2fae8bd0491638958b5a99161222491869186918990600401612cea565b60206040518083038186803b15801561223c57600080fd5b505af4158015612250573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122749190612762565b6001600160a01b0385166000908152601460205260409020546122979190612d13565b6001600160a01b03909416600090815260146020526040902093909355505050565b6000806000806000806122cb87611a58565b6001600160a01b038f16600090815260036020526040902054959b509399509197509550935091506122fd9088611911565b6001600160a01b038a1660009081526003602090815260408083209390935560029052205461232c9087611911565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461235b9086611a4c565b6001600160a01b03891660009081526002602052604090205561237d81612583565b612387848361260c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123ca9190612ccb565b60405180910390a3505050505050505050565b6000806000806000806123ef87611a58565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506124219087611911565b6001600160a01b03808b16600090815260026020908152604080832094909455918b168152600390915220546124579084611a4c565b6001600160a01b03891660009081526003602090815260408083209390935560029052205461235b9086611a4c565b60008060008060008061249887611a58565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061232c9087611911565b6000806000806000806124dc87611a58565b6001600160a01b038f16600090815260036020526040902054959b5093995091975095509350915061250e9088611911565b6001600160a01b038a166000908152600360209081526040808320939093556002905220546124219087611911565b601a54601955601c54601b55565b600061090d60646116e46019548561184190919063ffffffff16565b600061090d60646116e4601b548561184190919063ffffffff16565b600061258d611a29565b9050600061259b8383611841565b306000908152600260205260409020549091506125b89082611a4c565b3060009081526002602090815260408083209390935560069052205460ff161561260757306000908152600360205260409020546125f69084611a4c565b306000908152600360205260409020555b505050565b600a546126199083611911565b600a55600b546126299082611a4c565b600b555050565b80356001600160a01b038116811461093657600080fd5b8035801515811461093657600080fd5b600060208284031215612668578081fd5b610a3382612630565b60008060408385031215612683578081fd5b61268c83612630565b915061269a60208401612630565b90509250929050565b6000806000606084860312156126b7578081fd5b6126c084612630565b92506126ce60208501612630565b9150604084013590509250925092565b600080604083850312156126f0578182fd5b6126f983612630565b915061269a60208401612647565b60008060408385031215612719578182fd5b61272283612630565b946020939093013593505050565b600060208284031215612741578081fd5b610a3382612647565b60006020828403121561275b578081fd5b5035919050565b600060208284031215612773578081fd5b5051919050565b6000806040838503121561278c578182fd5b8235915061269a60208401612647565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b6000602080835283518082850152825b8181101561286e57858101830151858201604001528201612852565b8181111561287f5783604083870101525b50601f01601f1916929092016040019392505050565b60208082526024908201527f42455032303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601f908201527f42455032303a207472616e7366657220746f207a65726f206164647265737300604082015260600190565b6020808252602a908201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260408201526965666c656374696f6e7360b01b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f4163636f756e7420697320616c7265616479206578636c756465640000000000604082015260600190565b6020808252601b908201527f4163636f756e7420697320616c726561647920696e636c756465640000000000604082015260600190565b6020808252818101527f6d757374206f776e204d4f4f4e42415220746f20636c61696d20726577617264604082015260600190565b6020808252601f908201527f416d6f756e74206d757374206265206c657373207468616e20737570706c7900604082015260600190565b60208082526028908201527f5472616e7366657220616d6f756e74206578636565647320746865206d6178546040820152673c20b6b7bab73a1760c11b606082015260800190565b602080825260119082015270736f7272792068756d616e73206f6e6c7960781b604082015260600190565b60208082526010908201526f18d85b9b9bdd0818db185a5b481e595d60821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206040820152687468616e207a65726f60b81b606082015260800190565b60208082526016908201527510d85b9b9bdd081dda5d1a191c985dc81c995dd85c9960521b604082015260600190565b60208082526021908201527f42455032303a207472616e736665722066726f6d207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602c908201527f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460408201526b3434b990333ab731ba34b7b760a11b606082015260800190565b60208082526022908201527f42455032303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b90815260200190565b9283526020830191909152604082015260600190565b93845260208401929092526040830152606082015260800190565b60ff91909116815260200190565b60008219821115612d2657612d26612dd7565b500190565b600082612d4657634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612d6557612d65612dd7565b500290565b600082821015612d7c57612d7c612dd7565b500390565b600281046001821680612d9557607f821691505b60208210811415612db657634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612dd057612dd0612dd7565b5060010190565b634e487b7160e01b600052601160045260246000fdfe42455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212207173920a7cf7825a8f43229f5e8db6c6b2eec28a84f37761d697e9d97703b53964736f6c6343000800003300000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e

-----Decoded View---------------
Arg [0] : routerAddress (address): 0x10ed43c718714eb63d5aa57b78b54704e256024e

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000010ed43c718714eb63d5aa57b78b54704e256024e


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.