Contract 0x48C42579D98Aa768cde893F8214371ed607CABE3 3

 

Contract Overview

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xed7bb085690f8d1886e0c818e08986b5ca9c3ce1eeb49a45d761be15538dcb47Withdraw132962982021-12-08 12:37:561 min ago0xd25a8996dc69a88b432710652c6dce93ab03f26f IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.000393245
0x9bcd38068b189a45874d545233a6bad44f4220720e63c85c2703ea7803288e77Deposit132962942021-12-08 12:37:431 min ago0xee21c2d92e2ceda874a5d99d4b889d974b40de0d IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00038082
0x5f09c6fbc75ca059832e598d0eb93e16665f102296c413ba25f463bb94055fc0Deposit132962522021-12-08 12:35:313 mins ago0x24c28b26b8300060b75e04233bf9a59bfd738e1e IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00055011
0x017e3b49e1dfcdafdad66bf28d008f2cc41cfd12d57f0bee73beb5434c9e6710Deposit132961412021-12-08 12:29:109 mins ago0xedeb06ef9b783b2bc33c6a7bc978649b65183e11 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.000469205
0x697e8715a444571b3d246a0d60b00708c0f35f75e151609f819f11203abedd37Deposit132961182021-12-08 12:27:4711 mins ago0xcd40610fbe7d1141d4fb855e344b44a6e846348e IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.000561185
0x06c87ae3951c445a85832e62f272f7f79717142992ca816e07b4e86ca2f2829fDeposit132961012021-12-08 12:26:4512 mins ago0xbe44ad77e02917d7150e500cf7f909ddc46a8187 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.000660132
0x5acd3cca36d6a888fa98953e69f8734a4461c16a0078c880ce09849d28cd03e0Withdraw132960702021-12-08 12:24:4314 mins ago0xcd40610fbe7d1141d4fb855e344b44a6e846348e IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.000698215
0xe9083a30099a8770a650fa851f7db44d8e088a9636382c64cc6067051c06de82Deposit132960442021-12-08 12:23:1015 mins ago0x928c14ae8bb7307ac69e6010db7853c560fa5b9b IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.000395625
0x8323032da8b6af5f19b6709497e92537fed5297f30180da4833d28687d254114Deposit132960422021-12-08 12:23:0316 mins ago0xdb0300c73b44460362eb4042c5bb699d0e976eb9 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00071697
0x1c7c4972d5e8a3a27c9eb46e61aaca5c5e349c2d483924a42eb92df57cb95932Deposit132960312021-12-08 12:22:2616 mins ago0xc627dc16020c83c6d0e7575f95c8decb32b16a0b IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00064103634
0x5a53c013f21e58e204b29a856654a1b5ecf43a076fa4f9a0e09b3359aff4717bWithdraw132959772021-12-08 12:19:0819 mins ago0xc627dc16020c83c6d0e7575f95c8decb32b16a0b IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00050670081
0xd9d9b4bba56af872c53cfaf259f888f95f7a36f467619a84cc13f97a8886ee6fDeposit132959702021-12-08 12:18:4320 mins ago0x928c14ae8bb7307ac69e6010db7853c560fa5b9b IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00067342
0x28abd756fab6b79a495f20a40bd27beaacfe56ca81cb8a208d8c98b7d633b942Deposit132959492021-12-08 12:17:2821 mins ago0x2657cbab422b0c5e26d21006c6703ea2ba6dd224 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00055005
0xbd8195ec83953bf26f5dee1dbe99817cf66cc34c323b0a536f7b169ca9556a45Deposit132959432021-12-08 12:17:0821 mins ago0x608890b5c6ed5f230af1f99fb21b701ec32e1103 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00071709
0x0247159d32c4368bc8b1f80391e76dcd9ca7d3957d5d8300511023614f5576feWithdraw132959402021-12-08 12:16:5922 mins ago0x0dc502c87a90c3e5aa4afc222c64f787529026cb IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00047317
0x6bb21a80b54d35d94630ed0b92638d6bbd6604f40f1dd0040cbadd7fdc9e02bbDeposit132959282021-12-08 12:16:2322 mins ago0xe6f523c440a99f6d87f42f5e611c5c632558ea61 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00038082
0x2f2319237d00c21f38a8404e45d55481d18b3cd94ed574f306232e86f4101960Deposit132959062021-12-08 12:15:1723 mins ago0x0dc502c87a90c3e5aa4afc222c64f787529026cb IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00038082
0x4fe27363ac45759d08c90f483733227fd64a7d0b0d623d62558996e2e0b09066Deposit132958922021-12-08 12:14:3524 mins ago0x2657cbab422b0c5e26d21006c6703ea2ba6dd224 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00038082
0xc078192a3be3b47999fffead1c551459ec230e5915040fbd58e17b7560ecc8e0Deposit132958782021-12-08 12:13:4725 mins ago0x225da7c72e8cf67343facbc97a767569e5e592e3 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00055005
0x6015e166981187db8ca35462d3991f4a14e4cd43f0f1d89b8a33a129b1fda92fDeposit132958562021-12-08 12:12:3426 mins ago0x25e38d266ada488f48e75a409f5ce818a4ce0166 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00055011
0x904660ef81e2a81f7911eeef511cfce0a3773b5ad78f68d3de7deb5100ee6aa7Deposit132958492021-12-08 12:12:1026 mins ago0x45ec2ca047fd21f8d92e9ad7d03b839a6657bc08 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00059854
0x12e2ca87a74c81bee84ad855232ee1d8e666e58dc6e06811df71592fe3181f89Deposit132958482021-12-08 12:12:0726 mins ago0x1493979cac043015fb242c61895d69944b05f996 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00071703
0xa11f2fd729cc3422d66eb66b2f96bceb7864d4b59748699014b8656836764814Deposit132958202021-12-08 12:09:5029 mins ago0xb96a3036ee241df6875ab7b8317e8b3d80cfb378 IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00071709
0x5dc79c11c2a4e7d008dd19e5564124ca34fe209b7661e21c0f0459eab1a8c815Deposit132958022021-12-08 12:08:3530 mins ago0xda4255be25e1fa2635036aa19f65e321542adc0e IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.00039567
0x5124e7875f314c8b8a96c4e0ef658e931ad683be397cb091690a90985baf6f48Deposit132957832021-12-08 12:07:2731 mins ago0x4ef790410979a0621578f4c02815127fd089556c IN  0x48c42579d98aa768cde893f8214371ed607cabe30 BNB0.0002116
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xed7bb085690f8d1886e0c818e08986b5ca9c3ce1eeb49a45d761be15538dcb47132962982021-12-08 12:37:561 min ago 0x48c42579d98aa768cde893f8214371ed607cabe30xd25a8996dc69a88b432710652c6dce93ab03f26f0.000837666786113203 BNB
0x9bcd38068b189a45874d545233a6bad44f4220720e63c85c2703ea7803288e77132962942021-12-08 12:37:431 min ago 0x48c42579d98aa768cde893f8214371ed607cabe30xee21c2d92e2ceda874a5d99d4b889d974b40de0d0.041921603983561038 BNB
0x67f8c6684937926a60931b4c364ae55d6871887576003d9a753a8d195befb691132962752021-12-08 12:36:402 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe3 0x75b0539ab45c5fc088f32dad45dda0ac6923f90e0.043921488893229186 BNB
0x5f09c6fbc75ca059832e598d0eb93e16665f102296c413ba25f463bb94055fc0132962522021-12-08 12:35:313 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x24c28b26b8300060b75e04233bf9a59bfd738e1e0.323189816318410892 BNB
0x6e79d88231b003768a9ab25a643414cbfd85b2835b720943e4ca390ae4b654e0132961722021-12-08 12:30:458 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe3 0x3fb26b8d818a3c79030699510a8ce8e510a591d30.160059921941593746 BNB
0x017e3b49e1dfcdafdad66bf28d008f2cc41cfd12d57f0bee73beb5434c9e6710132961412021-12-08 12:29:109 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xedeb06ef9b783b2bc33c6a7bc978649b65183e110.000402599942596975 BNB
0x7e2c8ddfe6b2ab34576bc41497244bf0b9caa0d9ddd0f257fdcdcfcf4fef8846132961192021-12-08 12:27:5211 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe3 0xe0be31a324cb9872a9462f9252158de9937106870.003210945798912174 BNB
0x06c87ae3951c445a85832e62f272f7f79717142992ca816e07b4e86ca2f2829f132961012021-12-08 12:26:4512 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xbe44ad77e02917d7150e500cf7f909ddc46a81870.214282508265309045 BNB
0xde9baa12fea5e9a82f062db5af79fbeba1875f61e95dc141103e67b31241fbaa132960902021-12-08 12:26:0213 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe3 0xe0be31a324cb9872a9462f9252158de9937106870.179967542226460327 BNB
0x5acd3cca36d6a888fa98953e69f8734a4461c16a0078c880ce09849d28cd03e0132960702021-12-08 12:24:4314 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xcd40610fbe7d1141d4fb855e344b44a6e846348e0.003230064883113828 BNB
0xe9083a30099a8770a650fa851f7db44d8e088a9636382c64cc6067051c06de82132960442021-12-08 12:23:1015 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x928c14ae8bb7307ac69e6010db7853c560fa5b9b0.00000393710562 BNB
0x8d2e7714f647bc3c749cafcc7b9e40a128af9975fb41ed8dcca638f6bac1c225132960182021-12-08 12:21:4117 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe3 0x75b0539ab45c5fc088f32dad45dda0ac6923f90e0.00735084016935187 BNB
0x5a53c013f21e58e204b29a856654a1b5ecf43a076fa4f9a0e09b3359aff4717b132959772021-12-08 12:19:0819 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xc627dc16020c83c6d0e7575f95c8decb32b16a0b0.002881874802873781 BNB
0x34be0a369232fe54ca23333ec6aa766829dbdba535f8525e9a11031a782653a9132959752021-12-08 12:18:5920 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe3 0x75b0539ab45c5fc088f32dad45dda0ac6923f90e0.086390618548221637 BNB
0x28abd756fab6b79a495f20a40bd27beaacfe56ca81cb8a208d8c98b7d633b942132959492021-12-08 12:17:2821 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x2657cbab422b0c5e26d21006c6703ea2ba6dd2240.000016795594553863 BNB
0x0247159d32c4368bc8b1f80391e76dcd9ca7d3957d5d8300511023614f5576fe132959402021-12-08 12:16:5922 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x0dc502c87a90c3e5aa4afc222c64f787529026cb0.000040617353456007 BNB
0x6bb21a80b54d35d94630ed0b92638d6bbd6604f40f1dd0040cbadd7fdc9e02bb132959282021-12-08 12:16:2322 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xe6f523c440a99f6d87f42f5e611c5c632558ea610.006418593 BNB
0x2f2319237d00c21f38a8404e45d55481d18b3cd94ed574f306232e86f4101960132959062021-12-08 12:15:1723 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x0dc502c87a90c3e5aa4afc222c64f787529026cb0.030563310405136656 BNB
0x4fe27363ac45759d08c90f483733227fd64a7d0b0d623d62558996e2e0b09066132958922021-12-08 12:14:3524 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x2657cbab422b0c5e26d21006c6703ea2ba6dd2240.211210616597011095 BNB
0xc078192a3be3b47999fffead1c551459ec230e5915040fbd58e17b7560ecc8e0132958782021-12-08 12:13:4725 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x225da7c72e8cf67343facbc97a767569e5e592e30.001722050694196485 BNB
0x6015e166981187db8ca35462d3991f4a14e4cd43f0f1d89b8a33a129b1fda92f132958562021-12-08 12:12:3426 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x25e38d266ada488f48e75a409f5ce818a4ce01660.000211493234604792 BNB
0x5dc79c11c2a4e7d008dd19e5564124ca34fe209b7661e21c0f0459eab1a8c815132958022021-12-08 12:08:3530 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xda4255be25e1fa2635036aa19f65e321542adc0e1.09506019992056506 BNB
0xbfa1c44d0cef220e6fd6975357c90caecc7f58a020505f82c628547ef2b81454132957662021-12-08 12:06:2632 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xa5e64216ee93e112b2c3ea41b3f73a92d5651f3a0.000054913254485 BNB
0xf4a94f1a2cdb7b04c3f2f90414200e0c526b1aceea4c1fece6e05ba228d07116132957552021-12-08 12:05:4833 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30x23fdad71ade9b485c4568b86a8ba32c606faaffb0.008723722201322015 BNB
0x89c8cb0489b32ff61e7df5e18459b50a05b2481435a9132f94dd1b211e5a7aeb132956842021-12-08 12:01:3437 mins ago 0x48c42579d98aa768cde893f8214371ed607cabe30xa5309ab126e2b1f52d200eb7bf3b694748be7e6f0.000438745474617039 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LiquidityMiningMasterBNB

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 21 : DAOToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "../interfaces/IDAOToken.sol";

// DAOToken with Governance.
contract DAOToken is IDAOToken, ERC20 {
    using SafeMath for uint256;

    /// @notice A record of each accounts delegate
    mapping(address => address) public override delegates;

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

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

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

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

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

    constructor(string memory name, string memory symbol) ERC20(name, symbol) {}

    function _mint(address to, uint256 amount) internal override {
        super._mint(to, amount);
        _moveDelegates(address(0), delegates[to], amount);
    }

    function _burn(address from, uint256 amount) internal override {
        super._burn(from, amount);
        _moveDelegates(delegates[from], address(0), amount);
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) external override {
        return _delegate(_msgSender(), delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external override {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                DOMAIN_TYPEHASH,
                keccak256(bytes(name())),
                getChainId(),
                address(this)
            )
        );

        bytes32 structHash = keccak256(
            abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)
        );

        bytes32 digest = keccak256(
            abi.encodePacked("\x19\x01", domainSeparator, structHash)
        );

        address signatory = ecrecover(digest, v, r, s);
        require(
            signatory != address(0),
            "DAOToken::delegateBySig: Invalid signature"
        );
        require(
            nonce == nonces[signatory]++,
            "DAOToken::delegateBySig: Invalid nonce"
        );
        require(
            block.timestamp <= expiry,
            "DAOToken::delegateBySig: Signature expired"
        );
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account)
        external
        view
        override
        returns (uint256)
    {
        uint32 nCheckpoints = numCheckpoints[account];
        return
            nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber)
        external
        view
        override
        returns (uint256)
    {
        require(
            blockNumber < block.number,
            "DAOToken::getPriorVotes: Not yet determined"
        );

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        address currentDelegate = delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator);
        delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    /**
     * @notice Transfer `amount` tokens from `msg.sender` to `to`
     * @param to The address of the destination account
     * @param amount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transfer(address to, uint256 amount)
        public
        override
        returns (bool)
    {
        _transfer(_msgSender(), to, amount);
        _moveDelegates(delegates[_msgSender()], delegates[to], amount);
        return true;
    }

    /**
     * @notice Transfer `amount` tokens from `from` to `to`
     * @param from The address of the source account
     * @param to The address of the destination account
     * @param amount The number of tokens to transfer
     * @return Whether or not the transfer succeeded
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public override returns (bool) {
        _transfer(from, to, amount);
        _approve(
            from,
            _msgSender(),
            allowance(from, _msgSender()).sub(
                amount,
                "DAOToken::transferFrom: transfer amount exceeds allowance"
            )
        );

        _moveDelegates(delegates[from], delegates[to], amount);
        return true;
    }

    function _moveDelegates(
        address srcRep,
        address dstRep,
        uint256 amount
    ) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0
                    ? checkpoints[srcRep][srcRepNum - 1].votes
                    : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0
                    ? checkpoints[dstRep][dstRepNum - 1].votes
                    : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint256 oldVotes,
        uint256 newVotes
    ) internal {
        uint32 blockNumber = safe32(
            block.number,
            "DAOToken::_writeCheckpoint: Block number exceeds 32 bits"
        );

        if (
            nCheckpoints > 0 &&
            checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber
        ) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(
                blockNumber,
                newVotes
            );
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint256 n, string memory errorMessage)
        internal
        pure
        returns (uint32)
    {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function getChainId() internal pure returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    }
}

File 2 of 21 : ICore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

import "./IPermissions.sol";
import "../interfaces/IXMSToken.sol";
import "../interfaces/IUSDMToken.sol";

/// @title Core Interface
/// @author USDM Protocol
interface ICore is IPermissions {
    // ----------- Events -----------

    event XMSSupportRatioUpdate(uint256 _xmsSupportRatio);
    event USDMUpdate(address indexed _usdm);
    event XMSUpdate(address indexed _xms);
    event GenesisGroupUpdate(address indexed _genesisGroup);
    event TokenAllocation(address indexed _to, uint256 _amount);
    event TokenApprove(address indexed _to, uint256 _amount);
    event GenesisPeriodComplete(uint256 _timestamp);

    // ----------- Governor only state changing api -----------

    function setXMSSupportRatio(uint256 _xmsSupportRatio) external;

    function setUSDM(address token) external;

    function setXMS(address token) external;

    function setGenesisGroup(address _genesisGroup) external;

    function allocateXMS(address to, uint256 amount) external;

    function allocateToken(
        address token,
        address to,
        uint256 amount
    ) external;

    function approveXMS(address to, uint256 amount) external;

    function approveToken(
        address token,
        address to,
        uint256 amount
    ) external;

    function setApprovedPairAndContract(address _pair, address _contract)
        external;

    function removeApprovedPairAndContract(address _pair, address _contract)
        external;

    // ----------- Genesis Group only state changing api -----------

    function completeGenesisGroup() external;

    // ----------- Getters -----------

    function getApprovedPairsLength() external view returns (uint256);

    function getApprovedContractsLength(address _pair)
        external
        view
        returns (uint256);

    function approvedPairs(uint256 idx) external view returns (address);

    function approvedPairExisted(address pair) external view returns (bool);

    function approvedContracts(address pair, uint256 idx)
        external
        view
        returns (address);

    function approvedContractExisted(address pair, address _contract)
        external
        view
        returns (bool);

    function xmsSupportRatio() external view returns (uint256);

    function xmsSupportRatioPrecision() external view returns (uint256);

    function usdm() external view returns (IUSDMToken);

    function xms() external view returns (IXMSToken);

    function genesisGroup() external view returns (address);

    function hasGenesisGroupCompleted() external view returns (bool);
}

File 3 of 21 : ICoreRef.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

import "./ICore.sol";

/// @title CoreRef interface
/// @author USDM Protocol
interface ICoreRef {
    // ----------- Events -----------

    event CoreUpdate(address indexed _core);

    // ----------- Governor only state changing api -----------

    function setCore(address core_) external;

    function pause() external;

    function unpause() external;

    // ----------- Getters -----------

    function core() external view returns (ICore);

    function usdm() external view returns (IUSDMToken);

    function xms() external view returns (IXMSToken);

    function usdmBalance() external view returns (uint256);

    function xmsBalance() external view returns (uint256);

    function getUSDMAmountGovernance() external view returns (uint256);
}

File 4 of 21 : IDAOToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

interface IDAOToken {
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    // ----------- Events -----------

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

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

    // ----------- State changing api -----------

    function delegates(address delegator) external view returns (address);

    function delegate(address delegatee) external;

    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    // ----------- Getters -----------

    function getCurrentVotes(address account) external view returns (uint256);

    function getPriorVotes(address account, uint256 blockNumber)
        external
        view
        returns (uint256);
}

File 5 of 21 : ILiquidityMiningMaster.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ILiquidityMiningMaster {
    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of XMS
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accXMSPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accXMSPerShare` (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 {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. XMS to distribute per block.
        uint256 lastRewardBlock; // Last block number that XMS distribution occurs.
        uint256 accXMSPerShare; // Accumulated XMS per share, times 1e12. See below.
        bool locked;
    }

    // ----------- Events -----------

    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 UpdateEmissionRate(address indexed user, uint256 xmsPerBlock);
    event UpdateEndBlock(address indexed user, uint256 endBlock);
    event UpdateVestingMaster(address indexed user, address vestingMaster);

    // ----------- State changing api -----------

    function massUpdatePools() external;

    function updatePool(uint256 pid) external;

    function deposit(uint256 pid, uint256 amount) external;

    function withdraw(uint256 pid, uint256 amount) external;

    function emergencyWithdraw(uint256 pid) external;

    // ----------- Governor only state changing API -----------

    function addPool(
        uint256 allocPoint,
        IERC20 lpToken,
        bool locked,
        bool withUpdate
    ) external;

    function setPool(
        uint256 pid,
        uint256 allocPoint,
        bool locked,
        bool withUpdate
    ) external;

    function updateXmsPerBlock(uint256 _xmsPerBlock) external;

    function updateEndBlock(uint256 _endBlock) external;

    function updateVestingMaster(address _vestingMaster) external;

    // ----------- Getters -----------

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

    function pendingXMS(uint256 pid, address user)
        external
        view
        returns (uint256);

    function poolInfo(uint256 pid)
        external
        view
        returns (
            IERC20 lpToken,
            uint256 allocPoint,
            uint256 lastRewardBlock,
            uint256 accXMSPerShare,
            bool locked
        );

    function userInfo(uint256 pid, address user)
        external
        view
        returns (uint256 amount, uint256 rewardDebt);

    function poolExistence(IERC20 lp) external view returns (bool);

    function xmsPerBlock() external view returns (uint256);

    function BONUS_MULTIPLIER() external view returns (uint256);

    function totalAllocPoint() external view returns (uint256);

    function startBlock() external view returns (uint256);

    function endBlock() external view returns (uint256);

    function poolLength() external view returns (uint256);

    function getMultiplier(uint256 from, uint256 to)
        external
        pure
        returns (uint256);

    function rewardToken() external view returns (IERC20);
}

File 6 of 21 : IPermissions.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

/// @title Permissions interface
/// @author USDM Protocol
interface IPermissions {
    // ----------- Governor only state changing api -----------

    function createRole(bytes32 role, bytes32 adminRole) external;

    function grantMinter(address minter) external;

    function grantBurner(address burner) external;

    function grantPCVController(address pcvController) external;

    function grantGovernor(address governor) external;

    function grantGuardian(address guardian) external;

    function revokeMinter(address minter) external;

    function revokeBurner(address burner) external;

    function revokePCVController(address pcvController) external;

    function revokeGovernor(address governor) external;

    function revokeGuardian(address guardian) external;

    // ----------- Revoker only state changing api -----------

    function revokeOverride(bytes32 role, address account) external;

    // ----------- Getters -----------

    function isBurner(address _address) external view returns (bool);

    function isMinter(address _address) external view returns (bool);

    function isGovernor(address _address) external view returns (bool);

    function isGuardian(address _address) external view returns (bool);

    function isPCVController(address _address) external view returns (bool);
}

File 7 of 21 : IUSDMToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IUSDMToken is IERC20 {
    // ----------- Minter State changing api -----------

    function mint(address _to, uint256 _amount) external;

    // ----------- Burner State changing api -----------

    // ----------- State changing api -----------

    function burn(uint256 _amount) external;

    function permit(
        address owner,
        address spender,
        uint256 amount,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 8 of 21 : IVestingMaster.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IVestingMaster {
    struct LockedReward {
        uint256 locked;
        uint256 timestamp;
    }
    // ----------- Events -----------

    event Lock(address indexed user, uint256 amount);
    event Claim(address indexed user, uint256 amount);

    // ----------- Farms only State changing api -----------

    function lock(address, uint256) external;

    // ----------- state changing API -----------

    function claim() external;

    // ----------- Getters -----------

    function period() external view returns (uint256);

    function lockedPeriodAmount() external view returns (uint256);

    function vestingToken() external view returns (IERC20);

    function userLockedRewards(address account, uint256 idx)
        external
        view
        returns (uint256, uint256);

    function totalLockedRewards() external view returns (uint256);

    function getVestingAmount() external view returns (uint256, uint256);
}

File 9 of 21 : IXMSToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IXMSToken is IERC20 {
    struct Checkpoint {
        uint32 fromBlock;
        uint96 votes;
    }

    // ----------- Events -----------

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

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

    // ----------- Minter State changing api -----------

    function mint(address _to, uint256 _amount) external;

    // ----------- State changing api -----------

    function permit(
        address owner,
        address spender,
        uint256 amount,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function delegates(address delegator) external view returns (address);

    function delegate(address delegatee) external;

    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    // ----------- Getters -----------

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

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

    function decimals() external view returns (uint8);

    function getCurrentVotes(address account) external view returns (uint96);

    function getPriorVotes(address account, uint256 blockNumber)
        external
        view
        returns (uint96);
}

File 10 of 21 : TransferHelper.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

// Helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::safeApprove: Approve failed"
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::safeTransfer: Transfer failed"
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "TransferHelper::safeTransferFrom: Transfer from failed"
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, "TransferHelper::safeTransferETH: Eth transfer failed");
    }
}

File 11 of 21 : LiquidityMiningMaster.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "../interfaces/ILiquidityMiningMaster.sol";
import "../interfaces/IVestingMaster.sol";
import "../refs/CoreRef.sol";
import "../base/DAOToken.sol";

// Earn Token
contract LiquidityMiningMaster is
    ILiquidityMiningMaster,
    ReentrancyGuard,
    CoreRef,
    DAOToken
{
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IVestingMaster public vestingMaster;

    // Info of each pool.
    PoolInfo[] public override poolInfo;

    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public override userInfo;

    // Pair corresponding pid
    mapping(address => uint256) public override pair2Pid;
    mapping(IERC20 => bool) public override poolExistence;

    // Reward tokens created per block.
    uint256 public override xmsPerBlock;

    // Bonus muliplier for early reward makers.
    uint256 public constant override BONUS_MULTIPLIER = 1;

    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public override totalAllocPoint = 0;

    // The block number when mining starts.
    uint256 public override startBlock;

    // The block number when mining ends.
    uint256 public override endBlock;

    IERC20 public override rewardToken;

    constructor(
        address _core,
        address _vestingMaster,
        address _rewardToken,
        uint256 _xmsPerBlock,
        uint256 _startBlock,
        uint256 _endBlock
    ) CoreRef(_core) DAOToken("Mars Farms Seed Token", "MSEED") {
        require(
            _startBlock < _endBlock,
            "LiquidityMiningMaster::constructor: End less than start"
        );
        vestingMaster = IVestingMaster(_vestingMaster);
        rewardToken = IERC20(_rewardToken);
        xmsPerBlock = _xmsPerBlock;
        startBlock = _startBlock;
        endBlock = _endBlock;
    }

    modifier nonDuplicated(IERC20 _lpToken) {
        require(
            !poolExistence[_lpToken],
            "LiquidityMiningMaster::nonDuplicated: Duplicated lp"
        );
        require(
            _lpToken != rewardToken || _lpToken == xms(),
            "LiquidityMiningMaster::nonDuplicated: Duplicated reward and lp"
        );
        _;
    }

    modifier validatePid(uint256 _pid) {
        require(
            _pid < poolInfo.length,
            "LiquidityMiningMaster::validatePid: Not exist"
        );
        _;
    }

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

    // Add a new lp to the pool. Can only be called by the governor.
    function addPool(
        uint256 _allocPoint,
        IERC20 _lpToken,
        bool _locked,
        bool _withUpdate
    ) public override onlyGuardianOrGovernor nonDuplicated(_lpToken) {
        require(
            block.number < endBlock,
            "LiquidityMiningMaster::addPool: Exceed endblock"
        );
        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,
                accXMSPerShare: 0,
                locked: _locked
            })
        );
        pair2Pid[address(_lpToken)] = poolLength() - 1;
    }

    // Update the given pool's allocation point and deposit fee. Can only be called by the governor.
    function setPool(
        uint256 _pid,
        uint256 _allocPoint,
        bool _locked,
        bool _withUpdate
    ) public override validatePid(_pid) onlyGuardianOrGovernor {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
            _allocPoint
        );
        poolInfo[_pid].allocPoint = _allocPoint;
        poolInfo[_pid].locked = _locked;
    }

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

    function getXMSReward(uint256 _pid)
        internal
        view
        returns (uint256 xmsReward)
    {
        PoolInfo storage pool = poolInfo[_pid];
        require(
            pool.lastRewardBlock < block.number,
            "LiquidityMiningMaster::getXMSReward: Must little than the current block number"
        );
        uint256 multiplier = getMultiplier(
            pool.lastRewardBlock,
            block.number >= endBlock ? endBlock : block.number
        );
        xmsReward = multiplier.mul(xmsPerBlock).mul(pool.allocPoint).div(
            totalAllocPoint
        );
    }

    // View function to see pending reward on frontend.
    function pendingXMS(uint256 _pid, address _user)
        external
        view
        override
        validatePid(_pid)
        returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accXMSPerShare = pool.accXMSPerShare;
        uint256 lpSupply = address(xms()) == address(pool.lpToken)
            ? totalSupply()
            : pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 shareReward = getXMSReward(_pid);
            accXMSPerShare = accXMSPerShare.add(
                shareReward.mul(1e12).div(lpSupply)
            );
        }
        return user.amount.mul(accXMSPerShare).div(1e12).sub(user.rewardDebt);
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public override {
        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 override validatePid(_pid) {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        if (pool.lastRewardBlock >= endBlock) {
            return;
        }
        uint256 lpSupply = address(xms()) == address(pool.lpToken)
            ? totalSupply()
            : pool.lpToken.balanceOf(address(this));
        uint256 lastRewardBlock = block.number >= endBlock
            ? endBlock
            : block.number;
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = lastRewardBlock;
            return;
        }
        uint256 shareReward = getXMSReward(_pid);
        pool.accXMSPerShare = pool.accXMSPerShare.add(
            shareReward.mul(1e12).div(lpSupply)
        );
        pool.lastRewardBlock = lastRewardBlock;
    }

    // Deposit LP tokens to LiquidityMiningMaster for allocation.
    function deposit(uint256 _pid, uint256 _amount)
        public
        override
        validatePid(_pid)
        nonReentrant
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(pool.accXMSPerShare)
                .div(1e12)
                .sub(user.rewardDebt);
            if (pending > 0) {
                uint256 locked;
                if (pool.locked && address(vestingMaster) != address(0)) {
                    locked = pending
                        .div(vestingMaster.lockedPeriodAmount() + 1)
                        .mul(vestingMaster.lockedPeriodAmount());
                }
                safeTokenTransfer(msg.sender, pending.sub(locked));
                if (locked > 0) {
                    uint256 actualAmount = safeTokenTransfer(
                        address(vestingMaster),
                        locked
                    );
                    vestingMaster.lock(msg.sender, actualAmount);
                }
            }
        }
        if (_amount > 0) {
            pool.lpToken.safeTransferFrom(
                address(msg.sender),
                address(this),
                _amount
            );
            if (address(xms()) == address(pool.lpToken)) {
                _mint(msg.sender, _amount);
            }
            user.amount = user.amount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accXMSPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from LiquidityMiningMaster.
    function withdraw(uint256 _pid, uint256 _amount)
        public
        override
        validatePid(_pid)
        nonReentrant
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(
            user.amount >= _amount,
            "LiquidityMiningMaster::withdraw: Not good"
        );
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(pool.accXMSPerShare)
                .div(1e12)
                .sub(user.rewardDebt);
            if (pending > 0) {
                uint256 locked;
                if (pool.locked && address(vestingMaster) != address(0)) {
                    locked = pending
                        .div(vestingMaster.lockedPeriodAmount() + 1)
                        .mul(vestingMaster.lockedPeriodAmount());
                }
                safeTokenTransfer(msg.sender, pending.sub(locked));
                if (locked > 0) {
                    uint256 actualAmount = safeTokenTransfer(
                        address(vestingMaster),
                        locked
                    );
                    vestingMaster.lock(msg.sender, actualAmount);
                }
            }
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            if (address(xms()) == address(pool.lpToken)) {
                _burn(msg.sender, _amount);
            }
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accXMSPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid)
        public
        override
        validatePid(_pid)
        nonReentrant
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        if (address(xms()) == address(pool.lpToken)) {
            _burn(msg.sender, amount);
        }
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    // Safe token transfer function, just in case if rounding error causes pool to not have enough token.
    function safeTokenTransfer(address _to, uint256 _amount)
        internal
        virtual
        returns (uint256)
    {
        uint256 balance = rewardToken.balanceOf(address(this));
        uint256 amount;
        uint256 floorAmount = rewardToken == xms() ? totalSupply() : 0;
        if (balance > floorAmount) {
            if (_amount > balance.sub(floorAmount)) {
                amount = balance.sub(floorAmount);
            } else {
                amount = _amount;
            }
        }
        require(
            rewardToken.transfer(_to, amount),
            "LiquidityMiningMaster::safeXMSTransfer: Transfer failed"
        );
        return amount;
    }

    function updateXmsPerBlock(uint256 _xmsPerBlock)
        public
        override
        onlyGuardianOrGovernor
    {
        massUpdatePools();
        xmsPerBlock = _xmsPerBlock;
        emit UpdateEmissionRate(msg.sender, _xmsPerBlock);
    }

    function updateEndBlock(uint256 _endBlock)
        public
        override
        onlyGuardianOrGovernor
    {
        require(
            _endBlock > startBlock,
            "LiquidityMiningMaster::updateEndBlock: Less"
        );
        for (uint256 pid = 0; pid < poolInfo.length; ++pid) {
            require(
                _endBlock > poolInfo[pid].lastRewardBlock,
                "LiquidityMiningMaster::updateEndBlock: Less"
            );
        }
        massUpdatePools();
        endBlock = _endBlock;
        emit UpdateEndBlock(msg.sender, _endBlock);
    }

    function updateVestingMaster(address _vestingMaster)
        public
        override
        onlyGovernor
    {
        vestingMaster = IVestingMaster(_vestingMaster);
        emit UpdateVestingMaster(msg.sender, _vestingMaster);
    }
}

File 12 of 21 : LiquidityMiningMasterBNB.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

import "./LiquidityMiningMaster.sol";
import "../libs/TransferHelper.sol";

// Earn BNB
contract LiquidityMiningMasterBNB is LiquidityMiningMaster {
    using SafeMath for uint256;

    constructor(
        address _core,
        address _vestingMaster,
        address _WBNB,
        uint256 _xmsPerBlock,
        uint256 _startBlock,
        uint256 _endBlock
    )
        LiquidityMiningMaster(
            _core,
            _vestingMaster,
            _WBNB,
            _xmsPerBlock,
            _startBlock,
            _endBlock
        )
    {}

    receive() external payable {}

    // Safe bnb transfer function, just in case if rounding error causes pool to not have enough bnb.
    function safeTokenTransfer(address _to, uint256 _amount)
        internal
        override
        returns (uint256)
    {
        uint256 balance = address(this).balance;
        uint256 amount;
        if (_amount > balance) {
            amount = balance;
        } else {
            amount = _amount;
        }
        TransferHelper.safeTransferETH(_to, amount);
        return amount;
    }
}

File 13 of 21 : CoreRef.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

import "../interfaces/ICoreRef.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";

/// @title A Reference to Core
/// @author USDM Protocol
/// @notice Defines some modifiers and utilities around interacting with Core
abstract contract CoreRef is ICoreRef, Pausable {
    using SafeMath for uint256;

    ICore private _core;

    /// @notice CoreRef constructor
    /// @param core_ USDM Core to reference
    constructor(address core_) {
        _core = ICore(core_);
    }

    modifier ifMinterSelf() {
        if (_core.isMinter(address(this))) {
            _;
        }
    }

    modifier ifBurnerSelf() {
        if (_core.isBurner(address(this))) {
            _;
        }
    }

    modifier onlyMinter() {
        require(
            _core.isMinter(msg.sender),
            "CoreRef::onlyMinter: Caller is not a minter"
        );
        _;
    }

    modifier onlyBurner() {
        require(
            _core.isBurner(msg.sender),
            "CoreRef::onlyBurner: Caller is not a burner"
        );
        _;
    }

    modifier onlyPCVController() {
        require(
            _core.isPCVController(msg.sender),
            "CoreRef::onlyPCVController: Caller is not a PCV controller"
        );
        _;
    }

    modifier onlyGovernor() {
        require(
            _core.isGovernor(msg.sender),
            "CoreRef::onlyGovernor: Caller is not a governor"
        );
        _;
    }

    modifier onlyGuardianOrGovernor() {
        require(
            _core.isGovernor(msg.sender) || _core.isGuardian(msg.sender),
            "CoreRef::onlyGuardianOrGovernor: Caller is not a guardian or governor"
        );
        _;
    }

    modifier onlyUSDM() {
        require(
            msg.sender == address(usdm()),
            "CoreRef::onlyUSDM: Caller is not USDM"
        );
        _;
    }

    modifier onlyGenesisGroup() {
        require(
            msg.sender == _core.genesisGroup(),
            "CoreRef::onlyGenesisGroup: Caller is not GenesisGroup"
        );
        _;
    }

    modifier postGenesis() {
        require(
            _core.hasGenesisGroupCompleted(),
            "CoreRef::postGenesis: Still in genesis period"
        );
        _;
    }

    modifier nonContract() {
        require(
            !Address.isContract(msg.sender),
            "CoreRef::nonContract: Caller is a contract"
        );
        _;
    }

    /// @notice Set new Core reference address
    /// @param core_ The new core address
    function setCore(address core_) external override onlyGovernor {
        _core = ICore(core_);
        emit CoreUpdate(core_);
    }

    /// @notice Set pausable methods to paused
    function pause() public override onlyGuardianOrGovernor {
        _pause();
    }

    /// @notice Set pausable methods to unpaused
    function unpause() public override onlyGuardianOrGovernor {
        _unpause();
    }

    /// @notice Address of the Core contract referenced
    /// @return ICore implementation address
    function core() public view override returns (ICore) {
        return _core;
    }

    /// @notice Address of the USDM contract referenced by Core
    /// @return IUSDMToken implementation address
    function usdm() public view override returns (IUSDMToken) {
        return _core.usdm();
    }

    /// @notice Address of the XMS contract referenced by Core
    /// @return IUSDMToken implementation address
    function xms() public view override returns (IXMSToken) {
        return _core.xms();
    }

    /// @notice USDM balance of contract
    /// @return USDM amount held
    function usdmBalance() public view override returns (uint256) {
        return usdm().balanceOf(address(this));
    }

    /// @notice XMS balance of contract
    /// @return XMS amount held
    function xmsBalance() public view override returns (uint256) {
        return xms().balanceOf(address(this));
    }

    /// @notice Calculate the usdm amount of governance
    function getUSDMAmountGovernance()
        public
        view
        override
        returns (uint256 usdmAmount)
    {
        address pair;
        address _contract;
        for (uint256 i; i < core().getApprovedPairsLength(); i++) {
            pair = core().approvedPairs(i);
            for (uint256 j; j < core().getApprovedContractsLength(pair); j++) {
                _contract = core().approvedContracts(pair, j);
                usdmAmount = usdmAmount.add(
                    core()
                        .usdm()
                        .balanceOf(pair)
                        .mul(IERC20(pair).balanceOf(_contract))
                        .div(IERC20(pair).totalSupply())
                );
            }
        }
    }

    function _burnUSDMHeld() internal {
        usdm().burn(usdmBalance());
    }

    function _mintUSDM(uint256 amount) internal {
        usdm().mint(address(this), amount);
    }
}

File 14 of 21 : 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 15 of 21 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

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

    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 name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: 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 {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].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 {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        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), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: 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 virtual {
        require(account != address(0), "ERC20: mint to the zero address");

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

        _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 virtual {
        require(account != address(0), "ERC20: burn from the zero address");

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

        _balances[account] = _balances[account].sub(amount, "ERC20: 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 internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

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

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

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

File 16 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

File 17 of 21 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

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

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

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

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

File 18 of 21 : 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 19 of 21 : 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 20 of 21 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () internal {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 21 of 21 : 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;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_core","type":"address"},{"internalType":"address","name":"_vestingMaster","type":"address"},{"internalType":"address","name":"_WBNB","type":"address"},{"internalType":"uint256","name":"_xmsPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_core","type":"address"}],"name":"CoreUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"xmsPerBlock","type":"uint256"}],"name":"UpdateEmissionRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"}],"name":"UpdateEndBlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"vestingMaster","type":"address"}],"name":"UpdateVestingMaster","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":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_locked","type":"bool"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"addPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint256","name":"votes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"core","outputs":[{"internalType":"contract ICore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUSDMAmountGovernance","outputs":[{"internalType":"uint256","name":"usdmAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pair2Pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingXMS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","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 IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accXMSPerShare","type":"uint256"},{"internalType":"bool","name":"locked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"core_","type":"address"}],"name":"setCore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_locked","type":"bool"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_endBlock","type":"uint256"}],"name":"updateEndBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vestingMaster","type":"address"}],"name":"updateVestingMaster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_xmsPerBlock","type":"uint256"}],"name":"updateXmsPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdm","outputs":[{"internalType":"contract IUSDMToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdmBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestingMaster","outputs":[{"internalType":"contract IVestingMaster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xms","outputs":[{"internalType":"contract IXMSToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xmsBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xmsPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260006012553480156200001657600080fd5b5060405162004dae38038062004dae833981016040819052620000399162000235565b604080518082018252601581527f4d617273204661726d73205365656420546f6b656e0000000000000000000000602080830191825283518085019094526005808552641354d1515160da1b918501919091526001600081905580546001600160a81b0319166101006001600160a01b038d160217905582518a948a948a948a948a948a949284928492620000cf92906200016c565b508051620000e59060069060208401906200016c565b50506007805460ff19166012179055505050808210620001225760405162461bcd60e51b815260040162000119906200029a565b60405180910390fd5b600c80546001600160a01b039687166001600160a01b031991821617909155601580549590961694169390931790935560115560139190915560145550620002f795505050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001a45760008555620001ef565b82601f10620001bf57805160ff1916838001178555620001ef565b82800160010185558215620001ef579182015b82811115620001ef578251825591602001919060010190620001d2565b50620001fd92915062000201565b5090565b5b80821115620001fd576000815560010162000202565b80516001600160a01b03811681146200023057600080fd5b919050565b60008060008060008060c087890312156200024e578182fd5b620002598762000218565b9550620002696020880162000218565b9450620002796040880162000218565b9350606087015192506080870151915060a087015190509295509295509295565b60208082526037908201527f4c69717569646974794d696e696e674d61737465723a3a636f6e73747275637460408201527f6f723a20456e64206c657373207468616e207374617274000000000000000000606082015260800190565b614aa780620003076000396000f3fe6080604052600436106103535760003560e01c80635c975abb116101c6578063a457c2d7116100f7578063e2bbb15811610095578063ee138d0f1161006f578063ee138d0f14610950578063f1127ed814610965578063f2f4eb2614610993578063f7c618c1146109a85761035a565b8063e2bbb158146108fb578063e6a8fc711461091b578063e7a324dc1461093b5761035a565b8063c3cda520116100d1578063c3cda5201461087b578063c81165851461089b578063cbd258b5146108bb578063dd62ed3e146108db5761035a565b8063a457c2d71461081b578063a9059cbb1461083b578063b4b5ea571461085b5761035a565b8063835c5cbb116101645780638dbb1e3a1161013e5780638dbb1e3a146107a357806393f1a40b146107c357806395d89b41146107f15780639a574622146108065761035a565b8063835c5cbb146107645780638456cb59146107795780638aa285501461078e5761035a565b806370a08231116101a057806370a08231146106e4578063782d6fe1146107045780637ecebe001461072457806380009630146107445761035a565b80635c975abb1461068d578063630b5ba1146106a25780636fcfff45146106b75761035a565b806323b872dd116102a0578063441a3e701161023e57806351eb05a61161021857806351eb05a61461060d5780635312ea8e1461062d578063587cde1e1461064d5780635c19a95c1461066d5761035a565b8063441a3e70146105b857806344738227146105d857806348cd4cb1146105f85761035a565b80632e6e35b91161027a5780632e6e35b91461054c578063313ce5671461056157806339509351146105835780633f4ba83a146105a35761035a565b806323b872dd146104f757806323ddfa331461051757806326f87c01146105375761035a565b80630f057c231161030d57806318160ddd116102e757806318160ddd1461048b5780631eccdf07146104a057806320606b70146104c25780632124ca44146104d75761035a565b80630f057c23146104305780631526fe271461044557806317caf6f1146104765761035a565b80626f02311461035f57806306fdde0314610381578063081e3eda146103ac578063083c6323146103ce578063095ea7b3146103e35780630a0ee036146104105761035a565b3661035a57005b600080fd5b34801561036b57600080fd5b5061037f61037a366004614293565b6109bd565b005b34801561038d57600080fd5b50610396610bae565b6040516103a391906143f9565b60405180910390f35b3480156103b857600080fd5b506103c1610c44565b6040516103a391906143c0565b3480156103da57600080fd5b506103c1610c4a565b3480156103ef57600080fd5b506104036103fe3660046141b7565b610c50565b6040516103a391906143b5565b34801561041c57600080fd5b5061037f61042b3660046142e7565b610c6e565b34801561043c57600080fd5b506103c1610fe8565b34801561045157600080fd5b50610465610460366004614293565b611072565b6040516103a39594939291906143c9565b34801561048257600080fd5b506103c16110c0565b34801561049757600080fd5b506103c16110c6565b3480156104ac57600080fd5b506104b56110cc565b6040516103a39190614388565b3480156104ce57600080fd5b506103c16110db565b3480156104e357600080fd5b5061037f6104f2366004614107565b6110ff565b34801561050357600080fd5b50610403610512366004614177565b6111ec565b34801561052357600080fd5b5061037f61053236600461435a565b611277565b34801561054357600080fd5b506103c161146f565b34801561055857600080fd5b506103c16118a4565b34801561056d57600080fd5b506105766118ae565b6040516103a3919061478f565b34801561058f57600080fd5b5061040361059e3660046141b7565b6118b7565b3480156105af57600080fd5b5061037f611905565b3480156105c457600080fd5b5061037f6105d3366004614339565b611a39565b3480156105e457600080fd5b5061037f6105f3366004614293565b611de9565b34801561060457600080fd5b506103c1611f52565b34801561061957600080fd5b5061037f610628366004614293565b611f58565b34801561063957600080fd5b5061037f610648366004614293565b6120ee565b34801561065957600080fd5b506104b5610668366004614107565b612232565b34801561067957600080fd5b5061037f610688366004614107565b61224d565b34801561069957600080fd5b50610403612261565b3480156106ae57600080fd5b5061037f61226a565b3480156106c357600080fd5b506106d76106d2366004614107565b612289565b6040516103a39190614768565b3480156106f057600080fd5b506103c16106ff366004614107565b6122a1565b34801561071057600080fd5b506103c161071f3660046141b7565b6122bc565b34801561073057600080fd5b506103c161073f366004614107565b6124bf565b34801561075057600080fd5b5061037f61075f366004614107565b6124d1565b34801561077057600080fd5b506104b56125c3565b34801561078557600080fd5b5061037f612649565b34801561079a57600080fd5b506103c161277b565b3480156107af57600080fd5b506103c16107be366004614339565b612780565b3480156107cf57600080fd5b506107e36107de3660046142c3565b612791565b6040516103a392919061475a565b3480156107fd57600080fd5b506103966127b5565b34801561081257600080fd5b506103c1612816565b34801561082757600080fd5b506104036108363660046141b7565b61281c565b34801561084757600080fd5b506104036108563660046141b7565b612884565b34801561086757600080fd5b506103c1610876366004614107565b6128e2565b34801561088757600080fd5b5061037f6108963660046141e2565b612945565b3480156108a757600080fd5b506103c16108b6366004614107565b612bb8565b3480156108c757600080fd5b506104036108d6366004614107565b612bca565b3480156108e757600080fd5b506103c16108f636600461413f565b612bdf565b34801561090757600080fd5b5061037f610916366004614339565b612c0a565b34801561092757600080fd5b506103c16109363660046142c3565b612ebc565b34801561094757600080fd5b506103c161304a565b34801561095c57600080fd5b506104b561306e565b34801561097157600080fd5b50610985610980366004614242565b6130bc565b6040516103a3929190614779565b34801561099f57600080fd5b506104b56130e9565b3480156109b457600080fd5b506104b56130fd565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b8906109f1903390600401614388565b60206040518083038186803b158015610a0957600080fd5b505afa158015610a1d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a419190614277565b80610acb5750600154604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190610a7b903390600401614388565b60206040518083038186803b158015610a9357600080fd5b505afa158015610aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acb9190614277565b610af05760405162461bcd60e51b8152600401610ae7906145bf565b60405180910390fd5b6013548111610b115760405162461bcd60e51b8152600401610ae7906146c0565b60005b600d54811015610b6357600d8181548110610b2b57fe5b9060005260206000209060050201600201548211610b5b5760405162461bcd60e51b8152600401610ae7906146c0565b600101610b14565b50610b6c61226a565b601481905560405133907f316ee89ca026e5355cff2b64939ee0e5af49bde19b755b42bbde0f5bea03982590610ba39084906143c0565b60405180910390a250565b60058054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c3a5780601f10610c0f57610100808354040283529160200191610c3a565b820191906000526020600020905b815481529060010190602001808311610c1d57829003601f168201915b5050505050905090565b600d5490565b60145481565b6000610c64610c5d61310c565b8484613110565b5060015b92915050565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b890610ca2903390600401614388565b60206040518083038186803b158015610cba57600080fd5b505afa158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf29190614277565b80610d7c5750600154604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190610d2c903390600401614388565b60206040518083038186803b158015610d4457600080fd5b505afa158015610d58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7c9190614277565b610d985760405162461bcd60e51b8152600401610ae7906145bf565b6001600160a01b038316600090815260106020526040902054839060ff1615610dd35760405162461bcd60e51b8152600401610ae79061456c565b6015546001600160a01b038281169116141580610e085750610df36125c3565b6001600160a01b0316816001600160a01b0316145b610e245760405162461bcd60e51b8152600401610ae79061444c565b6014544310610e455760405162461bcd60e51b8152600401610ae79061470b565b8115610e5357610e5361226a565b60006013544311610e6657601354610e68565b435b601254909150610e7890876131fc565b6012556001600160a01b0385811660008181526010602090815260408083208054600160ff199182168117909255825160a0810184529586529285018c8152918501878152606086018581528b151560808801908152600d80548086018255975296517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5600590970296870180546001600160a01b031916919099161790975591517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb685015590517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb784015593517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb883015591517fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb99091018054909216901515179055610fc3610c44565b6001600160a01b039096166000908152600f6020526040902095039094555050505050565b6000610ff261306e565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161101d9190614388565b60206040518083038186803b15801561103557600080fd5b505afa158015611049573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106d91906142ab565b905090565b600d818154811061108257600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909160ff1685565b60125481565b60045490565b600c546001600160a01b031681565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b890611133903390600401614388565b60206040518083038186803b15801561114b57600080fd5b505afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190614277565b61119f5760405162461bcd60e51b8152600401610ae7906144a9565b600c80546001600160a01b0319166001600160a01b03831617905560405133907fedd017b4981fb4d0d4df1c48baed994ce8b4dc47ba89a2010ce592b7df5c6dc490610ba3908490614388565b60006111f9848484613256565b61123a8461120561310c565b6112358560405180606001604052806039815260200161484e6039913961122e8a6108f661310c565b91906133b3565b613110565b6001600160a01b0380851660009081526008602052604080822054868416835291205461126c9291821691168461344a565b5060015b9392505050565b600d548490811061129a5760405162461bcd60e51b8152600401610ae79061462a565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b8906112ce903390600401614388565b60206040518083038186803b1580156112e657600080fd5b505afa1580156112fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131e9190614277565b806113a85750600154604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190611358903390600401614388565b60206040518083038186803b15801561137057600080fd5b505afa158015611384573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a89190614277565b6113c45760405162461bcd60e51b8152600401610ae7906145bf565b81156113d2576113d261226a565b61140f84611409600d88815481106113e657fe5b90600052602060002090600502016001015460125461358c90919063ffffffff16565b906131fc565b60128190555083600d868154811061142357fe5b90600052602060002090600502016001018190555082600d868154811061144657fe5b60009182526020909120600590910201600401805460ff19169115159190911790555050505050565b6000806000805b61147e6130e9565b6001600160a01b031663d200a2186040518163ffffffff1660e01b815260040160206040518083038186803b1580156114b657600080fd5b505afa1580156114ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ee91906142ab565b81101561189e576114fd6130e9565b6001600160a01b03166379c9679b826040518263ffffffff1660e01b815260040161152891906143c0565b60206040518083038186803b15801561154057600080fd5b505afa158015611554573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115789190614123565b925060005b6115856130e9565b6001600160a01b03166380e2b70e856040518263ffffffff1660e01b81526004016115b09190614388565b60206040518083038186803b1580156115c857600080fd5b505afa1580156115dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061160091906142ab565b8110156118955761160f6130e9565b6001600160a01b031663a0a01d9d85836040518363ffffffff1660e01b815260040161163c92919061439c565b60206040518083038186803b15801561165457600080fd5b505afa158015611668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168c9190614123565b925061188b611884856001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116cd57600080fd5b505afa1580156116e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170591906142ab565b6040516370a0823160e01b815261187e906001600160a01b038916906370a0823190611735908a90600401614388565b60206040518083038186803b15801561174d57600080fd5b505afa158015611761573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178591906142ab565b61178d6130e9565b6001600160a01b031663ee138d0f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117c557600080fd5b505afa1580156117d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117fd9190614123565b6001600160a01b03166370a082318a6040518263ffffffff1660e01b81526004016118289190614388565b60206040518083038186803b15801561184057600080fd5b505afa158015611854573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187891906142ab565b906135e9565b90613642565b86906131fc565b945060010161157d565b50600101611476565b50505090565b6000610ff26125c3565b60075460ff1690565b6000610c646118c461310c565b8461123585600360006118d561310c565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906131fc565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b890611939903390600401614388565b60206040518083038186803b15801561195157600080fd5b505afa158015611965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119899190614277565b80611a135750600154604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba21906119c3903390600401614388565b60206040518083038186803b1580156119db57600080fd5b505afa1580156119ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a139190614277565b611a2f5760405162461bcd60e51b8152600401610ae7906145bf565b611a376136a9565b565b600d5482908110611a5c5760405162461bcd60e51b8152600401610ae79061462a565b60026000541415611ab4576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000908155600d805485908110611ac957fe5b60009182526020808320878452600e825260408085203386529092529220805460059092029092019250841115611b125760405162461bcd60e51b8152600401610ae790614677565b611b1b85611f58565b805415611d2b576000611b568260010154611b5064e8d4a5100061187e876003015487600001546135e990919063ffffffff16565b9061358c565b90508015611d2957600483015460009060ff168015611b7f5750600c546001600160a01b031615155b15611c8d57600c54604080516302f4bde360e11b81529051611c8a926001600160a01b0316916305e97bc6916004808301926020929190829003018186803b158015611bca57600080fd5b505afa158015611bde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c0291906142ab565b600c54604080516302f4bde360e11b81529051611878926001600160a01b0316916305e97bc6916004808301926020929190829003018186803b158015611c4857600080fd5b505afa158015611c5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8091906142ab565b8590600101613642565b90505b611ca033611c9b848461358c565b613749565b508015611d2757600c54600090611cc0906001600160a01b031683613749565b600c5460405163282d3fdf60e01b81529192506001600160a01b03169063282d3fdf90611cf3903390859060040161439c565b600060405180830381600087803b158015611d0d57600080fd5b505af1158015611d21573d6000803e3d6000fd5b50505050505b505b505b8315611d81578054611d3d908561358c565b815581546001600160a01b0316611d526125c3565b6001600160a01b03161415611d6b57611d6b3385613771565b8154611d81906001600160a01b031633866137a1565b60038201548154611d9c9164e8d4a510009161187e916135e9565b6001820155604051859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56890611dd59088906143c0565b60405180910390a350506001600055505050565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b890611e1d903390600401614388565b60206040518083038186803b158015611e3557600080fd5b505afa158015611e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6d9190614277565b80611ef75750600154604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190611ea7903390600401614388565b60206040518083038186803b158015611ebf57600080fd5b505afa158015611ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef79190614277565b611f135760405162461bcd60e51b8152600401610ae7906145bf565b611f1b61226a565b601181905560405133907fe2492e003bbe8afa53088b406f0c1cb5d9e280370fc72a74cf116ffd343c405390610ba39084906143c0565b60135481565b600d5481908110611f7b5760405162461bcd60e51b8152600401610ae79061462a565b6000600d8381548110611f8a57fe5b9060005260206000209060050201905080600201544311611fab57506120ea565b601454816002015410611fbe57506120ea565b80546000906001600160a01b0316611fd46125c3565b6001600160a01b0316146120665781546040516370a0823160e01b81526001600160a01b03909116906370a0823190612011903090600401614388565b60206040518083038186803b15801561202957600080fd5b505afa15801561203d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206191906142ab565b61206e565b61206e6110c6565b905060006014544310156120825743612086565b6014545b905081158061209757506001830154155b156120ab57600290920191909155506120ea565b60006120b6866137f3565b90506120d96120ce8461187e8464e8d4a510006135e9565b6003860154906131fc565b600385015550600290920191909155505b5050565b600d54819081106121115760405162461bcd60e51b8152600401610ae79061462a565b60026000541415612169576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000908155600d80548490811061217e57fe5b60009182526020808320868452600e825260408085203386529092529083208054848255600182019490945560059092020180549093509091906001600160a01b03166121c96125c3565b6001600160a01b031614156121e2576121e23382613771565b82546121f8906001600160a01b031633836137a1565b84336001600160a01b03167fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059583604051611dd591906143c0565b6008602052600090815260409020546001600160a01b031681565b61225e61225861310c565b8261387d565b50565b60015460ff1690565b600d5460005b818110156120ea5761228181611f58565b600101612270565b600a6020526000908152604090205463ffffffff1681565b6001600160a01b031660009081526002602052604090205490565b60004382106122fc5760405162461bcd60e51b815260040180806020018281038252602b815260200180614a22602b913960400191505060405180910390fd5b6001600160a01b0383166000908152600a602052604090205463ffffffff168061232a576000915050610c68565b6001600160a01b038416600090815260096020908152604080832063ffffffff600019860181168552925290912054168310612399576001600160a01b03841660009081526009602090815260408083206000199490940163ffffffff16835292905220600101549050610c68565b6001600160a01b038416600090815260096020908152604080832083805290915290205463ffffffff168310156123d4576000915050610c68565b600060001982015b8163ffffffff168163ffffffff161115612488576000600263ffffffff848403166001600160a01b038916600090815260096020908152604080832094909304860363ffffffff818116845294825291839020835180850190945280549094168084526001909401549083015292509087141561246357602001519450610c689350505050565b805163ffffffff1687111561247a57819350612481565b6001820392505b50506123dc565b506001600160a01b038516600090815260096020908152604080832063ffffffff9094168352929052206001015491505092915050565b600b6020526000908152604090205481565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b890612505903390600401614388565b60206040518083038186803b15801561251d57600080fd5b505afa158015612531573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125559190614277565b6125715760405162461bcd60e51b8152600401610ae7906144a9565b60018054610100600160a81b0319166101006001600160a01b038416908102919091179091556040517fad9400e618eb1344fde53db22397a1b82c765527ecbba3a5c86bcac15090828b90600090a250565b600060018054906101000a90046001600160a01b03166001600160a01b031663835c5cbb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261157600080fd5b505afa158015612625573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106d9190614123565b600154604051631c86b03760e31b81526101009091046001600160a01b03169063e43581b89061267d903390600401614388565b60206040518083038186803b15801561269557600080fd5b505afa1580156126a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126cd9190614277565b806127575750600154604051630c68ba2160e01b81526101009091046001600160a01b031690630c68ba2190612707903390600401614388565b60206040518083038186803b15801561271f57600080fd5b505afa158015612733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127579190614277565b6127735760405162461bcd60e51b8152600401610ae7906145bf565b611a37613912565b600181565b60006112706001611878848661358c565b600e6020908152600092835260408084209091529082529020805460019091015482565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610c3a5780601f10610c0f57610100808354040283529160200191610c3a565b60115481565b6000610c6461282961310c565b8461123585604051806060016040528060258152602001614a4d602591396003600061285361310c565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906133b3565b600061289861289161310c565b8484613256565b610c64600860006128a761310c565b6001600160a01b039081168252602080830193909352604091820160009081205488831682526008909452919091205491811691168461344a565b6001600160a01b0381166000908152600a602052604081205463ffffffff168061290d576000611270565b6001600160a01b038316600090815260096020908152604080832063ffffffff60001986011684529091529020600101549392505050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866612970610bae565b8051906020012061297f613994565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a9052825180850390910181526101408401835280519085012061190160f01b6101608501526101628401829052610182808501829052835180860390910181526101a285018085528151918701919091206000918290526101c2860180865281905260ff8b166101e287015261020286018a90526102228601899052935192965090949293909260019261024280840193601f198301929081900390910190855afa158015612ab2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612b045760405162461bcd60e51b815260040180806020018281038252602a8152602001806149ce602a913960400191505060405180910390fd5b6001600160a01b0381166000908152600b602052604090208054600181019091558914612b625760405162461bcd60e51b815260040180806020018281038252602681526020018061497e6026913960400191505060405180910390fd5b87421115612ba15760405162461bcd60e51b815260040180806020018281038252602a8152602001806149a4602a913960400191505060405180910390fd5b612bab818b61387d565b505050505b505050505050565b600f6020526000908152604090205481565b60106020526000908152604090205460ff1681565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b600d5482908110612c2d5760405162461bcd60e51b8152600401610ae79061462a565b60026000541415612c85576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000908155600d805485908110612c9a57fe5b60009182526020808320878452600e82526040808520338652909252922060059091029091019150612ccb85611f58565b805415612e10576000612d008260010154611b5064e8d4a5100061187e876003015487600001546135e990919063ffffffff16565b90508015612e0e57600483015460009060ff168015612d295750600c546001600160a01b031615155b15612d7757600c54604080516302f4bde360e11b81529051612d74926001600160a01b0316916305e97bc6916004808301926020929190829003018186803b158015611bca57600080fd5b90505b612d8533611c9b848461358c565b508015612e0c57600c54600090612da5906001600160a01b031683613749565b600c5460405163282d3fdf60e01b81529192506001600160a01b03169063282d3fdf90612dd8903390859060040161439c565b600060405180830381600087803b158015612df257600080fd5b505af1158015612e06573d6000803e3d6000fd5b50505050505b505b505b8315612e68578154612e2d906001600160a01b0316333087613998565b81546001600160a01b0316612e406125c3565b6001600160a01b03161415612e5957612e5933856139f2565b8054612e6590856131fc565b81555b60038201548154612e839164e8d4a510009161187e916135e9565b6001820155604051859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590611dd59088906143c0565b600d5460009083908110612ee25760405162461bcd60e51b8152600401610ae79061462a565b6000600d8581548110612ef157fe5b60009182526020808320888452600e825260408085206001600160a01b038a8116875293528420600593909302016003810154815491955092939116612f356125c3565b6001600160a01b031614612fc75783546040516370a0823160e01b81526001600160a01b03909116906370a0823190612f72903090600401614388565b60206040518083038186803b158015612f8a57600080fd5b505afa158015612f9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fc291906142ab565b612fcf565b612fcf6110c6565b9050836002015443118015612fe357508015155b15613016576000612ff3896137f3565b905061301261300b8361187e8464e8d4a510006135e9565b84906131fc565b9250505b61303e8360010154611b5064e8d4a5100061187e8688600001546135e990919063ffffffff16565b98975050505050505050565b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b600060018054906101000a90046001600160a01b03166001600160a01b031663ee138d0f6040518163ffffffff1660e01b815260040160206040518083038186803b15801561261157600080fd5b60096020908152600092835260408084209091529082529020805460019091015463ffffffff9091169082565b60015461010090046001600160a01b031690565b6015546001600160a01b031681565b3390565b6001600160a01b0383166131555760405162461bcd60e51b815260040180806020018281038252602481526020018061495a6024913960400191505060405180910390fd5b6001600160a01b03821661319a5760405162461bcd60e51b81526004018080602001828103825260228152602001806148066022913960400191505060405180910390fd5b6001600160a01b03808416600081815260036020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600082820183811015611270576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b03831661329b5760405162461bcd60e51b81526004018080602001828103825260258152602001806149016025913960400191505060405180910390fd5b6001600160a01b0382166132e05760405162461bcd60e51b81526004018080602001828103825260238152602001806147c16023913960400191505060405180910390fd5b6132eb838383613587565b61332881604051806060016040528060268152602001614828602691396001600160a01b03861660009081526002602052604090205491906133b3565b6001600160a01b03808516600090815260026020526040808220939093559084168152205461335790826131fc565b6001600160a01b0380841660008181526002602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156134425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156134075781810151838201526020016133ef565b50505050905090810190601f1680156134345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b816001600160a01b0316836001600160a01b03161415801561346c5750600081115b15613587576001600160a01b038316156134fe576001600160a01b0383166000908152600a602052604081205463ffffffff1690816134ac5760006134de565b6001600160a01b038516600090815260096020908152604080832063ffffffff60001987011684529091529020600101545b905060006134ec828561358c565b90506134fa86848484613a21565b5050505b6001600160a01b03821615613587576001600160a01b0382166000908152600a602052604081205463ffffffff16908161353957600061356b565b6001600160a01b038416600090815260096020908152604080832063ffffffff60001987011684529091529020600101545b9050600061357982856131fc565b9050612bb085848484613a21565b505050565b6000828211156135e3576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826135f857506000610c68565b8282028284828161360557fe5b04146112705760405162461bcd60e51b81526004018080602001828103825260218152602001806148bf6021913960400191505060405180910390fd5b6000808211613698576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816136a157fe5b049392505050565b6136b1612261565b6136f9576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61372c61310c565b604080516001600160a01b039092168252519081900360200190a1565b600047818184111561375c57508061375f565b50825b6137698582613b86565b949350505050565b61377b8282613c79565b6001600160a01b038083166000908152600860205260408120546120ea9216908361344a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052613587908490613d75565b600080600d838154811061380357fe5b90600052602060002090600502019050438160020154106138365760405162461bcd60e51b8152600401610ae7906144f8565b6000613858826002015460145443101561385057436107be565b601454612780565b905061376960125461187e8460010154611878601154866135e990919063ffffffff16565b6001600160a01b03808316600090815260086020526040812054909116906138a4846122a1565b6001600160a01b0385811660008181526008602052604080822080546001600160a01b031916898616908117909155905194955093928616927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a461390c82848361344a565b50505050565b61391a612261565b1561395f576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861372c61310c565b4690565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261390c908590613d75565b6139fc8282613e26565b6001600160a01b038083166000908152600860205260408120546120ea92168361344a565b6000613a454360405180606001604052806038815260200161488760389139613f18565b905060008463ffffffff16118015613a8e57506001600160a01b038516600090815260096020908152604080832063ffffffff6000198901811685529252909120548282169116145b15613acb576001600160a01b038516600090815260096020908152604080832063ffffffff60001989011684529091529020600101829055613b3c565b60408051808201825263ffffffff808416825260208083018681526001600160a01b038a166000818152600984528681208b8616825284528681209551865490861663ffffffff199182161787559251600196870155908152600a9092529390208054928801909116919092161790555b604080518481526020810184905281516001600160a01b038816927fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724928290030190a25050505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b60208310613bd25780518252601f199092019160209182019101613bb3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613c34576040519150601f19603f3d011682016040523d82523d6000602084013e613c39565b606091505b50509050806135875760405162461bcd60e51b81526004018080602001828103825260348152602001806149266034913960400191505060405180910390fd5b6001600160a01b038216613cbe5760405162461bcd60e51b81526004018080602001828103825260218152602001806148e06021913960400191505060405180910390fd5b613cca82600083613587565b613d07816040518060600160405280602281526020016147e4602291396001600160a01b03851660009081526002602052604090205491906133b3565b6001600160a01b038316600090815260026020526040902055600454613d2d908261358c565b6004556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6000613dca826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613f769092919063ffffffff16565b80519091501561358757808060200190516020811015613de957600080fd5b50516135875760405162461bcd60e51b815260040180806020018281038252602a8152602001806149f8602a913960400191505060405180910390fd5b6001600160a01b038216613e81576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b613e8d60008383613587565b600454613e9a90826131fc565b6004556001600160a01b038216600090815260026020526040902054613ec090826131fc565b6001600160a01b03831660008181526002602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000816401000000008410613f6e5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156134075781810151838201526020016133ef565b509192915050565b6060613769848460008585613f8a8561409b565b613fdb576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106140195780518252601f199092019160209182019101613ffa565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461407b576040519150601f19603f3d011682016040523d82523d6000602084013e614080565b606091505b50915091506140908282866140a1565b979650505050505050565b3b151590565b606083156140b0575081611270565b8251156140c05782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156134075781810151838201526020016133ef565b600060208284031215614118578081fd5b81356112708161479d565b600060208284031215614134578081fd5b81516112708161479d565b60008060408385031215614151578081fd5b823561415c8161479d565b9150602083013561416c8161479d565b809150509250929050565b60008060006060848603121561418b578081fd5b83356141968161479d565b925060208401356141a68161479d565b929592945050506040919091013590565b600080604083850312156141c9578182fd5b82356141d48161479d565b946020939093013593505050565b60008060008060008060c087890312156141fa578182fd5b86356142058161479d565b95506020870135945060408701359350606087013560ff81168114614228578283fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215614254578182fd5b823561425f8161479d565b9150602083013563ffffffff8116811461416c578182fd5b600060208284031215614288578081fd5b8151611270816147b2565b6000602082840312156142a4578081fd5b5035919050565b6000602082840312156142bc578081fd5b5051919050565b600080604083850312156142d5578182fd5b82359150602083013561416c8161479d565b600080600080608085870312156142fc578182fd5b84359350602085013561430e8161479d565b9250604085013561431e816147b2565b9150606085013561432e816147b2565b939692955090935050565b6000806040838503121561434b578182fd5b50508035926020909101359150565b6000806000806080858703121561436f578182fd5b8435935060208501359250604085013561431e816147b2565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b6001600160a01b039590951685526020850193909352604084019190915260608301521515608082015260a00190565b6000602080835283518082850152825b8181101561442557858101830151858201604001528201614409565b818111156144365783604083870101525b50601f01601f1916929092016040019392505050565b6020808252603e908201527f4c69717569646974794d696e696e674d61737465723a3a6e6f6e4475706c696360408201527f617465643a204475706c6963617465642072657761726420616e64206c700000606082015260800190565b6020808252602f908201527f436f72655265663a3a6f6e6c79476f7665726e6f723a2043616c6c657220697360408201526e103737ba10309033b7bb32b93737b960891b606082015260800190565b6020808252604e908201527f4c69717569646974794d696e696e674d61737465723a3a676574584d5352657760408201527f6172643a204d757374206c6974746c65207468616e207468652063757272656e60608201526d3a10313637b1b590373ab6b132b960911b608082015260a00190565b60208082526033908201527f4c69717569646974794d696e696e674d61737465723a3a6e6f6e4475706c69636040820152720617465643a204475706c696361746564206c7606c1b606082015260800190565b60208082526045908201527f436f72655265663a3a6f6e6c79477561726469616e4f72476f7665726e6f723a60408201527f2043616c6c6572206973206e6f74206120677561726469616e206f7220676f7660608201526432b93737b960d91b608082015260a00190565b6020808252602d908201527f4c69717569646974794d696e696e674d61737465723a3a76616c69646174655060408201526c1a590e88139bdd08195e1a5cdd609a1b606082015260800190565b60208082526029908201527f4c69717569646974794d696e696e674d61737465723a3a77697468647261773a60408201526808139bdd0819dbdbd960ba1b606082015260800190565b6020808252602b908201527f4c69717569646974794d696e696e674d61737465723a3a757064617465456e6460408201526a426c6f636b3a204c65737360a81b606082015260800190565b6020808252602f908201527f4c69717569646974794d696e696e674d61737465723a3a616464506f6f6c3a2060408201526e45786365656420656e64626c6f636b60881b606082015260800190565b918252602082015260400190565b63ffffffff91909116815260200190565b63ffffffff929092168252602082015260400190565b60ff91909116815260200190565b6001600160a01b038116811461225e57600080fd5b801515811461225e57600080fdfe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636544414f546f6b656e3a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636544414f546f6b656e3a3a5f7772697465436865636b706f696e743a20426c6f636b206e756d62657220657863656564732033322062697473536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f20616464726573735472616e7366657248656c7065723a3a736166655472616e736665724554483a20457468207472616e73666572206661696c656445524332303a20617070726f76652066726f6d20746865207a65726f206164647265737344414f546f6b656e3a3a64656c656761746542795369673a20496e76616c6964206e6f6e636544414f546f6b656e3a3a64656c656761746542795369673a205369676e6174757265206578706972656444414f546f6b656e3a3a64656c656761746542795369673a20496e76616c6964207369676e61747572655361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656444414f546f6b656e3a3a6765745072696f72566f7465733a204e6f74207965742064657465726d696e656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122067fdfed7620e2f2793355a5858940927411fc6387a28e4d306d6de8baeffdd4f64736f6c6343000706003300000000000000000000000000789cfb69499c65ac9a3a68fb4917c9b4fca2a70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000000000000000000000000000000eebe0b40e80000000000000000000000000000000000000000000000000000000000000a445700000000000000000000000000000000000000000000000000000000001dd2e1c

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

00000000000000000000000000789cfb69499c65ac9a3a68fb4917c9b4fca2a70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000000000000000000000000000000eebe0b40e80000000000000000000000000000000000000000000000000000000000000a445700000000000000000000000000000000000000000000000000000000001dd2e1c

-----Decoded View---------------
Arg [0] : _core (address): 0x00789cfb69499c65ac9a3a68fb4917c9b4fca2a7
Arg [1] : _vestingMaster (address): 0x0000000000000000000000000000000000000000
Arg [2] : _WBNB (address): 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
Arg [3] : _xmsPerBlock (uint256): 4200000000000000
Arg [4] : _startBlock (uint256): 10765680
Arg [5] : _endBlock (uint256): 31272476

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 00000000000000000000000000789cfb69499c65ac9a3a68fb4917c9b4fca2a7
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
Arg [3] : 000000000000000000000000000000000000000000000000000eebe0b40e8000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000a44570
Arg [5] : 0000000000000000000000000000000000000000000000000000000001dd2e1c


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