Contract 0x4d751991267545db23f5b8f7bad4cc975b1f5351

Txn Hash
Block
From
To
Value [Txn Fee]
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00420172
0xca407dcdaf09d2c6abda00a83bb19f3f3594080ab5f7e3026d297d19da5e46d299468902021-06-22 5:00:103 days 3 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0xa3cee8ba16316aa8f7ed2af532b9c9961196ffbd26ed8e08f995f632a1786dc699456902021-06-22 4:00:103 days 4 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00498653
0xca7b8068d9eecede20654747703594e49556bfaccabf7efb78ef3570172f3bac99444902021-06-22 3:00:103 days 5 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0xd44b6eae8ae57f76523b2b67b332300d178654d1f62601936e5465783f746a7899432902021-06-22 2:00:103 days 6 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0xd48e0c4ef4f605b2569c56ef4415be2a1438ec1af378442a0de38f0efd2f2d1199420902021-06-22 1:00:103 days 7 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0x2bb9b88c1773b9ae52baf5c91c908b66a417c081efbe63010ff5fb14a6af712099408902021-06-22 0:00:103 days 8 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00668649
0xe62fb2c0f1961b917b28eda76d18bb601884ce7806d291d7467154c269f2557999396902021-06-21 23:00:103 days 9 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0xa34019f43dc9a9cfe5f30e717359cc49b8466dda4df1b6bc2c352446948756b999384902021-06-21 22:00:103 days 10 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0x8b7bf915a30df2947ca8bf82b0e0010b142971118e0698d72a43ed2661b0a56f99372902021-06-21 21:00:103 days 11 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0xcccb56d8b529d06c84389b6b8e419843d2abae6b2fa5a5f2aa717fbe58b3cbb999360902021-06-21 20:00:103 days 12 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00498653
0x60fa0ffc6f404ea6899f5df877575183df9b6d296eaaf1230a2d873e62d6391399348902021-06-21 19:00:103 days 13 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0x33908bcb9aa6e289f7252b013a3a98b4145ef6f2aa24e92ffe69d7b940fe849d99336902021-06-21 18:00:103 days 14 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00420172
0x18d985295e2a70c66c067a29787dbf56991d45e53dc9b9ea8c5170bff87b47b099325362021-06-21 17:02:283 days 15 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00434457
0xb232c05f14fde0be95541744645e35c2c95b446ce50557f5e25060f4bb1ede5499325252021-06-21 17:01:553 days 15 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00449457
0xd632d723be6c9ba56ce7e087052ee867029a3f0d1da98cc77028dfdf7f03588c99325002021-06-21 17:00:403 days 15 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00459376
0x2e14a80bfc61c646fa99149c11d3ab783974280d721f7c588c6f80b99d9ff2da99324902021-06-21 17:00:103 days 15 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0x0818da4c1500ced51f87a3d6522f62e9fe0f27629122beb8463f4a3c60155b1899312902021-06-21 16:00:103 days 16 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00653642
0x6733c0c00f8ecc496122db78c8e056b7b2a361738b353927602017733832158d99300902021-06-21 15:00:103 days 17 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0xea13ecb3c778938f70c51806694f86eaa331d8585569a8d36fb4cb833c12a7f499288902021-06-21 14:00:103 days 18 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00405225
0xa37d925120c789761162ec3fe446b3b08797bb696fe1f374bee835477f0937b099288782021-06-21 13:59:343 days 18 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00587651
0x4defd1d4b1a0454ef4aa569570ee2c64918f92fce3d3aa1d0eb8dcfa093ffe0b99288752021-06-21 13:59:253 days 18 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00587591
0x22f5ff4aa07f81cfe4d20499b6a2e40324e46bb617831727988ace531a4b1a5a99288732021-06-21 13:59:193 days 18 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00587343
0x72ecfd6c7f05d25e786ba20e2f7a0c484a7bb8cfc9f16384d9860126fb054b0299288712021-06-21 13:59:133 days 18 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00587651
0x1421958300eb0f3876a650687e393be92dec0e4b7f8c84f29d04f5032280663199288672021-06-21 13:59:013 days 18 hrs ago0x281f47e30490e4c8638e8ccffcfb2e547881bae7 IN  0x4d751991267545db23f5b8f7bad4cc975b1f53510 BNB0.00587293
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0xe5371f8da6addf3b7d60ca5d0ab1de40217a49ea0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0xd98a6957354e152851bd718f17c629a8f7c36ec90 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x6a1a543b2b2fc0b7825184eb9298cb7546458f100 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x24d1b3f862d3fb01504bfe75390441a5bd988b9c0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x493f1878e0bd1656bd73d7900cacf8e441d63f8f0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x4b259179d10bf38ea8700946a7d8c9b2f92c840d0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0xb194f73255dcce6788188117cc2882e61ad7d5ac0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x27706b8d8cacdccb5ec9416af3a6f52a647952150 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x0e68bf3b5f3ab523843bc94f73dbb2097e8a8ecb0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x03c85b2909826ebb2a3ed596fac378db64f53b500 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0xb974dff45fd3f93941fbb6f0d3bc3acabb3b62b20 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xfe7e7c0f56fa2f338b0ad10d29f53a6434413ffb34b73d259f2d89ffd5e9e16699480902021-06-22 6:00:103 days 2 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
0xca407dcdaf09d2c6abda00a83bb19f3f3594080ab5f7e3026d297d19da5e46d299468902021-06-22 5:00:103 days 3 hrs ago 0x4d751991267545db23f5b8f7bad4cc975b1f5351 0x8a5a76401ada8998603d982d8343752fec75972b0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MasterChef

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : DeFiToken.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./libs/BEP20.sol";
import "./libs/SafeBEP20.sol";

// DeFiToken.
contract DeFiToken is BEP20 {
    using SafeBEP20 for IBEP20;
    // Transfer tax rate in basis points. (default 8%)
    uint16 public transferTaxRate = 800;
    // Max transfer tax rate: 10%.
    uint16 public constant MAXIMUM_TRANSFER_TAX_RATE = 1000;
    // Max transfer block rate: 20 blocks ~ 1 hour between EMMENTAL token transfers
    uint16 public constant MAXIMUM_TRANSFER_BLOCK_RATE = 20;
    // Dead address
    address public constant DEAD_ADDRESS = 0x000000000000000000000000000000000000dEaD;
    // Max transfer amount rate in basis points. (default is 0.5% of circulating supply = total supply - dead address - fee/tax address)
    uint16 public maxTransferAmountRate = 50;
    // Min transfer block rate. (default is 5 blocks ~ 15 seconds between token transfers)
    uint16 public minTransferBlockRate = 5;
    // Addresses that excluded from antiWhale
    mapping(address => bool) private _excludedFromAntiWhale;
    // Addresses that excluded from tansferTaxRate, required for Vaults
    mapping(address => bool) private _excludedFromTransferTaxRate;
    // Addresses mapping for AntiBot;
    mapping (address => mapping (address => uint256)) private _lastBlockNumber;
    // The operator can only update the transfer tax rate, transfer blolck rate and taxTo address.
    address private _operator;
    // Transfer tax to. (default dead address)
    address public taxTo;
    // The block number when DeFi trasnfer starts.
    uint256 public startBlock;

    // Events
    event OperatorTransferred(address indexed previousOperator, address indexed newOperator);
    event TransferTaxRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event MaxTransferAmountRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event MinTransferBlockRateUpdated(address indexed operator, uint256 previousRate, uint256 newRate);
    event TaxToUpdated(address indexed operator, address indexed previousTaxTo, address indexed newTaxTo);
    event StartBlockUpdated(address indexed operator, uint256 previousStartBlock, uint256 newStartBlock);

    modifier onlyOperator() {
        require(_operator == msg.sender, "operator: caller is not the operator");
        _;
    }

    modifier antiWhale(address sender, address recipient, uint256 amount) {
        if (maxTransferAmount() > 0) {
            if (
                _excludedFromAntiWhale[sender] == false
                && _excludedFromAntiWhale[recipient] == false
            ) {
                require(amount <= maxTransferAmount(), "DeFi::antiWhale: Transfer amount exceeds the maxTransferAmount");
            }
        }
        _;
    }

    /**
     * @notice Constructs the DeFiToken contract.
     */
    constructor() public BEP20("DeFi Token", "DeFi") {
        _operator = _msgSender();
        emit OperatorTransferred(address(0), _operator);
        taxTo = DEAD_ADDRESS;
        _excludedFromAntiWhale[msg.sender] = true;
        _excludedFromAntiWhale[address(0)] = true;
        _excludedFromAntiWhale[address(this)] = true;
        _excludedFromAntiWhale[DEAD_ADDRESS] = true;
    }

    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
    }

    /// @dev overrides transfer function to meet tokenomics of DeFi
    function _transfer(address sender, address recipient, uint256 amount) internal virtual override antiWhale(sender, recipient, amount) {
        if (recipient == DEAD_ADDRESS
            || sender == taxTo
            || recipient == taxTo
            || transferTaxRate == 0
            || (_excludedFromTransferTaxRate[sender] && _excludedFromTransferTaxRate[recipient])
        ) {
            super._transfer(sender, recipient, amount);
        } else {
            if (
                _excludedFromAntiWhale[sender] == false
                && _excludedFromAntiWhale[recipient] == false
                && amount != 0
            ) {
                require(startBlock <= block.number, "DeFi::anitBot: Transfer token is not started yet");
                require(_lastBlockNumber[sender][recipient] <= block.number - minTransferBlockRate, "DeFi::anitBot: Transfer frequency exceeds the minTransferBlock");
                require(_lastBlockNumber[recipient][sender] <= block.number - minTransferBlockRate, "DeFi::anitBot: Transfer frequency exceeds the minTransferBlock");
            }

            // default tax is 8% of every transfer sent to taxTo
            uint256 taxAmount = amount.mul(transferTaxRate).div(10000);

            // default 92% of transfer sent to recipient
            uint256 sendAmount = amount.sub(taxAmount);
            require(amount == sendAmount + taxAmount, "DeFi::transfer: Tax value invalid");

            super._transfer(sender, taxTo, taxAmount);
            super._transfer(sender, recipient, sendAmount);
            amount = sendAmount;
            _lastBlockNumber[sender][recipient] = block.number;
        }
    }

    /**
     * @dev Returns the max transfer amount.
     */
    function maxTransferAmount() public view returns (uint256) {
        uint256 circulatingSupply = totalSupply().sub(IBEP20(address(this)).balanceOf(DEAD_ADDRESS));
        if (taxTo != DEAD_ADDRESS) circulatingSupply = circulatingSupply.sub(IBEP20(address(this)).balanceOf(taxTo));
        return circulatingSupply.mul(maxTransferAmountRate).div(10000);
    }

    /**
     * @dev Returns the address is excluded from antiWhale or not.
     */
    function isExcludedFromAntiWhale(address _account) public view returns (bool) {
        return _excludedFromAntiWhale[_account];
    }

    /**
     * @dev Returns the address is excluded from TransferTaxRate or not.
     */
    function isExcludedFromTransferTaxRate(address _account) public view returns (bool) {
        return _excludedFromTransferTaxRate[_account];
    }

    /**
     * @dev Update the transfer tax rate.
     * Can only be called by the current operator.
     */
    function updateTransferTaxRate(uint16 _transferTaxRate) public onlyOperator {
        require(_transferTaxRate <= MAXIMUM_TRANSFER_TAX_RATE, "DeFi::updateTransferTaxRate: Transfer tax rate must not exceed the maximum rate.");
        emit TransferTaxRateUpdated(msg.sender, transferTaxRate, _transferTaxRate);
        transferTaxRate = _transferTaxRate;
    }

    /**
     * @dev Update the max transfer amount rate.
     * Can only be called by the current operator.
     */
    function updateMaxTransferAmountRate(uint16 _maxTransferAmountRate) public onlyOperator {
        require(_maxTransferAmountRate <= 10000, "DeFi::updateMaxTransferAmountRate: Max transfer amount rate must not exceed the maximum rate.");
        emit MaxTransferAmountRateUpdated(msg.sender, maxTransferAmountRate, _maxTransferAmountRate);
        maxTransferAmountRate = _maxTransferAmountRate;
    }

    /**
     * @dev Update the min transfer block rate.
     * Can only be called by the current operator.
     */
    function updateMinTransferBlockRate(uint16 _minTransferBlockRate) public onlyOperator {
        require(_minTransferBlockRate <= MAXIMUM_TRANSFER_BLOCK_RATE, "DeFi::updateMinTransferBlockRate: Transfer block rate must not exceed the maximum rate.");
        emit MinTransferBlockRateUpdated(msg.sender, minTransferBlockRate, _minTransferBlockRate);
        minTransferBlockRate = _minTransferBlockRate;
    }

    /**
     * @dev Exclude or include an address from antiWhale.
     * Can only be called by the current operator.
     */
    function setExcludedFromAntiWhale(address _account, bool _excluded) public onlyOperator {
        _excludedFromAntiWhale[_account] = _excluded;
    }

    /**
     * @dev Exclude or include an address from transferTaxRate, required for Vaults
     * Can only be called by the current operator.
     */
    function setExcludedFromTransferTaxRate(address _account, bool _excluded) public onlyOperator {
        _excludedFromAntiWhale[_account] = _excluded;
        _excludedFromTransferTaxRate[_account] = _excluded;
    }

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

    /**
     * @dev Transfers operator of the contract to a new account (`newOperator`).
     * Can only be called by the current operator.
     */
    function transferOperator(address newOperator) public onlyOperator {
        require(newOperator != address(0), "DeFi::transferOperator: new operator is the zero address");
        emit OperatorTransferred(_operator, newOperator);
        _operator = newOperator;
    }

    /**
     * @dev Set TaxTo of the token to a new account (`newTaxTo`).
     * Can only be called by the current operator.
     */
    function setTaxTo(address newTaxTo) public onlyOperator {
        emit TaxToUpdated(msg.sender, taxTo, newTaxTo);
        taxTo = newTaxTo;
    }

    /**
     * @dev Operator can drain tokens that are sent here by mistake
     */
    function drainBEP20Token(IBEP20 _token, uint256 _amount, address _to) external onlyOperator {
        _token.safeTransfer(_to, _amount);
    }

    /**
     * @dev Set startBlock number when DeFi trasnfer starts.
     * Can only be called by the current operator.
     */
    function setStartBlock(uint256 newStartBlock) public onlyOperator {
        emit StartBlockUpdated(msg.sender, startBlock, newStartBlock);
        startBlock = newStartBlock;
    }
}

File 2 of 15 : MasterChef.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "./libs/IBEP20.sol";
import "./libs/SafeBEP20.sol";
import "./libs/IDeFiReferral.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./DeFiToken.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";


// MasterChef is the master of DeFi. He can make DeFi and he is a fair guy.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once DeFi is sufficiently
// distributed and the community can show to govern itself.
//
// Have fun reading it. Hopefully it's bug-free. God bless.
contract MasterChef is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeBEP20 for IBEP20;

    // Info of each user.
    struct UserInfo {
        uint256 amount;         // How many LP tokens the user has provided.
        uint256 rewardDebt;     // Reward debt. See explanation below.
        uint256 rewardLockedUp;  // Reward locked up.
        uint256 nextHarvestUntil; // When can the user harvest again.
        uint256 compoundAmount;   // Compound Amount to fee address in case withdraw before nextHarvestUntil.
        //
        // We do some fancy math here. Basically, any point in time, the amount of DeFis
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accDeFiPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accDeFiPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    // Info of each pool.
    struct PoolInfo {
        IBEP20 lpToken;                 // Address of LP token contract.
        uint256 allocPoint;             // How many allocation points assigned to this pool. DeFis to distribute per block.
        uint256 lastRewardBlock;        // Last block number that DeFis distribution occurs.
        uint256 accDeFiPerShare;        // Accumulated DeFis per share, times 1e12. See below.
        uint16 depositFeeBP;            // Deposit fee in basis points
        uint256 harvestInterval;        // Harvest interval in seconds
        uint256 allocPointPrimary;      // How many allocation points assigned to this pool Primary
        uint256 allocPointSecondary;    // How many allocation points assigned to this pool Secondary
        uint256 nextAllocPointUntil;    // When pool changes allocation
        uint256 nextAllocPoint;         // Next allocation points assigned to this pool. DeFis to distribute per block.
    }

    // The DeFi TOKEN!
    DeFiToken public DeFi;
    // Deposit Fee address
    address public feeAddress;
    // DeFi tokens created per block.
    uint256 public DeFiPerBlock;
    // Bonus muliplier for early DeFi makers.
    uint256 public constant BONUS_MULTIPLIER = 1;
    // Max harvest interval: 14 days.
    uint256 public constant MAXIMUM_HARVEST_INTERVAL = 14 days;
    // Vault addresses canHarvest anytime for auto compound and deposit without fee
    mapping(address => bool) private isVault;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;
    // Info of each pool added to avoid adding twice the same LP token
    mapping(IBEP20 => bool) public poolExistence;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when DeFi mining starts.
    uint256 public startBlock;
    // The timestamp when DeFi Harvest countdown starts.
    uint256 public startTime;
    // Total locked up rewards
    uint256 public totalLockedUpRewards;

    // DeFi referral contract address.
    IDeFiReferral public DeFiReferral;
    // Referral commission rate in basis points.
    uint16 public referralCommissionRate = 300;
    // Max referral commission rate: 10%.
    uint16 public constant MAXIMUM_REFERRAL_COMMISSION_RATE = 1000;

    // The swap router, modifiable
    IUniswapV2Router02 public DeFiSwapRouter;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmissionRateUpdated(address indexed caller, uint256 previousAmount, uint256 newAmount);
    event ReferralCommissionPaid(address indexed user, address indexed referrer, uint256 commissionAmount);
    event RewardLockedUp(address indexed user, uint256 indexed pid, uint256 amountLockedUp);
    event StartBlockUpdated(address indexed caller, uint256 previousStartBlock, uint256 newStartBlock);
    event StartTimeUpdated(address indexed caller, uint256 previousStartTime, uint256 newStartTime);
    event DeFiSwapRouterUpdated(address indexed operator, address indexed router);

    constructor(
        DeFiToken _DeFi,
        uint256 _DeFiPerBlock
    ) public {
        DeFi = _DeFi;
        DeFiPerBlock = _DeFiPerBlock;
        feeAddress = msg.sender;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    modifier nonDuplicated(IBEP20 _lpToken) {
        require(poolExistence[_lpToken] == false, "nonDuplicated: duplicated");
        _;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    function add(uint256 _allocPoint, IBEP20 _lpToken, uint16 _depositFeeBP, uint256 _harvestInterval, bool _withUpdate, uint256 _allocPointSecondary) public onlyOwner nonDuplicated(_lpToken) {
        require(_depositFeeBP <= 400, "add: invalid deposit fee basis points");
        require(_harvestInterval <= MAXIMUM_HARVEST_INTERVAL, "add: invalid harvest interval");
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolExistence[_lpToken] = true;
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accDeFiPerShare: 0,
            depositFeeBP: _depositFeeBP,
            harvestInterval: _harvestInterval,
            allocPointPrimary: _allocPoint,
            allocPointSecondary: _allocPointSecondary,
            nextAllocPoint: _allocPointSecondary,
            nextAllocPointUntil: (block.number < startBlock ? startTime : ((block.timestamp / _harvestInterval) * _harvestInterval)) + _harvestInterval
        }));
    }

    // Update the given pool's DeFi allocation point and deposit fee. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint, uint16 _depositFeeBP, uint256 _harvestInterval, bool _withUpdate, uint256 _allocPointSecondary) public onlyOwner {
        require(_depositFeeBP <= 400, "set: invalid deposit fee basis points");
        require(_harvestInterval <= MAXIMUM_HARVEST_INTERVAL, "set: invalid harvest interval");
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].depositFeeBP = _depositFeeBP;
        poolInfo[_pid].harvestInterval = _harvestInterval;
        poolInfo[_pid].allocPointPrimary = _allocPoint;
        poolInfo[_pid].allocPointSecondary = _allocPointSecondary;
        poolInfo[_pid].nextAllocPoint = _allocPointSecondary;
        poolInfo[_pid].nextAllocPointUntil = (block.number < startBlock ? startTime : ((block.timestamp / _harvestInterval) * _harvestInterval)) + _harvestInterval;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public pure returns (uint256) {
        return _to.sub(_from).mul(BONUS_MULTIPLIER);
    }

    // View function to see pending DeFis on frontend.
    function pendingDeFi(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accDeFiPerShare = pool.accDeFiPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 DeFiReward = multiplier.mul(DeFiPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accDeFiPerShare = accDeFiPerShare.add(DeFiReward.mul(1e12).div(lpSupply));
        }
        uint256 pending = user.amount.mul(accDeFiPerShare).div(1e12).sub(user.rewardDebt);
        return pending.add(user.rewardLockedUp);
    }

    // View function to see if user can harvest DeFis.
    function canHarvest(uint256 _pid, address _user) public view returns (bool) {
        // Vault addresses canHarvest anytime for auto compound
        if (isVault[msg.sender]) return true;

        UserInfo storage user = userInfo[_pid][_user];
        return block.timestamp >= user.nextHarvestUntil;
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 DeFiReward = multiplier.mul(DeFiPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
        DeFi.mint(address(this), DeFiReward);
        pool.accDeFiPerShare = pool.accDeFiPerShare.add(DeFiReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
        if (block.timestamp >= pool.nextAllocPointUntil) {
            totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(pool.nextAllocPoint);
            pool.allocPoint = pool.nextAllocPoint;
            pool.nextAllocPoint = pool.nextAllocPoint == pool.allocPointPrimary ? pool.allocPointSecondary : pool.allocPointPrimary;
            pool.nextAllocPointUntil = (block.number < startBlock ? startTime : ((block.timestamp / pool.harvestInterval) * pool.harvestInterval)) + pool.harvestInterval;
        }
    }

    // Reccord referral without deposit to avoid user mistakes.
    function recordReferral(address _referrer) public nonReentrant {
        if (address(DeFiReferral) != address(0) && _referrer != address(0) && _referrer != msg.sender) {
            DeFiReferral.recordReferral(msg.sender, _referrer);
        }
    }

    // Deposit LP tokens to MasterChef for DeFi allocation.
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        payOrLockupPendingDeFi(_pid, false);
        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            // Vault addresses deposit without tax
            if (! isVault[msg.sender] && address(pool.lpToken) == address(DeFi)) {
                uint256 transferTax = _amount.mul(DeFi.transferTaxRate()).div(10000);
                _amount = _amount.sub(transferTax);
            }
            // Vault addresses deposit without fee
            if (! isVault[msg.sender] && pool.depositFeeBP > 0) {
                uint256 depositFee = _amount.mul(pool.depositFeeBP).div(10000);
                pool.lpToken.safeTransfer(feeAddress, depositFee);
                user.amount = user.amount.add(_amount).sub(depositFee);
            } else {
                user.amount = user.amount.add(_amount);
            }
        }
        user.rewardDebt = user.amount.mul(pool.accDeFiPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Compound LP tokens to MasterChef for DeFi allocation.
    function compound(uint256 _pid) public nonReentrant {
        require(address(DeFiSwapRouter) != address(0), "DeFi::compound: Invalid DeFiSwapRouter address.");
        uint256 _amount = 0;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        bool _canHarvest = canHarvest(_pid, msg.sender);
        uint256 total = payOrLockupPendingDeFi(_pid, true);
        if (total > 0) {
            _amount = DeFi.balanceOf(address(this));
            if (total > _amount) total = _amount;
            if (address(pool.lpToken) == address(DeFi)) {
                _amount = total;
            } else {
                DeFi.approve(address(DeFiSwapRouter), uint256(-1));
                IUniswapV2Pair pair = IUniswapV2Pair(address(pool.lpToken));
                IBEP20 token0 = IBEP20(pair.token0());
                IBEP20 token1 = IBEP20(pair.token1());
                uint256 half0 = total.div(2);
                uint256 half1 = total.sub(half0);
                address[] memory path = new address[](2);
                path[0] = address(DeFi);
                total = 0;
                _amount = 0;

                if (address(token0) != address(DeFi)) {
                    path[1] = address(token0);
                    total = token0.balanceOf(address(this));
                    DeFiSwapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(half0, 0, path, address(this), block.timestamp);
                    half0 = token0.balanceOf(address(this)).sub(total);
                    token0.approve(address(DeFiSwapRouter), uint256(-1));
                }

                if (address(token1) != address(DeFi)) {
                    path[1] = address(token1);
                    total = token1.balanceOf(address(this));
                    DeFiSwapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(half1, 0, path, address(this), block.timestamp);
                    half1 = token1.balanceOf(address(this)).sub(total);
                    token1.approve(address(DeFiSwapRouter), uint256(-1));
                }

                total = pool.lpToken.balanceOf(address(this));
                DeFiSwapRouter.addLiquidity(address(token0), address(token1), half0, half1, 0, 0, address(this), block.timestamp);
                _amount = pool.lpToken.balanceOf(address(this)).sub(total);
            }

            if (_amount > 0) {
                if (pool.depositFeeBP > 0) {
                    uint256 depositFee = _amount.mul(pool.depositFeeBP).div(20000);
                    pool.lpToken.safeTransfer(feeAddress, depositFee);
                    user.amount = user.amount.add(_amount).sub(depositFee);
                    if (_canHarvest) user.compoundAmount = 0;
                    else user.compoundAmount = user.compoundAmount.add(_amount).sub(depositFee);
                } else {
                    user.amount = user.amount.add(_amount);
                    if (_canHarvest) user.compoundAmount = 0;
                    else user.compoundAmount = user.compoundAmount.add(_amount);
                }
            }
        }
        user.rewardDebt = user.amount.mul(pool.accDeFiPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);

        if (canHarvest(_pid, msg.sender)) {
            payOrLockupPendingDeFi(_pid, false);
        } else {
            // Pending to fee address in case withdraw before nextHarvestUntil.
            uint256 pending = user.amount.mul(pool.accDeFiPerShare).div(1e12).sub(user.rewardDebt).add(user.rewardLockedUp);
            if (pending > 0) safeDeFiTransfer(feeAddress, pending);

            // Compound Amount to fee address in case withdraw before nextHarvestUntil.
            if (user.compoundAmount > 0) {
                pool.lpToken.safeTransfer(feeAddress, user.compoundAmount);
                user.amount = user.amount.sub(user.compoundAmount);
                if (_amount > user.amount) _amount = user.amount;
                user.compoundAmount = 0;
            }
            totalLockedUpRewards = totalLockedUpRewards.sub(user.rewardLockedUp);
            user.rewardLockedUp = 0;
        }

        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accDeFiPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;

        // Pending to fee address in case emergency withdraw
        uint256 pending = user.amount.mul(pool.accDeFiPerShare).div(1e12).sub(user.rewardDebt).add(user.rewardLockedUp);
        if (pending > 0) safeDeFiTransfer(feeAddress, pending);

        // Compound Amount to fee address in case emergency withdraw
        if (user.compoundAmount > 0) {
            pool.lpToken.safeTransfer(feeAddress, user.compoundAmount);
            amount = amount.sub(user.compoundAmount);
            user.compoundAmount = 0;
        }

        totalLockedUpRewards = totalLockedUpRewards.sub(user.rewardLockedUp);
        user.amount = 0;
        user.rewardDebt = 0;
        user.rewardLockedUp = 0;
        user.nextHarvestUntil = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // Pay or lockup pending DeFis.
    function payOrLockupPendingDeFi(uint256 _pid, bool _compound) internal returns (uint256 total) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        total = 0;

        if (user.nextHarvestUntil == 0) {
            user.nextHarvestUntil = (block.number < startBlock ? startTime : block.timestamp) + pool.harvestInterval.div(_compound ? 2 : 1);
        }

        uint256 pending = user.amount.mul(pool.accDeFiPerShare).div(1e12).sub(user.rewardDebt);
        if (canHarvest(_pid, msg.sender) || _compound) {
            if (pending > 0 || user.rewardLockedUp > 0) {
                total = pending.add(user.rewardLockedUp);

                // reset lockup
                totalLockedUpRewards = totalLockedUpRewards.sub(user.rewardLockedUp);
                user.rewardLockedUp = 0;
                user.compoundAmount = 0;
                uint256 newHarvestUntil = (block.number < startBlock ? startTime : block.timestamp) + pool.harvestInterval.div(_compound ? 2 : 1);
                if (newHarvestUntil > user.nextHarvestUntil) user.nextHarvestUntil = newHarvestUntil;
                // send rewards
                if (! _compound) safeDeFiTransfer(msg.sender, total);
                payReferralCommission(msg.sender, total);
            }
        } else if (pending > 0) {
            user.rewardLockedUp = user.rewardLockedUp.add(pending);
            totalLockedUpRewards = totalLockedUpRewards.add(pending);
            emit RewardLockedUp(msg.sender, _pid, pending);
        }
    }

    // Safe DeFi transfer function, just in case if rounding error causes pool to not have enough DeFis.
    function safeDeFiTransfer(address _to, uint256 _amount) internal {
        uint256 DeFiBal = DeFi.balanceOf(address(this));
        if (_amount > DeFiBal) {
            DeFi.transfer(_to, DeFiBal);
        } else {
            DeFi.transfer(_to, _amount);
        }
    }

    function setFeeAddress(address _feeAddress) public {
        require(msg.sender == feeAddress, "setFeeAddress: FORBIDDEN");
        require(_feeAddress != address(0), "setFeeAddress: ZERO");
        feeAddress = _feeAddress;
    }

    // DeFi has to add hidden dummy pools in order to alter the emission, here we make it simple and transparent to all.
    function updateEmissionRate(uint256 _DeFiPerBlock) public onlyOwner {
        massUpdatePools();
        emit EmissionRateUpdated(msg.sender, DeFiPerBlock, _DeFiPerBlock);
        DeFiPerBlock = _DeFiPerBlock;
    }

    // Update the DeFi referral contract address by the owner
    function setDeFiReferral(IDeFiReferral _DeFiReferral) public onlyOwner {
        DeFiReferral = _DeFiReferral;
    }

    // Update referral commission rate by the owner
    function setReferralCommissionRate(uint16 _referralCommissionRate) public onlyOwner {
        require(_referralCommissionRate <= MAXIMUM_REFERRAL_COMMISSION_RATE, "setReferralCommissionRate: invalid referral commission rate basis points");
        referralCommissionRate = _referralCommissionRate;
    }

    // Pay referral commission to the referrer who referred this user.
    function payReferralCommission(address _user, uint256 _pending) internal {
        if (address(DeFiReferral) != address(0) && referralCommissionRate > 0) {
            address referrer = DeFiReferral.getReferrer(_user);
            uint256 commissionAmount = _pending.mul(referralCommissionRate).div(10000);

            if (referrer != address(0) && commissionAmount > 0) {
                DeFi.mint(referrer, commissionAmount);
                DeFiReferral.recordReferralCommission(referrer, commissionAmount);
                emit ReferralCommissionPaid(_user, referrer, commissionAmount);
            }
        }
    }

    // Update StartBlock block number when DeFi mining starts.
    function setStartBlock(uint256 newStartBlock) public onlyOwner {
        emit StartBlockUpdated(msg.sender, startBlock, newStartBlock);
        startBlock = newStartBlock;
    }

    // Update StartTime when DeFi Harvest countdown starts.
    function setStartTime(uint256 newStartTime) public onlyOwner {
        emit StartTimeUpdated(msg.sender, startTime, newStartTime);
        startTime = newStartTime;
    }

    // Update the DeFi swap router.
    function setDeFiSwapRouter(address _router) public onlyOwner {
        DeFiSwapRouter = IUniswapV2Router02(_router);
        emit DeFiSwapRouterUpdated(msg.sender, address(DeFiSwapRouter));
    }

    // Exclude or include an address from Vault list.
    function setVault(address _account, bool _excluded) public onlyOwner {
        isVault[_account] = _excluded;
    }

}

File 3 of 15 : BEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "./IBEP20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

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

    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 4 of 15 : IBEP20.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.4.0;

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

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

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

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

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

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

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

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

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

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

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

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

File 5 of 15 : IDeFiReferral.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

interface IDeFiReferral {
    /**
     * @dev Record referral.
     */
    function recordReferral(address user, address referrer) external;

    /**
     * @dev Record referral commission.
     */
    function recordReferralCommission(address referrer, uint256 commission) external;

    /**
     * @dev Get the referrer address that referred the user.
     */
    function getReferrer(address user) external view returns (address);
}

File 6 of 15 : SafeBEP20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

import "./IBEP20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

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

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

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

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

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

    function safeDecreaseAllowance(
        IBEP20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(
            value,
            "SafeBEP20: decreased allowance below zero"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

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

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

File 7 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        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 8 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        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) {
        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) {
        // 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) {
        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) {
        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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        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) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        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) {
        require(b > 0, "SafeMath: modulo by zero");
        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) {
        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.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        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) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 9 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <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 10 of 15 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

File 11 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 () internal {
        _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 12 of 15 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

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

    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(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

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

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 13 of 15 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint 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 (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint 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 (uint);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    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 (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 14 of 15 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

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

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 15 of 15 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"contract DeFiToken","name":"_DeFi","type":"address"},{"internalType":"uint256","name":"_DeFiPerBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"router","type":"address"}],"name":"DeFiSwapRouterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newAmount","type":"uint256"}],"name":"EmissionRateUpdated","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"commissionAmount","type":"uint256"}],"name":"ReferralCommissionPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountLockedUp","type":"uint256"}],"name":"RewardLockedUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousStartBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newStartBlock","type":"uint256"}],"name":"StartBlockUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousStartTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"StartTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BONUS_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DeFi","outputs":[{"internalType":"contract DeFiToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DeFiPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DeFiReferral","outputs":[{"internalType":"contract IDeFiReferral","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DeFiSwapRouter","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_HARVEST_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_REFERRAL_COMMISSION_RATE","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IBEP20","name":"_lpToken","type":"address"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_allocPointSecondary","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"canHarvest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingDeFi","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBEP20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IBEP20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accDeFiPerShare","type":"uint256"},{"internalType":"uint16","name":"depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"harvestInterval","type":"uint256"},{"internalType":"uint256","name":"allocPointPrimary","type":"uint256"},{"internalType":"uint256","name":"allocPointSecondary","type":"uint256"},{"internalType":"uint256","name":"nextAllocPointUntil","type":"uint256"},{"internalType":"uint256","name":"nextAllocPoint","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"}],"name":"recordReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"referralCommissionRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint16","name":"_depositFeeBP","type":"uint16"},{"internalType":"uint256","name":"_harvestInterval","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_allocPointSecondary","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IDeFiReferral","name":"_DeFiReferral","type":"address"}],"name":"setDeFiReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setDeFiSwapRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_referralCommissionRate","type":"uint16"}],"name":"setReferralCommissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStartBlock","type":"uint256"}],"name":"setStartBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newStartTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_excluded","type":"bool"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalLockedUpRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_DeFiPerBlock","type":"uint256"}],"name":"updateEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"rewardLockedUp","type":"uint256"},{"internalType":"uint256","name":"nextHarvestUntil","type":"uint256"},{"internalType":"uint256","name":"compoundAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600955600d805461ffff60a01b1916604b60a21b1790553480156200002a57600080fd5b506040516200391338038062003913833981810160405260408110156200005057600080fd5b508051602090910151600062000065620000e5565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055600280546001600160a01b039093166001600160a01b03199384161790556004556003805490911633179055620000e9565b3390565b61381a80620000f96000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c806364c720fd1161013b578063aa5f7e26116100b8578063de73149d1161007c578063de73149d14610694578063df26f6971461069c578063e2bbb158146106c8578063f2fde38b146106eb578063f35e4a6e1461071157610248565b8063aa5f7e26146105f7578063caa84cd114610614578063cbd258b51461065e578063d30ef61b14610684578063d899c87c1461068c57610248565b80638aa28550116100ff5780638aa28550146105475780638da5cb5b1461054f5780638dbb1e3a1461055757806393f1a40b1461057a578063a67e47d9146105d157610248565b806364c720fd146104e35780636e22e8bd146104eb578063715018a61461051157806378e97925146105195780638705fcd41461052157610248565b8063474fa630116101c957806355dbc8261161018d57806355dbc8261461047c5780636051e0ad1461049d578063627f66c6146104a5578063630b5ba1146104d3578063632dff14146104db57610248565b8063474fa6301461041357806348b22bfb1461041b57806348cd4cb11461043a57806351eb05a6146104425780635312ea8e1461045f57610248565b80632e6c998d116102105780632e6c998d1461032e5780632fb76f241461036e5780633e0a322d146103af57806341275358146103cc578063441a3e70146103f057610248565b8063069958921461024d578063081e3eda146102755780630ba84cd21461028f5780631526fe27146102ac57806317caf6f114610326575b600080fd5b6102736004803603602081101561026357600080fd5b50356001600160a01b031661072e565b005b61027d6107e2565b60408051918252519081900360200190f35b610273600480360360208110156102a557600080fd5b50356107e8565b6102c9600480360360208110156102c257600080fd5b5035610895565b604080516001600160a01b03909b168b5260208b019990995289890197909752606089019590955261ffff909316608088015260a087019190915260c086015260e085015261010084015261012083015251908190036101400190f35b61027d610905565b61035a6004803603604081101561034457600080fd5b50803590602001356001600160a01b031661090b565b604080519115158252519081900360200190f35b610273600480360360c081101561038457600080fd5b5080359060208101359061ffff60408201351690606081013590608081013515159060a0013561095c565b610273600480360360208110156103c557600080fd5b5035610bde565b6103d4610c83565b604080516001600160a01b039092168252519081900360200190f35b6102736004803603604081101561040657600080fd5b5080359060200135610c92565b61027d610ee6565b610423610eec565b6040805161ffff9092168252519081900360200190f35b61027d610ef2565b6102736004803603602081101561045857600080fd5b5035610ef8565b6102736004803603602081101561047557600080fd5b5035611131565b6102736004803603602081101561049257600080fd5b503561ffff166112d8565b61027d6113a1565b610273600480360360408110156104bb57600080fd5b506001600160a01b03813516906020013515156113a7565b610273611434565b6103d4611457565b6103d4611466565b6102736004803603602081101561050157600080fd5b50356001600160a01b0316611475565b610273611570565b61027d61161c565b6102736004803603602081101561053757600080fd5b50356001600160a01b0316611622565b61027d6116f4565b6103d46116f9565b61027d6004803603604081101561056d57600080fd5b5080359060200135611708565b6105a66004803603604081101561059057600080fd5b50803590602001356001600160a01b0316611720565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b610273600480360360208110156105e757600080fd5b50356001600160a01b031661175a565b6102736004803603602081101561060d57600080fd5b50356117de565b610273600480360360c081101561062a57600080fd5b508035906001600160a01b036020820135169061ffff60408201351690606081013590608081013515159060a001356122f9565b61035a6004803603602081101561067457600080fd5b50356001600160a01b03166125e7565b6104236125fc565b6103d461260d565b61027d61261c565b61027d600480360360408110156106b257600080fd5b50803590602001356001600160a01b0316612623565b610273600480360360408110156106de57600080fd5b508035906020013561279d565b6102736004803603602081101561070157600080fd5b50356001600160a01b0316612a1c565b6102736004803603602081101561072757600080fd5b5035612b1e565b610736612bc3565b6001600160a01b03166107476116f9565b6001600160a01b031614610790576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b03838116919091179182905560405191169033907fd8399fd42cde3f4c97492418c25373e6454a9b24ac18f04730d4566f2233afaf90600090a350565b60065490565b6107f0612bc3565b6001600160a01b03166108016116f9565b6001600160a01b03161461084a576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b610852611434565b6004546040805191825260208201839052805133927feedc6338c9c1ad8f3cd6c90dd09dbe98dbd57e610d3e59a17996d07acb0d951192908290030190a2600455565b600681815481106108a257fe5b60009182526020909120600a909102018054600182015460028301546003840154600485015460058601546006870154600788015460088901546009909901546001600160a01b03909816995095979496939561ffff909316949193909291908a565b60095481565b3360009081526005602052604081205460ff161561092b57506001610956565b5060008281526007602090815260408083206001600160a01b03851684529091529020600301544210155b92915050565b610964612bc3565b6001600160a01b03166109756116f9565b6001600160a01b0316146109be576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b6101908461ffff161115610a035760405162461bcd60e51b81526004018080602001828103825260258152602001806137a06025913960400191505060405180910390fd5b62127500831115610a5b576040805162461bcd60e51b815260206004820152601d60248201527f7365743a20696e76616c6964206861727665737420696e74657276616c000000604482015290519081900360640190fd5b8115610a6957610a69611434565b610aa685610aa060068981548110610a7d57fe5b90600052602060002090600a020160010154600954612bc790919063ffffffff16565b90612c24565b6009819055508460068781548110610aba57fe5b90600052602060002090600a0201600101819055508360068781548110610add57fe5b90600052602060002090600a020160040160006101000a81548161ffff021916908361ffff1602179055508260068781548110610b1657fe5b90600052602060002090600a0201600501819055508460068781548110610b3957fe5b90600052602060002090600a0201600601819055508060068781548110610b5c57fe5b90600052602060002090600a0201600701819055508060068781548110610b7f57fe5b90600052602060002090600a02016009018190555082600a544310610baf5783844281610ba857fe5b0402610bb3565b600b545b0160068781548110610bc157fe5b90600052602060002090600a020160080181905550505050505050565b610be6612bc3565b6001600160a01b0316610bf76116f9565b6001600160a01b031614610c40576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b600b546040805191825260208201839052805133927f89cc6ac7f7b34b5cd7ca58f57a8b08a50559148b11e6976bd9a8e3761fc7cfe892908290030190a2600b55565b6003546001600160a01b031681565b60026001541415610cd8576040805162461bcd60e51b815260206004820152601f602482015260008051602061364d833981519152604482015290519081900360640190fd5b6002600181905550600060068381548110610cef57fe5b6000918252602080832086845260078252604080852033865290925292208054600a9092029092019250831115610d62576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b610d6b84610ef8565b610d75843361090b565b15610d8b57610d85846000612c7e565b50610e5b565b6000610dcd8260020154610aa08460010154610dc764e8d4a51000610dc189600301548960000154612e6e90919063ffffffff16565b90612ec7565b90612bc7565b90508015610deb57600354610deb906001600160a01b031682612f2e565b600482015415610e3e5760035460048301548454610e17926001600160a01b03918216929116906130bc565b60048201548254610e2791612bc7565b808355841115610e3657815493505b600060048301555b6002820154600c54610e4f91612bc7565b600c5550600060028201555b8215610e85578054610e6d9084612bc7565b81558154610e85906001600160a01b031633856130bc565b60038201548154610ea09164e8d4a5100091610dc191612e6e565b6001820155604080518481529051859133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050600180555050565b600c5481565b6103e881565b600a5481565b600060068281548110610f0757fe5b90600052602060002090600a0201905080600201544311610f28575061112e565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610f7257600080fd5b505afa158015610f86573d6000803e3d6000fd5b505050506040513d6020811015610f9c57600080fd5b50519050801580610faf57506001820154155b15610fc157504360029091015561112e565b6000610fd1836002015443611708565b90506000610ffe600954610dc18660010154610ff860045487612e6e90919063ffffffff16565b90612e6e565b600254604080516340c10f1960e01b81523060048201526024810184905290519293506001600160a01b03909116916340c10f199160448082019260009290919082900301818387803b15801561105457600080fd5b505af1158015611068573d6000803e3d6000fd5b5050505061109661108b84610dc164e8d4a5100085612e6e90919063ffffffff16565b600386015490612c24565b600385015543600285015560088401544210611129576110cd8460090154610aa08660010154600954612bc790919063ffffffff16565b6009908155840154600185018190556006850154146110f05783600601546110f6565b83600701545b60098501556005840154600a54431061111e57600585015480428161111757fe5b0402611122565b600b545b0160088501555b505050505b50565b60026001541415611177576040805162461bcd60e51b815260206004820152601f602482015260008051602061364d833981519152604482015290519081900360640190fd5b600260018190555060006006828154811061118e57fe5b600091825260208083208584526007825260408085203386529092529083208054600282015460018301546003600a909602909401948501549496509194909390926111f09291610aa09190610dc79064e8d4a5100090610dc1908990612e6e565b9050801561120e5760035461120e906001600160a01b031682612f2e565b600483015415611254576003546004840154855461123a926001600160a01b03918216929116906130bc565b600483015461124a908390612bc7565b6000600485015591505b6002830154600c5461126591612bc7565b600c556000808455600184018190556002840181905560038401558354611296906001600160a01b031633846130bc565b604080518381529051869133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a3505060018055505050565b6112e0612bc3565b6001600160a01b03166112f16116f9565b6001600160a01b03161461133a576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b6103e861ffff8216111561137f5760405162461bcd60e51b81526004018080602001828103825260488152602001806136926048913960600191505060405180910390fd5b600d805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b60045481565b6113af612bc3565b6001600160a01b03166113c06116f9565b6001600160a01b031614611409576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600560205260409020805460ff1916911515919091179055565b60065460005b818110156114535761144b81610ef8565b60010161143a565b5050565b600e546001600160a01b031681565b600d546001600160a01b031681565b600260015414156114bb576040805162461bcd60e51b815260206004820152601f602482015260008051602061364d833981519152604482015290519081900360640190fd5b6002600155600d546001600160a01b0316158015906114e257506001600160a01b03811615155b80156114f757506001600160a01b0381163314155b1561156957600d5460408051630c7f7b6b60e01b81523360048201526001600160a01b03848116602483015291519190921691630c7f7b6b91604480830192600092919082900301818387803b15801561155057600080fd5b505af1158015611564573d6000803e3d6000fd5b505050505b5060018055565b611578612bc3565b6001600160a01b03166115896116f9565b6001600160a01b0316146115d2576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600b5481565b6003546001600160a01b03163314611681576040805162461bcd60e51b815260206004820152601860248201527f736574466565416464726573733a20464f5242494444454e0000000000000000604482015290519081900360640190fd5b6001600160a01b0381166116d2576040805162461bcd60e51b8152602060048201526013602482015272736574466565416464726573733a205a45524f60681b604482015290519081900360640190fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600181565b6000546001600160a01b031690565b60006117196001610ff88486612bc7565b9392505050565b6007602090815260009283526040808420909152908252902080546001820154600283015460038401546004909401549293919290919085565b611762612bc3565b6001600160a01b03166117736116f9565b6001600160a01b0316146117bc576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60026001541415611824576040805162461bcd60e51b815260206004820152601f602482015260008051602061364d833981519152604482015290519081900360640190fd5b6002600155600e546001600160a01b03166118705760405162461bcd60e51b815260040180806020018281038252602f81526020018061372a602f913960400191505060405180910390fd5b6000806006838154811061188057fe5b600091825260208083208684526007825260408085203386529092529220600a90910290910191506118b184610ef8565b60006118bd853361090b565b905060006118cc866001612c7e565b9050801561229657600254604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561191f57600080fd5b505afa158015611933573d6000803e3d6000fd5b505050506040513d602081101561194957600080fd5b50519450848111156119585750835b60025484546001600160a01b0390811691161415611978578094506121c2565b600254600e546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156119d257600080fd5b505af11580156119e6573d6000803e3d6000fd5b505050506040513d60208110156119fc57600080fd5b5050835460408051630dfe168160e01b815290516001600160a01b03909216916000918391630dfe168191600480820192602092909190829003018186803b158015611a4757600080fd5b505afa158015611a5b573d6000803e3d6000fd5b505050506040513d6020811015611a7157600080fd5b50516040805163d21220a760e01b815290519192506000916001600160a01b0385169163d21220a7916004808301926020929190829003018186803b158015611ab957600080fd5b505afa158015611acd573d6000803e3d6000fd5b505050506040513d6020811015611ae357600080fd5b505190506000611af4856002612ec7565b90506000611b028683612bc7565b604080516002808252606080830184529394509091602083019080368337505060025482519293506001600160a01b031691839150600090611b4057fe5b6001600160a01b03928316602091820292909201015260025460009c508c9850868216911614611de5578481600181518110611b7857fe5b60200260200101906001600160a01b031690816001600160a01b031681525050846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611be557600080fd5b505afa158015611bf9573d6000803e3d6000fd5b505050506040513d6020811015611c0f57600080fd5b5051600e54604051635c11d79560e01b8152600481018681526000602483018190523060648401819052426084850181905260a060448601908152885160a48701528851979e506001600160a01b0390961696635c11d795968b9694958a95909260c490910190602087810191028083838b5b83811015611c9a578181015183820152602001611c82565b505050509050019650505050505050600060405180830381600087803b158015611cc357600080fd5b505af1158015611cd7573d6000803e3d6000fd5b50505050611d5e87866001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611d2c57600080fd5b505afa158015611d40573d6000803e3d6000fd5b505050506040513d6020811015611d5657600080fd5b505190612bc7565b600e546040805163095ea7b360e01b81526001600160a01b039283166004820152600019602482015290519295509087169163095ea7b3916044808201926020929091908290030181600087803b158015611db857600080fd5b505af1158015611dcc573d6000803e3d6000fd5b505050506040513d6020811015611de257600080fd5b50505b6002546001600160a01b03858116911614612043578381600181518110611e0857fe5b60200260200101906001600160a01b031690816001600160a01b031681525050836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e7557600080fd5b505afa158015611e89573d6000803e3d6000fd5b505050506040513d6020811015611e9f57600080fd5b5051600e54604051635c11d79560e01b8152600481018581526000602483018190523060648401819052426084850181905260a060448601908152885160a48701528851979e506001600160a01b0390961696635c11d795968a9694958a95909260c490910190602087810191028083838b5b83811015611f2a578181015183820152602001611f12565b505050509050019650505050505050600060405180830381600087803b158015611f5357600080fd5b505af1158015611f67573d6000803e3d6000fd5b50505050611fbc87856001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611d2c57600080fd5b600e546040805163095ea7b360e01b81526001600160a01b039283166004820152600019602482015290519294509086169163095ea7b3916044808201926020929091908290030181600087803b15801561201657600080fd5b505af115801561202a573d6000803e3d6000fd5b505050506040513d602081101561204057600080fd5b50505b8954604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561208d57600080fd5b505afa1580156120a1573d6000803e3d6000fd5b505050506040513d60208110156120b757600080fd5b5051600e546040805162e8e33760e81b81526001600160a01b0389811660048301528881166024830152604482018890526064820187905260006084830181905260a483018190523060c48401524260e48401529251949b509092169263e8e3370092610104808201936060939283900390910190829087803b15801561213d57600080fd5b505af1158015612151573d6000803e3d6000fd5b505050506040513d606081101561216757600080fd5b50508954604080516370a0823160e01b815230600482015290516121b9928a926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015611d2c57600080fd5b9a505050505050505b841561229657600484015461ffff16156122615760048401546000906121f590614e2090610dc190899061ffff16612e6e565b6003548654919250612214916001600160a01b039081169116836130bc565b8354612226908290610dc79089612c24565b8455821561223a576000600485015561225b565b61225581610dc7888760040154612c2490919063ffffffff16565b60048501555b50612296565b825461226d9086612c24565b835581156122815760006004840155612296565b60048301546122909086612c24565b60048401555b600384015483546122b19164e8d4a5100091610dc191612e6e565b6001840155604080518681529051879133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350506001805550505050565b612301612bc3565b6001600160a01b03166123126116f9565b6001600160a01b03161461235b576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b6001600160a01b038516600090815260086020526040902054859060ff16156123cb576040805162461bcd60e51b815260206004820152601960248201527f6e6f6e4475706c6963617465643a206475706c69636174656400000000000000604482015290519081900360640190fd5b6101908561ffff1611156124105760405162461bcd60e51b815260040180806020018281038252602581526020018061366d6025913960400191505060405180910390fd5b62127500841115612468576040805162461bcd60e51b815260206004820152601d60248201527f6164643a20696e76616c6964206861727665737420696e74657276616c000000604482015290519081900360640190fd5b821561247657612476611434565b6000600a54431161248957600a5461248b565b435b60095490915061249b9089612c24565b6009556001600160a01b0387166000818152600860209081526040808320805460ff191660011790558051610140810182529384529083018b90528201839052606082015261ffff8716608082015260a0810186905260c0810189905260e08101849052600a546006919061010082019088904310612525578889428161251e57fe5b0402612529565b600b545b0181526020908101959095528154600180820184556000938452928690208251600a9092020180546001600160a01b0319166001600160a01b0390921691909117815594810151918501919091556040810151600285015560608101516003850155608081015160048501805461ffff191661ffff90921691909117905560a0810151600585015560c0810151600685015560e081015160078501556101008101516008850155610120015160099093019290925550505050505050565b60086020526000908152604090205460ff1681565b600d54600160a01b900461ffff1681565b6002546001600160a01b031681565b6212750081565b6000806006848154811061263357fe5b600091825260208083208784526007825260408085206001600160a01b038981168752908452818620600a959095029092016003810154815483516370a0823160e01b815230600482015293519298509596909590949316926370a082319260248082019391829003018186803b1580156126ad57600080fd5b505afa1580156126c1573d6000803e3d6000fd5b505050506040513d60208110156126d757600080fd5b50516002850154909150431180156126ee57508015155b1561274e576000612703856002015443611708565b9050600061272a600954610dc18860010154610ff860045487612e6e90919063ffffffff16565b905061274961274284610dc18464e8d4a51000612e6e565b8590612c24565b935050505b60006127788460010154610dc764e8d4a51000610dc1878960000154612e6e90919063ffffffff16565b9050612791846002015482612c2490919063ffffffff16565b98975050505050505050565b600260015414156127e3576040805162461bcd60e51b815260206004820152601f602482015260008051602061364d833981519152604482015290519081900360640190fd5b60026001819055506000600683815481106127fa57fe5b600091825260208083208684526007825260408085203386529092529220600a909102909101915061282b84610ef8565b612836846000612c7e565b5082156129bb578154612854906001600160a01b031633308661310e565b3360009081526005602052604090205460ff16158015612883575060025482546001600160a01b039081169116145b15612928576000612918612710610dc1600260009054906101000a90046001600160a01b03166001600160a01b031663b65d08b06040518163ffffffff1660e01b815260040160206040518083038186803b1580156128e157600080fd5b505afa1580156128f5573d6000803e3d6000fd5b505050506040513d602081101561290b57600080fd5b5051879061ffff16612e6e565b90506129248482612bc7565b9350505b3360009081526005602052604090205460ff1615801561294f5750600482015461ffff1615155b156129ac5760048201546000906129739061271090610dc190879061ffff16612e6e565b6003548454919250612992916001600160a01b039081169116836130bc565b81546129a4908290610dc79087612c24565b8255506129bb565b80546129b89084612c24565b81555b600382015481546129d69164e8d4a5100091610dc191612e6e565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050600180555050565b612a24612bc3565b6001600160a01b0316612a356116f9565b6001600160a01b031614612a7e576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b6001600160a01b038116612ac35760405162461bcd60e51b81526004018080602001828103825260268152602001806137046026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b612b26612bc3565b6001600160a01b0316612b376116f9565b6001600160a01b031614612b80576040805162461bcd60e51b815260206004820181905260248201526000805160206137c5833981519152604482015290519081900360640190fd5b600a546040805191825260208201839052805133927f2261b0608377dfea3647390a585c309d8dc877219b37f164a0f966973be8851192908290030190a2600a55565b3390565b600082821115612c1e576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015611719576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008060068481548110612c8e57fe5b600091825260208083208784526007825260408085203386529092529083206003810154939550600a90920201925090612cfc57612ce284612cd1576001612cd4565b60025b60058401549060ff16612ec7565b600a544310612cf15742612cf5565b600b545b0160038201555b6000612d2a8260010154610dc764e8d4a51000610dc187600301548760000154612e6e90919063ffffffff16565b9050612d36863361090b565b80612d3e5750845b15612e03576000811180612d56575060008260020154115b15612dfe576002820154612d6b908290612c24565b9350612d868260020154600c54612bc790919063ffffffff16565b600c5560006002830181905560048301819055612db986612da8576001612dab565b60025b60058601549060ff16612ec7565b600a544310612dc85742612dcc565b600b545b0190508260030154811115612de357600383018190555b85612df257612df23386612f2e565b612dfc338661316e565b505b612e65565b8015612e65576002820154612e189082612c24565b6002830155600c54612e2a9082612c24565b600c55604080518281529051879133917fee470483107f579a55c754fa00613c45a9a3b617a418b39cb0be97e5381ba7c19181900360200190a35b50505092915050565b600082612e7d57506000610956565b82820282848281612e8a57fe5b04146117195760405162461bcd60e51b815260040180806020018281038252602181526020018061377f6021913960400191505060405180910390fd5b6000808211612f1d576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612f2657fe5b049392505050565b600254604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015612f7957600080fd5b505afa158015612f8d573d6000803e3d6000fd5b505050506040513d6020811015612fa357600080fd5b5051905080821115613037576002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561300557600080fd5b505af1158015613019573d6000803e3d6000fd5b505050506040513d602081101561302f57600080fd5b506130b79050565b6002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561308d57600080fd5b505af11580156130a1573d6000803e3d6000fd5b505050506040513d602081101561112957600080fd5b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526130b790849061337e565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261316890859061337e565b50505050565b600d546001600160a01b0316158015906131945750600d54600160a01b900461ffff1615155b1561145357600d5460408051634a9fefc760e01b81526001600160a01b03858116600483015291516000939290921691634a9fefc791602480820192602092909190829003018186803b1580156131ea57600080fd5b505afa1580156131fe573d6000803e3d6000fd5b505050506040513d602081101561321457600080fd5b5051600d5490915060009061323d9061271090610dc1908690600160a01b900461ffff16612e6e565b90506001600160a01b038216158015906132575750600081115b1561316857600254604080516340c10f1960e01b81526001600160a01b03858116600483015260248201859052915191909216916340c10f1991604480830192600092919082900301818387803b1580156132b157600080fd5b505af11580156132c5573d6000803e3d6000fd5b5050600d5460408051631b82d29760e31b81526001600160a01b03878116600483015260248201879052915191909216935063dc1694b89250604480830192600092919082900301818387803b15801561331e57600080fd5b505af1158015613332573d6000803e3d6000fd5b50506040805184815290516001600160a01b038087169450881692507f86ddab457291316e0f5496737e5ca67c4037234c32c3be04c48ae96186893a7b9181900360200190a350505050565b60606133d3826040518060400160405280602081526020017f5361666542455032303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661342f9092919063ffffffff16565b8051909150156130b7578080602001905160208110156133f257600080fd5b50516130b75760405162461bcd60e51b815260040180806020018281038252602a8152602001806136da602a913960400191505060405180910390fd5b606061343e8484600085613446565b949350505050565b6060824710156134875760405162461bcd60e51b81526004018080602001828103825260268152602001806137596026913960400191505060405180910390fd5b613490856135a2565b6134e1576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106135205780518252601f199092019160209182019101613501565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613582576040519150601f19603f3d011682016040523d82523d6000602084013e613587565b606091505b50915091506135978282866135a8565b979650505050505050565b3b151590565b606083156135b7575081611719565b8251156135c75782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156136115781810151838201526020016135f9565b50505050905090810190601f16801561363e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c006164643a20696e76616c6964206465706f7369742066656520626173697320706f696e7473736574526566657272616c436f6d6d697373696f6e526174653a20696e76616c696420726566657272616c20636f6d6d697373696f6e207261746520626173697320706f696e74735361666542455032303a204245503230206f7065726174696f6e20646964206e6f7420737563636565644f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373446546693a3a636f6d706f756e643a20496e76616c6964204465466953776170526f7574657220616464726573732e416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777365743a20696e76616c6964206465706f7369742066656520626173697320706f696e74734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220c4ea6a4ef03ebdab3620a364c5a50992fb709abc6ce182971d72ca84c3ae2f2464736f6c634300060c00330000000000000000000000008a5a76401ada8998603d982d8343752fec75972b0000000000000000000000000000000000000000000000000de0b6b3a7640000

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

0000000000000000000000008a5a76401ada8998603d982d8343752fec75972b0000000000000000000000000000000000000000000000000de0b6b3a7640000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008a5a76401ada8998603d982d8343752fec75972b
Arg [1] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading