false
false

Contract Address Details

0x47e1DE3336529Fc59331D6C2ADab77a7650de72D

Contract Name
SimpleRewarderPerBlock
Creator
0xdfd1da–2eca76 at 0x592a3a–b4fde9
Balance
0 KCS ( )
Tokens
Fetching tokens...
Transactions
1 Transactions
Transfers
8,043 Transfers
Gas Used
9,668
Last Balance Update
45213683
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
SimpleRewarderPerBlock




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
200
EVM Version
default




Verified at
2022-05-05T07:27:53.898001Z

Constructor Arguments

00000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe00000000000000000000000098858d651b5147b805a768f8a93d13721e642f2e00000000000000000000000000000000000000000000000000ca8132b0328000000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b04495324

Arg [0] (address) : 0x44a6d299eed7ac941f090257380ee1d1934fadbe
Arg [1] (address) : 0x98858d651b5147b805a768f8a93d13721e642f2e
Arg [2] (uint256) : 57000000000000000
Arg [3] (address) : 0xfdfce767add9dcf032cbd0de35f0e57b04495324

              

Contract source code

// File: @openzeppelin/contracts/math/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: @openzeppelin/contracts/utils/Address.sol



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: @openzeppelin/contracts/utils/ReentrancyGuard.sol



pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// File: contracts/boringcrypto/BoringOwnable.sol


pragma solidity 0.6.12;

// Audit on 5-Jan-2021 by Keno and BoringCrypto
// Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol
// Edited by BoringCrypto

contract BoringOwnableData {
    address public owner;
    address public pendingOwner;
}

contract BoringOwnable is BoringOwnableData {
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @notice `owner` defaults to msg.sender on construction.
    constructor() public {
        owner = msg.sender;
        emit OwnershipTransferred(address(0), msg.sender);
    }

    /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner.
    /// Can only be invoked by the current `owner`.
    /// @param newOwner Address of the new owner.
    /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`.
    /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise.
    function transferOwnership(
        address newOwner,
        bool direct,
        bool renounce
    ) public onlyOwner {
        if (direct) {
            // Checks
            require(newOwner != address(0) || renounce, "Ownable: zero address");

            // Effects
            emit OwnershipTransferred(owner, newOwner);
            owner = newOwner;
            pendingOwner = address(0);
        } else {
            // Effects
            pendingOwner = newOwner;
        }
    }

    /// @notice Needs to be called by `pendingOwner` to claim ownership.
    function claimOwnership() public {
        address _pendingOwner = pendingOwner;

        // Checks
        require(msg.sender == _pendingOwner, "Ownable: caller != pending owner");

        // Effects
        emit OwnershipTransferred(owner, _pendingOwner);
        owner = _pendingOwner;
        pendingOwner = address(0);
    }

    /// @notice Only allows the `owner` to execute the function.
    modifier onlyOwner() {
        require(msg.sender == owner, "Ownable: caller is not the owner");
        _;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol



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: contracts/libraries/BoringERC20.sol


pragma solidity =0.6.12;


library BoringERC20 {
    bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol()
    bytes4 private constant SIG_NAME = 0x06fdde03; // name()
    bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals()
    bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256)
    bytes4 private constant SIG_TRANSFER_FROM = 0x23b872dd; // transferFrom(address,address,uint256)

    function returnDataToString(bytes memory data) internal pure returns (string memory) {
        if (data.length >= 64) {
            return abi.decode(data, (string));
        } else if (data.length == 32) {
            uint8 i = 0;
            while (i < 32 && data[i] != 0) {
                i++;
            }
            bytes memory bytesArray = new bytes(i);
            for (i = 0; i < 32 && data[i] != 0; i++) {
                bytesArray[i] = data[i];
            }
            return string(bytesArray);
        } else {
            return "???";
        }
    }

    /// @notice Provides a safe ERC20.symbol version which returns '???' as fallback string.
    /// @param token The address of the ERC-20 token contract.
    /// @return (string) Token symbol.
    function safeSymbol(IERC20 token) internal view returns (string memory) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_SYMBOL));
        return success ? returnDataToString(data) : "???";
    }

    /// @notice Provides a safe ERC20.name version which returns '???' as fallback string.
    /// @param token The address of the ERC-20 token contract.
    /// @return (string) Token name.
    function safeName(IERC20 token) internal view returns (string memory) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_NAME));
        return success ? returnDataToString(data) : "???";
    }

    /// @notice Provides a safe ERC20.decimals version which returns '18' as fallback value.
    /// @param token The address of the ERC-20 token contract.
    /// @return (uint8) Token decimals.
    function safeDecimals(IERC20 token) internal view returns (uint8) {
        (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_DECIMALS));
        return success && data.length == 32 ? abi.decode(data, (uint8)) : 18;
    }

    /// @notice Provides a safe ERC20.transfer version for different ERC-20 implementations.
    /// Reverts on a failed transfer.
    /// @param token The address of the ERC-20 token.
    /// @param to Transfer tokens to.
    /// @param amount The token amount.
    function safeTransfer(
        IERC20 token,
        address to,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER, to, amount));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: Transfer failed");
    }

    /// @notice Provides a safe ERC20.transferFrom version for different ERC-20 implementations.
    /// Reverts on a failed transfer.
    /// @param token The address of the ERC-20 token.
    /// @param from Transfer tokens from.
    /// @param to Transfer tokens to.
    /// @param amount The token amount.
    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(
            abi.encodeWithSelector(SIG_TRANSFER_FROM, from, to, amount)
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: TransferFrom failed");
    }
}

// File: contracts/interfaces/IRewarder.sol



pragma solidity =0.6.12;


interface IRewarder {
    function onMojitoReward(address user, uint256 newLpAmount) external;

    function pendingTokens(address user) external view returns (uint256 pending);

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

// File: contracts/interfaces/IMasterChef.sol



pragma solidity 0.6.12;

interface IMasterChef {
    function deposit(uint256 _pid, uint256 _amount) external;

    function withdraw(uint256 _pid, uint256 _amount) external;

    function enterStaking(uint256 _amount) external;

    function leaveStaking(uint256 _amount) external;

    function pendingMojito(uint256 _pid, address _user) external view returns (uint256);

    function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256);

    function emergencyWithdraw(uint256 _pid) external;
}

// File: contracts/rewarders/SimpleRewarderPerBlock.sol


pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;








/**
 * This is a sample contract to be used in the MasterChefMojito contract for partners to reward
 * stakers with their native token alongside JOE.
 *
 * It assumes no minting rights, so requires a set amount of YOUR_TOKEN to be transferred to this contract prior.
 * E.g. say you've allocated 100,000 XYZ to the JOE-XYZ farm over 30 days. Then you would need to transfer
 * 100,000 XYZ and set the block reward accordingly so it's fully distributed after 30 days.
 *
 */
contract SimpleRewarderPerBlock is IRewarder, BoringOwnable {
    using SafeMath for uint256;
    using BoringERC20 for IERC20;

    IERC20 public immutable override rewardToken;
    IERC20 public immutable lpToken;
    IMasterChef public immutable MCM;

    /// @notice Info of each MCM user.
    /// `amount` LP token amount the user has provided.
    /// `rewardDebt` The amount of YOUR_TOKEN entitled to the user.
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
    }

    /// @notice Info of each MCM poolInfo.
    /// `accTokenPerShare` Amount of YOUR_TOKEN each LP token is worth.
    /// `lastRewardBlock` The last block YOUR_TOKEN was rewarded to the poolInfo.
    struct PoolInfo {
        uint256 accTokenPerShare;
        uint256 lastRewardBlock;
    }

    /// @notice Info of the poolInfo.
    PoolInfo public poolInfo;
    /// @notice Info of each user that stakes LP tokens.
    mapping(address => UserInfo) public userInfo;

    uint256 public tokenPerBlock;
    uint256 private constant ACC_TOKEN_PRECISION = 1e12;

    event OnReward(address indexed user, uint256 amount);
    event RewardRateUpdated(uint256 oldRate, uint256 newRate);

    modifier onlyMCM() {
        require(msg.sender == address(MCM), "onlyMCM: only MasterChef V2 can call this function");
        _;
    }

    constructor(
        IERC20 _rewardToken,
        IERC20 _lpToken,
        uint256 _tokenPerBlock,
        IMasterChef _MCM
    ) public {
        require(Address.isContract(address(_rewardToken)), "constructor: reward token must be a valid contract");
        require(Address.isContract(address(_lpToken)), "constructor: LP token must be a valid contract");
        require(Address.isContract(address(_MCM)), "constructor: MasterChefMojito must be a valid contract");

        rewardToken = _rewardToken;
        lpToken = _lpToken;
        tokenPerBlock = _tokenPerBlock;
        MCM = _MCM;
        poolInfo = PoolInfo({lastRewardBlock: block.number, accTokenPerShare: 0});
    }

    /// @notice Update reward variables of the given poolInfo.
    /// @return pool Returns the pool that was updated.
    function updatePool() public returns (PoolInfo memory pool) {
        pool = poolInfo;

        if (block.number > pool.lastRewardBlock) {
            uint256 lpSupply = lpToken.balanceOf(address(MCM));

            if (lpSupply > 0) {
                uint256 blocks = block.number.sub(pool.lastRewardBlock);
                uint256 tokenReward = blocks.mul(tokenPerBlock);
                pool.accTokenPerShare = pool.accTokenPerShare.add((tokenReward.mul(ACC_TOKEN_PRECISION) / lpSupply));
            }

            pool.lastRewardBlock = block.number;
            poolInfo = pool;
        }
    }

    /// @notice Sets the distribution reward rate. This will also update the poolInfo.
    /// @param _tokenPerBlock The number of tokens to distribute per block
    function setRewardRate(uint256 _tokenPerBlock) external onlyOwner {
        updatePool();

        uint256 oldRate = tokenPerBlock;
        tokenPerBlock = _tokenPerBlock;

        emit RewardRateUpdated(oldRate, _tokenPerBlock);
    }

    /// @notice Function called by MasterChefMojito whenever staker claims JOE harvest. Allows staker to also receive a 2nd reward token.
    /// @param _user Address of user
    /// @param _lpAmount Number of LP tokens the user has
    function onMojitoReward(address _user, uint256 _lpAmount) external override onlyMCM {
        updatePool();
        PoolInfo memory pool = poolInfo;
        UserInfo storage user = userInfo[_user];
        uint256 pending;
        // if user had deposited
        if (user.amount > 0) {
            pending = (user.amount.mul(pool.accTokenPerShare) / ACC_TOKEN_PRECISION).sub(user.rewardDebt);
            uint256 balance = rewardToken.balanceOf(address(this));
            if (pending > balance) {
                rewardToken.safeTransfer(_user, balance);
            } else {
                rewardToken.safeTransfer(_user, pending);
            }
        }

        user.amount = _lpAmount;
        user.rewardDebt = user.amount.mul(pool.accTokenPerShare) / ACC_TOKEN_PRECISION;

        emit OnReward(_user, pending);
    }

    /// @notice View function to see pending tokens
    /// @param _user Address of user.
    /// @return pending reward for a given user.
    function pendingTokens(address _user) external view override returns (uint256 pending) {
        PoolInfo memory pool = poolInfo;
        UserInfo storage user = userInfo[_user];

        uint256 accTokenPerShare = pool.accTokenPerShare;
        uint256 lpSupply = lpToken.balanceOf(address(MCM));

        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 blocks = block.number.sub(pool.lastRewardBlock);
            uint256 tokenReward = blocks.mul(tokenPerBlock);
            accTokenPerShare = accTokenPerShare.add(tokenReward.mul(ACC_TOKEN_PRECISION) / lpSupply);
        }

        pending = (user.amount.mul(accTokenPerShare) / ACC_TOKEN_PRECISION).sub(user.rewardDebt);
    }

    /// @notice In case rewarder is stopped before emissions finished, this function allows
    /// withdrawal of remaining tokens.
    function emergencyWithdraw() public onlyOwner {
        rewardToken.safeTransfer(address(msg.sender), rewardToken.balanceOf(address(this)));
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_rewardToken","internalType":"contract IERC20"},{"type":"address","name":"_lpToken","internalType":"contract IERC20"},{"type":"uint256","name":"_tokenPerBlock","internalType":"uint256"},{"type":"address","name":"_MCM","internalType":"contract IMasterChef"}]},{"type":"event","name":"OnReward","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RewardRateUpdated","inputs":[{"type":"uint256","name":"oldRate","internalType":"uint256","indexed":false},{"type":"uint256","name":"newRate","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IMasterChef"}],"name":"MCM","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"emergencyWithdraw","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"lpToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"onMojitoReward","inputs":[{"type":"address","name":"_user","internalType":"address"},{"type":"uint256","name":"_lpAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pendingOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"pending","internalType":"uint256"}],"name":"pendingTokens","inputs":[{"type":"address","name":"_user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"accTokenPerShare","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"}],"name":"poolInfo","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"rewardToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRewardRate","inputs":[{"type":"uint256","name":"_tokenPerBlock","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenPerBlock","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"},{"type":"bool","name":"direct","internalType":"bool"},{"type":"bool","name":"renounce","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"tuple","name":"pool","internalType":"struct SimpleRewarderPerBlock.PoolInfo","components":[{"type":"uint256","name":"accTokenPerShare","internalType":"uint256"},{"type":"uint256","name":"lastRewardBlock","internalType":"uint256"}]}],"name":"updatePool","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"rewardDebt","internalType":"uint256"}],"name":"userInfo","inputs":[{"type":"address","name":"","internalType":"address"}]}]
              

Contract Creation Code

0x60e06040523480156200001157600080fd5b506040516200135d3803806200135d83398101604081905262000034916200016d565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a362000089846200016760201b62000acd1760201c565b620000b15760405162461bcd60e51b8152600401620000a890620001c8565b60405180910390fd5b620000c7836200016760201b62000acd1760201c565b620000e65760405162461bcd60e51b8152600401620000a8906200021a565b620000fc816200016760201b62000acd1760201c565b6200011b5760405162461bcd60e51b8152600401620000a89062000268565b6001600160601b0319606094851b811660805292841b831660a05260059190915590911b1660c052604080518082019091526000808252436020909201829052600255600355620002de565b3b151590565b6000806000806080858703121562000183578384fd5b84516200019081620002c5565b6020860151909450620001a381620002c5565b604086015160608701519194509250620001bd81620002c5565b939692955090935050565b60208082526032908201527f636f6e7374727563746f723a2072657761726420746f6b656e206d7573742062604082015271194818481d985b1a590818dbdb9d1c9858dd60721b606082015260800190565b6020808252602e908201527f636f6e7374727563746f723a204c5020746f6b656e206d75737420626520612060408201526d1d985b1a590818dbdb9d1c9858dd60921b606082015260800190565b60208082526036908201527f636f6e7374727563746f723a204d6173746572436865664d6f6a69746f206d7560408201527f737420626520612076616c696420636f6e747261637400000000000000000000606082015260800190565b6001600160a01b0381168114620002db57600080fd5b50565b60805160601c60a05160601c60c05160601c61101762000346600039806103bc528061070552806109935280610a8752508061038f52806106d85280610966525080610479528061052a5280610563528061084752806108eb5280610aab52506110176000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063e30c397811610066578063e30c3978146101bc578063e3161ddd146101c4578063f6b25624146101d9578063f7c618c1146101e1576100f5565b80638da5cb5b146101865780639e447fc61461018e578063c031a66f146101a1578063db2e21bc146101b4576100f5565b80634e71e0c8116100d35780634e71e0c81461014e5780635a2f3d09146101565780635fcbd2851461015e5780638043a2f614610173576100f5565b8063078dfbe7146100fa5780631959a0021461010f5780634198709a14610139575b600080fd5b61010d610108366004610cac565b6101e9565b005b61012261011d366004610c8a565b6102d8565b604051610130929190610fc2565b60405180910390f35b6101416102f1565b6040516101309190610fb9565b61010d6102f7565b610122610384565b61016661038d565b6040516101309190610da4565b61010d610181366004610cf5565b6103b1565b6101666105fa565b61010d61019c366004610d3b565b610609565b6101416101af366004610c8a565b610682565b61010d610817565b610166610914565b6101cc610923565b6040516101309190610fa2565b610166610a85565b610166610aa9565b6000546001600160a01b0316331461021c5760405162461bcd60e51b815260040161021390610f38565b60405180910390fd5b81156102b7576001600160a01b0383161515806102365750805b6102525760405162461bcd60e51b815260040161021390610e91565b600080546040516001600160a01b03808716939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0385166001600160a01b0319918216179091556001805490911690556102d3565b600180546001600160a01b0319166001600160a01b0385161790555b505050565b6004602052600090815260409020805460019091015482565b60055481565b6001546001600160a01b03163381146103225760405162461bcd60e51b815260040161021390610f6d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b60025460035482565b7f000000000000000000000000000000000000000000000000000000000000000081565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103f95760405162461bcd60e51b815260040161021390610dd1565b610401610923565b5061040a610c59565b5060408051808201825260025481526003546020808301919091526001600160a01b038516600090815260049091529182208054919290911561058c57600182015483518354610473929164e8d4a510009161046591610ad3565b8161046c57fe5b0490610b16565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016104c39190610da4565b60206040518083038186803b1580156104db57600080fd5b505afa1580156104ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105139190610d53565b905080821115610556576105516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168783610b3e565b61058a565b61058a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168784610b3e565b505b838255825164e8d4a51000906105a3908690610ad3565b816105aa57fe5b0460018301556040516001600160a01b038616907fd1072bb52c3131d0c96197b73fb8a45637e30f8b6664fc142310cc9b242859b4906105eb908490610fb9565b60405180910390a25050505050565b6000546001600160a01b031681565b6000546001600160a01b031633146106335760405162461bcd60e51b815260040161021390610f38565b61063b610923565b5060058054908290556040517fc390a98ace15a7bb6bab611eedfdbb2685043b241a869420043cdfb23ccfee50906106769083908590610fc2565b60405180910390a15050565b600061068c610c59565b5060408051808201825260025481526003546020808301919091526001600160a01b038086166000908152600492839052848120845195516370a0823160e01b815294959094909391927f000000000000000000000000000000000000000000000000000000000000000016916370a082319161072b917f00000000000000000000000000000000000000000000000000000000000000009101610da4565b60206040518083038186803b15801561074357600080fd5b505afa158015610757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077b9190610d53565b905083602001514311801561078f57508015155b156107f05760006107ad856020015143610b1690919063ffffffff16565b905060006107c660055483610ad390919063ffffffff16565b90506107eb836107db8364e8d4a51000610ad3565b816107e257fe5b86919004610c34565b935050505b6001830154835461080d919064e8d4a51000906104659086610ad3565b9695505050505050565b6000546001600160a01b031633146108415760405162461bcd60e51b815260040161021390610f38565b610912337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016108919190610da4565b60206040518083038186803b1580156108a957600080fd5b505afa1580156108bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e19190610d53565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610b3e565b565b6001546001600160a01b031681565b61092b610c59565b5060408051808201909152600254815260035460208201819052431115610a82576040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906109bb907f000000000000000000000000000000000000000000000000000000000000000090600401610da4565b60206040518083038186803b1580156109d357600080fd5b505afa1580156109e7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0b9190610d53565b90508015610a70576000610a2c836020015143610b1690919063ffffffff16565b90506000610a4560055483610ad390919063ffffffff16565b9050610a6b83610a5a8364e8d4a51000610ad3565b81610a6157fe5b8651919004610c34565b845250505b50436020820181905281516002556003555b90565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b3b151590565b600082610ae257506000610b10565b82820282848281610aef57fe5b0414610b0d5760405162461bcd60e51b815260040161021390610ef7565b90505b92915050565b600082821115610b385760405162461bcd60e51b815260040161021390610ec0565b50900390565b60006060846001600160a01b031663a9059cbb60e01b8585604051602401610b67929190610db8565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610ba59190610d6b565b6000604051808303816000865af19150503d8060008114610be2576040519150601f19603f3d011682016040523d82523d6000602084013e610be7565b606091505b5091509150818015610c11575080511580610c11575080806020019051810190610c119190610d1f565b610c2d5760405162461bcd60e51b815260040161021390610e23565b5050505050565b600082820183811015610b0d5760405162461bcd60e51b815260040161021390610e5a565b604051806040016040528060008152602001600081525090565b80356001600160a01b0381168114610b1057600080fd5b600060208284031215610c9b578081fd5b610ca58383610c73565b9392505050565b600080600060608486031215610cc0578182fd5b610cca8585610c73565b92506020840135610cda81610fd0565b91506040840135610cea81610fd0565b809150509250925092565b60008060408385031215610d07578182fd5b610d118484610c73565b946020939093013593505050565b600060208284031215610d30578081fd5b8151610b0d81610fd0565b600060208284031215610d4c578081fd5b5035919050565b600060208284031215610d64578081fd5b5051919050565b60008251815b81811015610d8b5760208186018101518583015201610d71565b81811115610d995782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526032908201527f6f6e6c794d434d3a206f6e6c79204d6173746572436865662056322063616e2060408201527131b0b636103a3434b990333ab731ba34b7b760711b606082015260800190565b6020808252601c908201527f426f72696e6745524332303a205472616e73666572206661696c656400000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601590820152744f776e61626c653a207a65726f206164647265737360581b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e6572604082015260600190565b815181526020918201519181019190915260400190565b90815260200190565b918252602082015260400190565b8015158114610fde57600080fd5b5056fea264697066735822122022f2e95224071bddfd4a285c1f9506f0df2f8693f7b2df4d74b7fbbb107894da64736f6c634300060c003300000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe00000000000000000000000098858d651b5147b805a768f8a93d13721e642f2e00000000000000000000000000000000000000000000000000ca8132b0328000000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b04495324

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063e30c397811610066578063e30c3978146101bc578063e3161ddd146101c4578063f6b25624146101d9578063f7c618c1146101e1576100f5565b80638da5cb5b146101865780639e447fc61461018e578063c031a66f146101a1578063db2e21bc146101b4576100f5565b80634e71e0c8116100d35780634e71e0c81461014e5780635a2f3d09146101565780635fcbd2851461015e5780638043a2f614610173576100f5565b8063078dfbe7146100fa5780631959a0021461010f5780634198709a14610139575b600080fd5b61010d610108366004610cac565b6101e9565b005b61012261011d366004610c8a565b6102d8565b604051610130929190610fc2565b60405180910390f35b6101416102f1565b6040516101309190610fb9565b61010d6102f7565b610122610384565b61016661038d565b6040516101309190610da4565b61010d610181366004610cf5565b6103b1565b6101666105fa565b61010d61019c366004610d3b565b610609565b6101416101af366004610c8a565b610682565b61010d610817565b610166610914565b6101cc610923565b6040516101309190610fa2565b610166610a85565b610166610aa9565b6000546001600160a01b0316331461021c5760405162461bcd60e51b815260040161021390610f38565b60405180910390fd5b81156102b7576001600160a01b0383161515806102365750805b6102525760405162461bcd60e51b815260040161021390610e91565b600080546040516001600160a01b03808716939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0385166001600160a01b0319918216179091556001805490911690556102d3565b600180546001600160a01b0319166001600160a01b0385161790555b505050565b6004602052600090815260409020805460019091015482565b60055481565b6001546001600160a01b03163381146103225760405162461bcd60e51b815260040161021390610f6d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b60025460035482565b7f00000000000000000000000098858d651b5147b805a768f8a93d13721e642f2e81565b336001600160a01b037f000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b0449532416146103f95760405162461bcd60e51b815260040161021390610dd1565b610401610923565b5061040a610c59565b5060408051808201825260025481526003546020808301919091526001600160a01b038516600090815260049091529182208054919290911561058c57600182015483518354610473929164e8d4a510009161046591610ad3565b8161046c57fe5b0490610b16565b905060007f00000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016104c39190610da4565b60206040518083038186803b1580156104db57600080fd5b505afa1580156104ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105139190610d53565b905080821115610556576105516001600160a01b037f00000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe168783610b3e565b61058a565b61058a6001600160a01b037f00000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe168784610b3e565b505b838255825164e8d4a51000906105a3908690610ad3565b816105aa57fe5b0460018301556040516001600160a01b038616907fd1072bb52c3131d0c96197b73fb8a45637e30f8b6664fc142310cc9b242859b4906105eb908490610fb9565b60405180910390a25050505050565b6000546001600160a01b031681565b6000546001600160a01b031633146106335760405162461bcd60e51b815260040161021390610f38565b61063b610923565b5060058054908290556040517fc390a98ace15a7bb6bab611eedfdbb2685043b241a869420043cdfb23ccfee50906106769083908590610fc2565b60405180910390a15050565b600061068c610c59565b5060408051808201825260025481526003546020808301919091526001600160a01b038086166000908152600492839052848120845195516370a0823160e01b815294959094909391927f00000000000000000000000098858d651b5147b805a768f8a93d13721e642f2e16916370a082319161072b917f000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b044953249101610da4565b60206040518083038186803b15801561074357600080fd5b505afa158015610757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077b9190610d53565b905083602001514311801561078f57508015155b156107f05760006107ad856020015143610b1690919063ffffffff16565b905060006107c660055483610ad390919063ffffffff16565b90506107eb836107db8364e8d4a51000610ad3565b816107e257fe5b86919004610c34565b935050505b6001830154835461080d919064e8d4a51000906104659086610ad3565b9695505050505050565b6000546001600160a01b031633146108415760405162461bcd60e51b815260040161021390610f38565b610912337f00000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016108919190610da4565b60206040518083038186803b1580156108a957600080fd5b505afa1580156108bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e19190610d53565b6001600160a01b037f00000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe169190610b3e565b565b6001546001600160a01b031681565b61092b610c59565b5060408051808201909152600254815260035460208201819052431115610a82576040516370a0823160e01b81526000906001600160a01b037f00000000000000000000000098858d651b5147b805a768f8a93d13721e642f2e16906370a08231906109bb907f000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b0449532490600401610da4565b60206040518083038186803b1580156109d357600080fd5b505afa1580156109e7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0b9190610d53565b90508015610a70576000610a2c836020015143610b1690919063ffffffff16565b90506000610a4560055483610ad390919063ffffffff16565b9050610a6b83610a5a8364e8d4a51000610ad3565b81610a6157fe5b8651919004610c34565b845250505b50436020820181905281516002556003555b90565b7f000000000000000000000000fdfce767add9dcf032cbd0de35f0e57b0449532481565b7f00000000000000000000000044a6d299eed7ac941f090257380ee1d1934fadbe81565b3b151590565b600082610ae257506000610b10565b82820282848281610aef57fe5b0414610b0d5760405162461bcd60e51b815260040161021390610ef7565b90505b92915050565b600082821115610b385760405162461bcd60e51b815260040161021390610ec0565b50900390565b60006060846001600160a01b031663a9059cbb60e01b8585604051602401610b67929190610db8565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610ba59190610d6b565b6000604051808303816000865af19150503d8060008114610be2576040519150601f19603f3d011682016040523d82523d6000602084013e610be7565b606091505b5091509150818015610c11575080511580610c11575080806020019051810190610c119190610d1f565b610c2d5760405162461bcd60e51b815260040161021390610e23565b5050505050565b600082820183811015610b0d5760405162461bcd60e51b815260040161021390610e5a565b604051806040016040528060008152602001600081525090565b80356001600160a01b0381168114610b1057600080fd5b600060208284031215610c9b578081fd5b610ca58383610c73565b9392505050565b600080600060608486031215610cc0578182fd5b610cca8585610c73565b92506020840135610cda81610fd0565b91506040840135610cea81610fd0565b809150509250925092565b60008060408385031215610d07578182fd5b610d118484610c73565b946020939093013593505050565b600060208284031215610d30578081fd5b8151610b0d81610fd0565b600060208284031215610d4c578081fd5b5035919050565b600060208284031215610d64578081fd5b5051919050565b60008251815b81811015610d8b5760208186018101518583015201610d71565b81811115610d995782828501525b509190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526032908201527f6f6e6c794d434d3a206f6e6c79204d6173746572436865662056322063616e2060408201527131b0b636103a3434b990333ab731ba34b7b760711b606082015260800190565b6020808252601c908201527f426f72696e6745524332303a205472616e73666572206661696c656400000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601590820152744f776e61626c653a207a65726f206164647265737360581b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e6572604082015260600190565b815181526020918201519181019190915260400190565b90815260200190565b918252602082015260400190565b8015158114610fde57600080fd5b5056fea264697066735822122022f2e95224071bddfd4a285c1f9506f0df2f8693f7b2df4d74b7fbbb107894da64736f6c634300060c0033