Contract 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397

Txn Hash
Block
From
To
Value [Txn Fee]
0xe7ef92615cc632616e426b46566e5d1e9ac76f76efaac48895b960ed40758dab125381132021-07-20 17:42:533 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291403937008
0x672f10cd3053d3259b8e3b1abb713371c424796ae1ef4fb817fee4ddb5c33258125381092021-07-20 17:42:483 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291403937008
0xab3ef2c2c7150a3801a7e09390bc5b33cc9a39ba05fd6a1808220d7c9f2d88f8125381062021-07-20 17:42:443 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291403937008
0xe145eb4b6c27082c7d1c5f5148408880f4ce7d9c91cb4461f170bb456c2929c5125381002021-07-20 17:42:403 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291403937008
0x8055188a2cb38ee283851ac1ef9608387e43887532c176aa1962e3b2fe73b424125380972021-07-20 17:42:353 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.538059330615
0x929454e702ba520f6b482bc7e49ac557285c16951ead100a3939be87fd6059f7125378712021-07-20 17:38:243 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291403937008
0x1aaf4018587ca9d7c5929eab610a69eb450c150ebeec491e3fbc3f3b863b0c89125378642021-07-20 17:38:183 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291403937008
0x1aea54c3c61647f7d9841ce0790d045d825f2b2fbf8bb14c92f8bce25e2ba537125378482021-07-20 17:38:023 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.290224008808
0xe622a75e0683ad5a5d43a7bbc7476b821028dec4794ce66b5c4a50d65faedcf4125378442021-07-20 17:37:583 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.290223258608
0x0d278ca079e57cca537ca9d936627e78fb9bf67c0d39a1c0e9716d31f143ed11125378392021-07-20 17:37:533 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.290223258608
0xb64690cfdf2785a3034e323ac9a0152775cfb8a099431d10799ffb20aaa2ffaf125378342021-07-20 17:37:493 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.290223258608
0xeea2c434ed4dc0609ac6d155250b404a6743d7bf881be68e52a95c3184bd6720125378312021-07-20 17:37:453 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.289053492208
0xc4425ec13fee6ee5667fd3704884629abfc6ce799b7076eb0df52466592d7c34125378272021-07-20 17:37:383 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291401004408
0xa620dfdfbb0838c55cad61fe297e67608b08e9bba71f23516c5de6bac3beac29125378242021-07-20 17:37:353 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291402504808
0x212f99cbb67ff591259b3d16b89fc71026b64c1bafcae29ada4e5f6b39cf469b125378202021-07-20 17:37:323 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.291402504808
0x887275317c30202311cd05a7e42196d425d35128a130c516a1833ffee494f7ae125378172021-07-20 17:37:293 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.290222508408
0x78faae3771af100506187b8e166349e34b936614e76e5a821c1065b09cfa7b4a125378152021-07-20 17:37:273 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.290222508408
0x03a7c0f60334ef2aa7133298bfa0f22755e56cda23f42a75f46df8c6b5b00d87125378122021-07-20 17:37:233 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.290222508408
0x8c5db326d7e24d61b78467a58c5e118a6593f999d18afcabe257722f1eb0b4d2125378102021-07-20 17:37:213 days 14 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  0x4a3dc304c94bfe63ebec3f5dc9ef972eab8393970 FTM0.289971941608
0x164ca97a76fbade477c471c0d77deb542c1d22bda825d21a58428a89c32fbec4125242912021-07-20 13:22:133 days 18 hrs ago0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f IN  Contract Creation0 FTM0.227150650049
[ Download CSV Export 
Latest 20 internal transactions
Parent Txn Hash Block From To Value
0xe7ef92615cc632616e426b46566e5d1e9ac76f76efaac48895b960ed40758dab125381132021-07-20 17:42:533 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x672f10cd3053d3259b8e3b1abb713371c424796ae1ef4fb817fee4ddb5c33258125381092021-07-20 17:42:483 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0xab3ef2c2c7150a3801a7e09390bc5b33cc9a39ba05fd6a1808220d7c9f2d88f8125381062021-07-20 17:42:443 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0xe145eb4b6c27082c7d1c5f5148408880f4ce7d9c91cb4461f170bb456c2929c5125381002021-07-20 17:42:403 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x8055188a2cb38ee283851ac1ef9608387e43887532c176aa1962e3b2fe73b424125380972021-07-20 17:42:353 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x929454e702ba520f6b482bc7e49ac557285c16951ead100a3939be87fd6059f7125378712021-07-20 17:38:243 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x1aaf4018587ca9d7c5929eab610a69eb450c150ebeec491e3fbc3f3b863b0c89125378642021-07-20 17:38:183 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x1aea54c3c61647f7d9841ce0790d045d825f2b2fbf8bb14c92f8bce25e2ba537125378482021-07-20 17:38:023 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0xe622a75e0683ad5a5d43a7bbc7476b821028dec4794ce66b5c4a50d65faedcf4125378442021-07-20 17:37:583 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x0d278ca079e57cca537ca9d936627e78fb9bf67c0d39a1c0e9716d31f143ed11125378392021-07-20 17:37:533 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0xb64690cfdf2785a3034e323ac9a0152775cfb8a099431d10799ffb20aaa2ffaf125378342021-07-20 17:37:493 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0xeea2c434ed4dc0609ac6d155250b404a6743d7bf881be68e52a95c3184bd6720125378312021-07-20 17:37:453 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0xc4425ec13fee6ee5667fd3704884629abfc6ce799b7076eb0df52466592d7c34125378272021-07-20 17:37:383 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0xa620dfdfbb0838c55cad61fe297e67608b08e9bba71f23516c5de6bac3beac29125378242021-07-20 17:37:353 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x212f99cbb67ff591259b3d16b89fc71026b64c1bafcae29ada4e5f6b39cf469b125378202021-07-20 17:37:323 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x887275317c30202311cd05a7e42196d425d35128a130c516a1833ffee494f7ae125378172021-07-20 17:37:293 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x78faae3771af100506187b8e166349e34b936614e76e5a821c1065b09cfa7b4a125378152021-07-20 17:37:273 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x03a7c0f60334ef2aa7133298bfa0f22755e56cda23f42a75f46df8c6b5b00d87125378122021-07-20 17:37:233 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x8c5db326d7e24d61b78467a58c5e118a6593f999d18afcabe257722f1eb0b4d2125378102021-07-20 17:37:213 days 14 hrs ago 0x4a3dc304c94bfe63ebec3f5dc9ef972eab839397  Contract Creation0 FTM
0x164ca97a76fbade477c471c0d77deb542c1d22bda825d21a58428a89c32fbec4125242912021-07-20 13:22:133 days 18 hrs ago 0x67651b5d7a7ce1ce3b93b9f10d8f3104321e421f  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultFactory

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 99999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

File 2 of 14 : 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 3 of 14 : 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 4 of 14 : 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 5 of 14 : 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 6 of 14 : 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 7 of 14 : 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 8 of 14 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

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

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

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

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

File 9 of 14 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

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

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

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

    function initialize(address, address) external;
}

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

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

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

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

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

import './IUniswapV2Router01.sol';

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

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

File 12 of 14 : VaultFactory.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./VaultInitializable.sol";

contract VaultFactory is Ownable {
    address[] public allVault;

    event NewVaultContract(address indexed Vault);

    constructor() public {
        //
    }

    function allVaultLength() external view returns (uint) {
        return allVault.length;
    }

    /*
     * @notice Deploy the vault
     * @param _token: Staked Token/LP contract
     * @param _reward: Reward Token contract
     * @param _pid: Farm pid
     * @param _depositFee: depositFee
     * @param _withdrawFeePeriod: withdrawFeePeriod
     * @param _masterchef: MasterChef contract
     * @param _swapRouter: Router contract
     * @param _admin: address of the admin
     * @param _feeAddress: address of the feeAddress
     * @return address of new vault contract
     */
    function deployVault(
        IERC20 _token,
        IERC20 _reward,
        uint256 _pid,
        uint256 _depositFee,
        uint256 _withdrawFeePeriod,
        IMasterChef _masterchef,
        IUniswapV2Router02 _swapRouter,
        address _admin,
        address _feeAddress
    ) external onlyOwner {
        require(_token.totalSupply() >= 0);
        require(_reward.totalSupply() >= 0);

        bytes memory bytecode = type(VaultInitializable).creationCode;
        bytes32 salt = keccak256(abi.encodePacked(_token, _reward, _pid, _masterchef));
        address VaultAddress;

        assembly {
            VaultAddress := create2(0, add(bytecode, 32), mload(bytecode), salt)
        }

        VaultInitializable(VaultAddress).initialize(
            _token,
            _reward,
            _pid,
            _depositFee,
            _withdrawFeePeriod,
            _masterchef,
            _swapRouter,
            _admin,
            _feeAddress
        );

        allVault.push(VaultAddress);

        emit NewVaultContract(VaultAddress);
    }
}

File 13 of 14 : VaultInitializable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "./libs/IMasterChef.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";

pragma solidity 0.6.12;

contract VaultInitializable is Ownable, Pausable {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    struct UserInfo {
        uint256 shares; // number of shares for a user
        uint256 lastDepositedTime; // keeps track of deposited time for potential penalty
        uint256 lastUserAction; // keeps track of token deposited at the last user action
        uint256 lastUserActionTime; // keeps track of the last user action time
    }

    // The address of the factory
    address public VAULT_FACTORY;

    // Whether it is initialized
    bool public isInitialized;

    IERC20 public token; // Staked Token/LP
    IERC20 public reward; // Reward Token
    uint256 public pid; // Farm pid
    IMasterChef public masterchef; // Master Chef

    mapping(address => UserInfo) public userInfo;

    uint256 public totalShares;
    uint256 public lastHarvestedTime;
    address public feeAddress;
    IUniswapV2Router02 public swapRouter;

    uint256 public constant MAX_PERFORMANCE_FEE = 500; // 5%
    uint256 public constant MAX_CALL_FEE = 100; // 1%
    uint256 public constant MAX_DEPOSIT_FEE = 400; // 4%
    uint256 public constant MAX_WITHDRAW_FEE = 400; // 4%
    uint256 public constant MAX_WITHDRAW_FEE_PERIOD = 72 hours; // 3 days

    uint256 public performanceFee = 200; // 2%
    uint256 public callFee = 50; // 0.5%
    uint256 public depositFee = 0; // 0%
    uint256 public withdrawFee = 400; // 4%
    uint256 public withdrawFeePeriod = 48 hours; // 2 days

    event Deposit(address indexed sender, uint256 amount, uint256 shares, uint256 lastDepositedTime);
    event Withdraw(address indexed sender, uint256 amount, uint256 shares);
    event Harvest(address indexed sender, uint256 performanceFee, uint256 callFee);
    event Pause();
    event Unpause();
    event SwapRouterUpdated(address indexed operator, address indexed router);

    constructor() public {
        VAULT_FACTORY = msg.sender;
    }

    /*
     * @notice Initialize the contract
     * @param _token: Staked Token/LP contract
     * @param _reward: Reward Token contract
     * @param _pid: Farm pid
     * @param _depositFee: depositFee
     * @param _withdrawFeePeriod: withdrawFeePeriod
     * @param _masterchef: MasterChef contract
     * @param _swapRouter: Router contract
     * @param _admin: address of the admin
     * @param _feeAddress: address of the feeAddress
     */
    function initialize(
        IERC20 _token,
        IERC20 _reward,
        uint256 _pid,
        uint256 _depositFee,
        uint256 _withdrawFeePeriod,
        IMasterChef _masterchef,
        IUniswapV2Router02 _swapRouter,
        address _admin,
        address _feeAddress
    ) external {
        require(!isInitialized, "Already initialized");
        require(msg.sender == VAULT_FACTORY, "Not factory");

        // Make this contract initialized
        isInitialized = true;

        token = _token;
        reward = _reward;
        pid = _pid;
        depositFee = _depositFee;
        withdrawFeePeriod = _withdrawFeePeriod;
        masterchef = _masterchef;
        swapRouter = _swapRouter;
        feeAddress = _feeAddress;

        // Infinite approve
        IERC20(_token).safeApprove(address(_masterchef), uint256(-1));

        // Transfer ownership to the admin address who becomes owner of the contract
        transferOwnership(_admin);
    }

    /**
     * @notice Checks if the msg.sender is a contract or a proxy
     */
    modifier notContract() {
        require(!_isContract(msg.sender), "contract not allowed");
        require(msg.sender == tx.origin, "proxy contract not allowed");
        _;
    }

    /**
     * @notice Deposits funds into the Vault
     * @dev Only possible when contract not paused.
     * @param _amount: number of tokens to deposit
     */
    function deposit(uint256 _amount) external whenNotPaused notContract {
        require(_amount > 0, "Nothing to deposit");

        uint256 pool = balanceOf();

        uint256 beforeDeposit = token.balanceOf(address(this));
        token.safeTransferFrom(msg.sender, address(this), _amount);
        uint256 afterDeposit = token.balanceOf(address(this));
        _amount = afterDeposit.sub(beforeDeposit);

        if (depositFee > 0) {
            uint256 _depositFee = _amount.mul(depositFee).div(10000);
            token.safeTransfer(feeAddress, _depositFee);
            _amount = _amount.sub(_depositFee);
        }

        uint256 currentShares = 0;
        if (totalShares != 0) {
            currentShares = (_amount.mul(totalShares)).div(pool);
        } else {
            currentShares = _amount;
        }
        UserInfo storage user = userInfo[msg.sender];

        user.shares = user.shares.add(currentShares);
        user.lastDepositedTime = block.timestamp;

        totalShares = totalShares.add(currentShares);

        user.lastUserAction = user.shares.mul(balanceOf()).div(totalShares);
        user.lastUserActionTime = block.timestamp;

        _earn();

        emit Deposit(msg.sender, _amount, currentShares, block.timestamp);
    }

    /**
     * @notice Withdraws all funds for a user
     */
    function withdrawAll() external notContract {
        withdraw(userInfo[msg.sender].shares);
    }

    /**
     * @notice Reinvests tokens into MasterChef in case reward token is different will be swaped and created lp token
     * @dev Only possible when contract not paused.
     */
    function harvest() external notContract whenNotPaused {
        IMasterChef(masterchef).deposit(pid, 0);

        uint256 bal = availableReward();
        uint256 currentCallFee = bal.mul(callFee).div(10000);
        reward.safeTransfer(msg.sender, currentCallFee);
        bal = bal.sub(currentCallFee);

        if (bal > 0 && address(token) != address(reward)) {
            reward.approve(address(swapRouter), uint256(-1));
            IUniswapV2Pair pair = IUniswapV2Pair(address(token));
            IERC20 token0 = IERC20(pair.token0());
            IERC20 token1 = IERC20(pair.token1());
            uint256 half0 = bal.div(2);
            uint256 half1 = bal.sub(half0);
            address[] memory path = new address[](2);
            path[0] = address(reward);

            if (address(token0) != address(reward)) {
                path[1] = address(token0);
                swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(half0, 0, path, address(this), block.timestamp);
                token0.approve(address(swapRouter), uint256(-1));
            }

            if (address(token1) != address(reward)) {
                path[1] = address(token1);
                swapRouter.swapExactTokensForTokensSupportingFeeOnTransferTokens(half1, 0, path, address(this), block.timestamp);
                token1.approve(address(swapRouter), uint256(-1));
            }

            swapRouter.addLiquidity(address(token0), address(token1), token0.balanceOf(address(this)), token1.balanceOf(address(this)), 0, 0, address(this), block.timestamp);

            // check if there has remain any unused swaped token after adding to liquidity if yes then send Fee/Tax Distribution
            if (address(token0) != address(reward)) {
                half0 = token0.balanceOf(address(this));
                if (half0 > 0) token0.safeTransfer(feeAddress, half0);
            }

            if (address(token1) != address(reward)) {
                half1 = token1.balanceOf(address(this));
                if (half1 > 0) token1.safeTransfer(feeAddress, half1);
            }
        }

        // send perfomance LP to Fee/Tax Distribution
        bal = availableToken();
        uint256 currentPerformanceFee = bal.mul(performanceFee).div(10000);
        token.safeTransfer(feeAddress, currentPerformanceFee);

        _earn();

        lastHarvestedTime = block.timestamp;

        emit Harvest(msg.sender, currentPerformanceFee, currentCallFee);
    }

    /**
     * @notice Sets feeAddress address
     * @dev Only callable by the contract owner.
     */
    function setFeeAddress(address _feeAddress) external onlyOwner {
        require(_feeAddress != address(0), "Cannot be zero address");
        feeAddress = _feeAddress;
    }

    /**
     * @notice Sets performance fee
     * @dev Only callable by the contract owner.
     */
    function setPerformanceFee(uint256 _performanceFee) external onlyOwner {
        require(_performanceFee <= MAX_PERFORMANCE_FEE, "performanceFee cannot be more than MAX_PERFORMANCE_FEE");
        performanceFee = _performanceFee;
    }

    /**
     * @notice Sets call fee
     * @dev Only callable by the contract owner.
     */
    function setCallFee(uint256 _callFee) external onlyOwner {
        require(_callFee <= MAX_CALL_FEE, "callFee cannot be more than MAX_CALL_FEE");
        callFee = _callFee;
    }

    /**
     * @notice Sets deposit fee
     * @dev Only callable by the contract owner.
     */
    function setDeposit(uint256 _depositFee) external onlyOwner {
        require(_depositFee <= MAX_DEPOSIT_FEE, "depositFee cannot be more than MAX_DEPOSIT_FEE");
        depositFee = _depositFee;
    }

    /**
     * @notice Sets withdraw fee
     * @dev Only callable by the contract owner.
     */
    function setWithdrawFee(uint256 _withdrawFee) external onlyOwner {
        require(_withdrawFee <= MAX_WITHDRAW_FEE, "withdrawFee cannot be more than MAX_WITHDRAW_FEE");
        withdrawFee = _withdrawFee;
    }

    /**
     * @notice Sets withdraw fee period
     * @dev Only callable by the contract owner.
     */
    function setWithdrawFeePeriod(uint256 _withdrawFeePeriod) external onlyOwner {
        require(
            _withdrawFeePeriod <= MAX_WITHDRAW_FEE_PERIOD,
            "withdrawFeePeriod cannot be more than MAX_WITHDRAW_FEE_PERIOD"
        );
        withdrawFeePeriod = _withdrawFeePeriod;
    }

    /**
     * @notice Withdraws from MasterChef to Vault without caring about rewards.
     * @dev EMERGENCY ONLY. Only callable by the contract owner.
     */
    function emergencyWithdraw() external onlyOwner {
        IMasterChef(masterchef).emergencyWithdraw(pid);
    }

    /**
     * @notice Withdraw unexpected tokens sent to the Vault
     */
    function inCaseTokensGetStuck(address _token) external onlyOwner {
        require(_token != address(token), "Token cannot be same as deposit token");
        require(_token != address(reward), "Token cannot be same as reward token");

        uint256 amount = IERC20(_token).balanceOf(address(this));
        IERC20(_token).safeTransfer(msg.sender, amount);
    }

    /**
     * @notice Triggers stopped state
     * @dev Only possible when contract not paused.
     */
    function pause() external onlyOwner whenNotPaused {
        _pause();
        emit Pause();
    }

    /**
     * @notice Returns to normal state
     * @dev Only possible when contract is paused.
     */
    function unpause() external onlyOwner whenPaused {
        _unpause();
        emit Unpause();
    }

    /**
     * @notice Calculates the expected harvest reward from third party
     * @return Expected reward to collect
     */
    function calculateHarvestRewards() external view returns (uint256) {
        uint256 amount = IMasterChef(masterchef).pendingToken(pid, address(this));
        amount = amount.add(availableReward());
        uint256 currentCallFee = amount.mul(callFee).div(10000);

        return currentCallFee;
    }

    /**
     * @notice Calculates the total pending rewards that can be restaked
     * @return Returns total pending rewards
     */
    function calculateTotalPendingRewards() external view returns (uint256) {
        uint256 amount = IMasterChef(masterchef).pendingToken(pid, address(this));
        amount = amount.add(availableReward());

        return amount;
    }

    /**
     * @notice Calculates the price per share
     */
    function getPricePerFullShare() external view returns (uint256) {
        return totalShares == 0 ? 1e18 : balanceOf().mul(1e18).div(totalShares);
    }

    /**
     * @notice Withdraws from funds from the Vault
     * @param _shares: Number of shares to withdraw
     */
    function withdraw(uint256 _shares) public notContract {
        UserInfo storage user = userInfo[msg.sender];
        require(_shares > 0, "Nothing to withdraw");
        require(_shares <= user.shares, "Withdraw amount exceeds balance");

        uint256 currentAmount = (balanceOf().mul(_shares)).div(totalShares);
        user.shares = user.shares.sub(_shares);
        totalShares = totalShares.sub(_shares);

        uint256 bal = availableToken();
        if (bal < currentAmount) {
            uint256 balWithdraw = currentAmount.sub(bal);
            IMasterChef(masterchef).withdraw(pid, balWithdraw);
            uint256 balAfter = availableToken();
            uint256 diff = balAfter.sub(bal);
            if (diff < balWithdraw) {
                currentAmount = bal.add(diff);
            }
        }

        // Withdraw before withdrawFeePeriod send Fee/Tax Distribution
        if (block.timestamp < user.lastDepositedTime.add(withdrawFeePeriod)) {
            uint256 currentWithdrawFee = currentAmount.mul(withdrawFee).div(10000);
            token.safeTransfer(feeAddress, currentWithdrawFee);
            currentAmount = currentAmount.sub(currentWithdrawFee);
        }

        if (user.shares > 0) {
            user.lastUserAction = user.shares.mul(balanceOf()).div(totalShares);
        } else {
            user.lastUserAction = 0;
        }

        user.lastUserActionTime = block.timestamp;

        token.safeTransfer(msg.sender, currentAmount);

        emit Withdraw(msg.sender, currentAmount, _shares);
    }

    /**
     * @notice Custom logic for how much the vault allows to be borrowed
     * @dev The contract puts 100% of the tokens to work.
     */
    function availableToken() public view returns (uint256) {
        return token.balanceOf(address(this));
    }

    /**
     * @notice Custom logic for how much the vault allows to be borrowed
     * @dev The contract puts 100% of the tokens to work.
     */
    function availableReward() public view returns (uint256) {
        return reward.balanceOf(address(this));
    }

    /**
     * @notice Calculates the total underlying tokens
     * @dev It includes tokens held by the contract and held in MasterChef
     */
    function balanceOf() public view returns (uint256) {
        (uint256 amount, ) = IMasterChef(masterchef).userInfo(pid, address(this));
        return token.balanceOf(address(this)).add(amount);
    }

    /**
     * @notice Deposits tokens into MasterChef
     */
    function _earn() internal {
        uint256 bal = availableToken();
        if (bal > 0) {
            IMasterChef(masterchef).deposit(pid, bal);
        }
    }

    /**
     * @notice Checks if address is a contract
     * @dev It prevents contract from being targetted
     */
    function _isContract(address addr) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(addr)
        }
        return size > 0;
    }

    // Update the swap router.
    function setSwapRouter(address _router) public onlyOwner {
        swapRouter = IUniswapV2Router02(_router);
        emit SwapRouterUpdated(msg.sender, address(swapRouter));
    }
}

File 14 of 14 : IMasterChef.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

    function withdraw(uint256 _pid, uint256 _amount) external;

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

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

    function emergencyWithdraw(uint256 _pid) external;
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"Vault","type":"address"}],"name":"NewVaultContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allVaultLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"contract IERC20","name":"_reward","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_depositFee","type":"uint256"},{"internalType":"uint256","name":"_withdrawFeePeriod","type":"uint256"},{"internalType":"contract IMasterChef","name":"_masterchef","type":"address"},{"internalType":"contract IUniswapV2Router02","name":"_swapRouter","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_feeAddress","type":"address"}],"name":"deployVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b614cf78061007d6000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063933374871161005057806393337487146100cc578063e267f9271461013d578063f2fde38b1461015a57610072565b8063715018a6146100775780637cc98489146100815780638da5cb5b1461009b575b600080fd5b61007f61018d565b005b6100896102a4565b60408051918252519081900360200190f35b6100a36102aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61007f60048036036101208110156100e357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160408201359160608101359160808201359160a081013582169160c082013581169160e081013582169161010090910135166102c6565b6100a36004803603602081101561015357600080fd5b50356106a0565b61007f6004803603602081101561017057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166106d4565b610195610875565b73ffffffffffffffffffffffffffffffffffffffff166101b36102aa565b73ffffffffffffffffffffffffffffffffffffffff161461023557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60015490565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6102ce610875565b73ffffffffffffffffffffffffffffffffffffffff166102ec6102aa565b73ffffffffffffffffffffffffffffffffffffffff161461036e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60008973ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103b657600080fd5b505afa1580156103ca573d6000803e3d6000fd5b505050506040513d60208110156103e057600080fd5b505110156103ed57600080fd5b60008873ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561043557600080fd5b505afa158015610449573d6000803e3d6000fd5b505050506040513d602081101561045f57600080fd5b5051101561046c57600080fd5b60606040518060200161047e90610879565b6020820181038252601f19601f82011660405250905060008a8a8a88604051602001808573ffffffffffffffffffffffffffffffffffffffff1660601b81526014018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018381526020018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019450505050506040516020818303038152906040528051906020012090506000818351602085016000f5604080517f4cedab0d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8f811660048301528e81166024830152604482018e9052606482018d9052608482018c90528a811660a483015289811660c483015288811660e4830152878116610104830152915192935090831691634cedab0d916101248082019260009290919082900301818387803b1580156105e157600080fd5b505af11580156105f5573d6000803e3d6000fd5b505060018054808201825560009182527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86169081179091556040519093507ff71da4d572e5469c0d3030dd8a0f70fa5f282b833bd64ba71818ea5deaecceae9250a2505050505050505050505050565b600181815481106106ad57fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b6106dc610875565b73ffffffffffffffffffffffffffffffffffffffff166106fa6102aa565b73ffffffffffffffffffffffffffffffffffffffff161461077c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166107e8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614c9c6026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b614415806108878339019056fe608060405260c8600b556032600c556000600d55610190600e556202a300600f553480156200002d57600080fd5b5060006200003a620000a9565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506000805460ff60a01b19169055600180546001600160a01b03191633179055620000ad565b3390565b61435880620000bd6000396000f3fe608060405234801561001057600080fd5b50600436106103155760003560e01c806377c7b8fc116101a7578063c31c9c07116100ee578063e941fa7811610097578063f5bade6611610071578063f5bade66146106a7578063fb1db278146106c4578063fc0c546a146106cc57610315565b8063e941fa7814610664578063f10684541461066c578063f2fde38b1461067457610315565b8063db2e21bc116100c8578063db2e21bc14610621578063def68a9c14610629578063df10b4e61461065c57610315565b8063c31c9c0714610611578063c6d87dd514610619578063d4b0de2f1461061957610315565b80638da5cb5b11610150578063b6ac642a1161012a578063b6ac642a146105cf578063b6b55f25146105ec578063bdca91651461060957610315565b80638da5cb5b146105b757806390321e1a146105bf578063b60f0531146105c757610315565b8063853828b611610181578063853828b6146105745780638705fcd41461057c57806387788782146105af57610315565b806377c7b8fc1461055c5780637ba132fe146105645780638456cb591461056c57610315565b80633f4ba83a1161026b578063564b28a01161021457806370897b23116101ee57806370897b231461052f578063715018a61461054c578063722713f71461055457610315565b8063564b28a0146105175780635c975abb1461051f57806367a527931461052757610315565b80634641257d116102455780634641257d146104965780634ad84b341461049e5780634cedab0d146104a657610315565b80633f4ba83a14610453578063412736571461045b578063412753581461048e57610315565b80632816cc4a116102cd5780632e1a7d4d116102a75780632e1a7d4d14610412578063392e53cd1461042f5780633a98ef391461044b57610315565b80632816cc4a146103e85780632ad5a53f146104025780632cfc5f011461040a57610315565b80631efac1b8116102fe5780631efac1b8146103a4578063228cb733146103c357806326465826146103cb57610315565b8063103f29071461031a5780631959a0021461034b575b600080fd5b6103226106d4565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61037e6004803603602081101561036157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166106f0565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6103c1600480360360208110156103ba57600080fd5b5035610717565b005b610322610820565b6103c1600480360360208110156103e157600080fd5b503561083c565b6103f0610943565b60408051918252519081900360200190f35b6103f0610a09565b6103f0610a0e565b6103c16004803603602081101561042857600080fd5b5035610a15565b610437610e1b565b604080519115158252519081900360200190f35b6103f0610e3c565b6103c1610e42565b6103c16004803603602081101561047157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610f90565b6103226110af565b6103c16110cb565b6103f0611ea6565b6103c160048036036101208110156104bd57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013582169160408201359160608101359160808201359160a081013582169160c082013581169160e08101358216916101009091013516611f48565b6103f061215f565b6104376121d0565b6103f06121f1565b6103c16004803603602081101561054557600080fd5b50356121f7565b6103c16122ff565b6103f0612416565b6103f0612566565b6103f06125a0565b6103c161267f565b6103c16127ce565b6103c16004803603602081101561059257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166128cc565b6103f0612a3d565b610322612a43565b6103f0612a5f565b6103f0612a65565b6103c1600480360360208110156105e557600080fd5b5035612a6b565b6103c16004803603602081101561060257600080fd5b5035612b73565b6103f0612ff2565b610322612ff8565b6103f0613014565b6103c161301a565b6103c16004803603602081101561063f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16613152565b6103f061339e565b6103f06133a4565b6103f06133aa565b6103c16004803603602081101561068a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166133b0565b6103c1600480360360208110156106bd57600080fd5b5035613551565b610322613659565b610322613675565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60066020526000908152604090208054600182015460028301546003909301549192909184565b61071f613691565b73ffffffffffffffffffffffffffffffffffffffff1661073d612a43565b73ffffffffffffffffffffffffffffffffffffffff16146107bf57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6203f48081111561081b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180614256603d913960400191505060405180910390fd5b600f55565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b610844613691565b73ffffffffffffffffffffffffffffffffffffffff16610862612a43565b73ffffffffffffffffffffffffffffffffffffffff16146108e457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b606481111561093e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806141d76028913960400191505060405180910390fd5b600c55565b60055460048054604080517f48e43af40000000000000000000000000000000000000000000000000000000081529283019190915230602483015251600092839273ffffffffffffffffffffffffffffffffffffffff909116916348e43af491604480820192602092909190829003018186803b1580156109c357600080fd5b505afa1580156109d7573d6000803e3d6000fd5b505050506040513d60208110156109ed57600080fd5b50519050610a036109fc611ea6565b8290613695565b91505090565b606481565b6203f48081565b610a1e33613712565b15610a8a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f776564000000000000000000000000604482015290519081900360640190fd5b333214610af857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f70726f787920636f6e7472616374206e6f7420616c6c6f776564000000000000604482015290519081900360640190fd5b33600090815260066020526040902081610b7357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4e6f7468696e6720746f20776974686472617700000000000000000000000000604482015290519081900360640190fd5b8054821115610be357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f576974686472617720616d6f756e7420657863656564732062616c616e636500604482015290519081900360640190fd5b6000610c03600754610bfd85610bf7612416565b90613718565b9061378b565b8254909150610c12908461380c565b8255600754610c21908461380c565b6007556000610c2e61215f565b905081811015610d0f576000610c44838361380c565b60055460048054604080517f441a3e7000000000000000000000000000000000000000000000000000000000815292830191909152602482018490525192935073ffffffffffffffffffffffffffffffffffffffff9091169163441a3e709160448082019260009290919082900301818387803b158015610cc457600080fd5b505af1158015610cd8573d6000803e3d6000fd5b505050506000610ce661215f565b90506000610cf4828561380c565b905082811015610d0b57610d088482613695565b94505b5050505b600f546001840154610d2091613695565b421015610d7f576000610d44612710610bfd600e548661371890919063ffffffff16565b600954600254919250610d719173ffffffffffffffffffffffffffffffffffffffff908116911683613883565b610d7b838261380c565b9250505b825415610da957610d9f600754610bfd610d97612416565b865490613718565b6002840155610db1565b600060028401555b426003840155600254610ddb9073ffffffffffffffffffffffffffffffffffffffff163384613883565b6040805183815260208101869052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a250505050565b60015474010000000000000000000000000000000000000000900460ff1681565b60075481565b610e4a613691565b73ffffffffffffffffffffffffffffffffffffffff16610e68612a43565b73ffffffffffffffffffffffffffffffffffffffff1614610eea57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610ef26121d0565b610f5d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b610f65613915565b6040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b610f98613691565b73ffffffffffffffffffffffffffffffffffffffff16610fb6612a43565b73ffffffffffffffffffffffffffffffffffffffff161461103857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116919091179182905560405191169033907fca394f95d8dbf1e8b2e76b9a8da90cacce1da85181a65508dab13212dc1df53b90600090a350565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b6110d433613712565b1561114057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f776564000000000000000000000000604482015290519081900360640190fd5b3332146111ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f70726f787920636f6e7472616374206e6f7420616c6c6f776564000000000000604482015290519081900360640190fd5b6111b66121d0565b1561122257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b60055460048054604080517fe2bbb15800000000000000000000000000000000000000000000000000000000815292830191909152600060248301819052905173ffffffffffffffffffffffffffffffffffffffff9093169263e2bbb15892604480820193929182900301818387803b15801561129e57600080fd5b505af11580156112b2573d6000803e3d6000fd5b5050505060006112c0611ea6565b905060006112df612710610bfd600c548561371890919063ffffffff16565b6003549091506113069073ffffffffffffffffffffffffffffffffffffffff163383613883565b611310828261380c565b9150600082118015611340575060035460025473ffffffffffffffffffffffffffffffffffffffff908116911614155b15611e0757600354600a54604080517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201529051919092169163095ea7b39160448083019260209291908290030181600087803b1580156113e357600080fd5b505af11580156113f7573d6000803e3d6000fd5b505050506040513d602081101561140d57600080fd5b5050600254604080517f0dfe1681000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff909216916000918391630dfe168191600480820192602092909190829003018186803b15801561147f57600080fd5b505afa158015611493573d6000803e3d6000fd5b505050506040513d60208110156114a957600080fd5b5051604080517fd21220a7000000000000000000000000000000000000000000000000000000008152905191925060009173ffffffffffffffffffffffffffffffffffffffff85169163d21220a7916004808301926020929190829003018186803b15801561151757600080fd5b505afa15801561152b573d6000803e3d6000fd5b505050506040513d602081101561154157600080fd5b50519050600061155286600261378b565b90506000611560878361380c565b6040805160028082526060808301845293945090916020830190803683375050600354825192935073ffffffffffffffffffffffffffffffffffffffff16918391506000906115ab57fe5b73ffffffffffffffffffffffffffffffffffffffff92831660209182029290920101526003548682169116146117ed5784816001815181106115e957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c11d7958460008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b838110156116e45781810151838201526020016116cc565b505050509050019650505050505050600060405180830381600087803b15801561170d57600080fd5b505af1158015611721573d6000803e3d6000fd5b5050600a54604080517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201529051918916935063095ea7b392506044808201926020929091908290030181600087803b1580156117c057600080fd5b505af11580156117d4573d6000803e3d6000fd5b505050506040513d60208110156117ea57600080fd5b50505b60035473ffffffffffffffffffffffffffffffffffffffff858116911614611a2157838160018151811061181d57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c11d7958360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611918578181015183820152602001611900565b505050509050019650505050505050600060405180830381600087803b15801561194157600080fd5b505af1158015611955573d6000803e3d6000fd5b5050600a54604080517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff92831660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201529051918816935063095ea7b392506044808201926020929091908290030181600087803b1580156119f457600080fd5b505af1158015611a08573d6000803e3d6000fd5b505050506040513d6020811015611a1e57600080fd5b50505b600a54604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9283169263e8e3370092899289928416916370a08231916024808301926020929190829003018186803b158015611a9e57600080fd5b505afa158015611ab2573d6000803e3d6000fd5b505050506040513d6020811015611ac857600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8b16916370a08231916024808301926020929190829003018186803b158015611b3657600080fd5b505afa158015611b4a573d6000803e3d6000fd5b505050506040513d6020811015611b6057600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff95861660048201529390941660248401526044830191909152606482015260006084820181905260a482018190523060c48301524260e483015291516101048083019360609383900390910190829087803b158015611c0257600080fd5b505af1158015611c16573d6000803e3d6000fd5b505050506040513d6060811015611c2c57600080fd5b505060035473ffffffffffffffffffffffffffffffffffffffff868116911614611d1757604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8716916370a08231916024808301926020929190829003018186803b158015611cbc57600080fd5b505afa158015611cd0573d6000803e3d6000fd5b505050506040513d6020811015611ce657600080fd5b505192508215611d1757600954611d179073ffffffffffffffffffffffffffffffffffffffff878116911685613883565b60035473ffffffffffffffffffffffffffffffffffffffff858116911614611e0057604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8616916370a08231916024808301926020929190829003018186803b158015611da557600080fd5b505afa158015611db9573d6000803e3d6000fd5b505050506040513d6020811015611dcf57600080fd5b505191508115611e0057600954611e009073ffffffffffffffffffffffffffffffffffffffff868116911684613883565b5050505050505b611e0f61215f565b91506000611e2e612710610bfd600b548661371890919063ffffffff16565b600954600254919250611e5b9173ffffffffffffffffffffffffffffffffffffffff908116911683613883565b611e63613a03565b426008556040805182815260208101849052815133927f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae0660924954928290030190a2505050565b600354604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611f1757600080fd5b505afa158015611f2b573d6000803e3d6000fd5b505050506040513d6020811015611f4157600080fd5b5051905090565b60015474010000000000000000000000000000000000000000900460ff1615611fd257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015290519081900360640190fd5b60015473ffffffffffffffffffffffffffffffffffffffff16331461205857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f4e6f7420666163746f7279000000000000000000000000000000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556002805473ffffffffffffffffffffffffffffffffffffffff808c167fffffffffffffffffffffffff00000000000000000000000000000000000000009283168117909355600380548c831690841617905560048a9055600d899055600f88905560058054888316908416179055600a8054878316908416179055600980549185169190921617905561214b90857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff613aae565b612154826133b0565b505050505050505050565b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015611f1757600080fd5b60005474010000000000000000000000000000000000000000900460ff1690565b600d5481565b6121ff613691565b73ffffffffffffffffffffffffffffffffffffffff1661221d612a43565b73ffffffffffffffffffffffffffffffffffffffff161461229f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6101f48111156122fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806141ff6036913960400191505060405180910390fd5b600b55565b612307613691565b73ffffffffffffffffffffffffffffffffffffffff16612325612a43565b73ffffffffffffffffffffffffffffffffffffffff16146123a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60055460048054604080517f93f1a40b000000000000000000000000000000000000000000000000000000008152928301919091523060248301528051600093849373ffffffffffffffffffffffffffffffffffffffff909116926393f1a40b92604480840193829003018186803b15801561249157600080fd5b505afa1580156124a5573d6000803e3d6000fd5b505050506040513d60408110156124bb57600080fd5b5051600254604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051929350610a0392849273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b15801561253457600080fd5b505afa158015612548573d6000803e3d6000fd5b505050506040513d602081101561255e57600080fd5b505190613695565b60006007546000146125915761258c600754610bfd670de0b6b3a7640000610bf7612416565b61259b565b670de0b6b3a76400005b905090565b60055460048054604080517f48e43af40000000000000000000000000000000000000000000000000000000081529283019190915230602483015251600092839273ffffffffffffffffffffffffffffffffffffffff909116916348e43af491604480820192602092909190829003018186803b15801561262057600080fd5b505afa158015612634573d6000803e3d6000fd5b505050506040513d602081101561264a57600080fd5b505190506126596109fc611ea6565b90506000612678612710610bfd600c548561371890919063ffffffff16565b9250505090565b612687613691565b73ffffffffffffffffffffffffffffffffffffffff166126a5612a43565b73ffffffffffffffffffffffffffffffffffffffff161461272757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61272f6121d0565b1561279b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b6127a3613c3c565b6040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b6127d733613712565b1561284357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f776564000000000000000000000000604482015290519081900360640190fd5b3332146128b157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f70726f787920636f6e7472616374206e6f7420616c6c6f776564000000000000604482015290519081900360640190fd5b336000908152600660205260409020546128ca90610a15565b565b6128d4613691565b73ffffffffffffffffffffffffffffffffffffffff166128f2612a43565b73ffffffffffffffffffffffffffffffffffffffff161461297457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166129f657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f43616e6e6f74206265207a65726f206164647265737300000000000000000000604482015290519081900360640190fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600b5481565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b600c5481565b60085481565b612a73613691565b73ffffffffffffffffffffffffffffffffffffffff16612a91612a43565b73ffffffffffffffffffffffffffffffffffffffff1614612b1357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610190811115612b6e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806142bd6030913960400191505060405180910390fd5b600e55565b612b7b6121d0565b15612be757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b612bf033613712565b15612c5c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f776564000000000000000000000000604482015290519081900360640190fd5b333214612cca57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f70726f787920636f6e7472616374206e6f7420616c6c6f776564000000000000604482015290519081900360640190fd5b60008111612d3957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4e6f7468696e6720746f206465706f7369740000000000000000000000000000604482015290519081900360640190fd5b6000612d43612416565b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015612dba57600080fd5b505afa158015612dce573d6000803e3d6000fd5b505050506040513d6020811015612de457600080fd5b5051600254909150612e0e9073ffffffffffffffffffffffffffffffffffffffff16333086613d18565b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b158015612e7f57600080fd5b505afa158015612e93573d6000803e3d6000fd5b505050506040513d6020811015612ea957600080fd5b50519050612eb7818361380c565b600d5490945015612f1a576000612edf612710610bfd600d548861371890919063ffffffff16565b600954600254919250612f0c9173ffffffffffffffffffffffffffffffffffffffff908116911683613883565b612f16858261380c565b9450505b6000600754600014612f4657612f3f84610bfd6007548861371890919063ffffffff16565b9050612f49565b50835b3360009081526006602052604090208054612f649083613695565b8155426001820155600754612f799083613695565b6007819055612f9590610bfd612f8d612416565b845490613718565b6002820155426003820155612fa8613a03565b60408051878152602081018490524281830152905133917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e919081900360600190a2505050505050565b6101f481565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b61019081565b613022613691565b73ffffffffffffffffffffffffffffffffffffffff16613040612a43565b73ffffffffffffffffffffffffffffffffffffffff16146130c257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60055460048054604080517f5312ea8e000000000000000000000000000000000000000000000000000000008152928301919091525173ffffffffffffffffffffffffffffffffffffffff90921691635312ea8e9160248082019260009290919082900301818387803b15801561313857600080fd5b505af115801561314c573d6000803e3d6000fd5b50505050565b61315a613691565b73ffffffffffffffffffffffffffffffffffffffff16613178612a43565b73ffffffffffffffffffffffffffffffffffffffff16146131fa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60025473ffffffffffffffffffffffffffffffffffffffff8281169116141561326e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061418c6025913960400191505060405180910390fd5b60035473ffffffffffffffffffffffffffffffffffffffff828116911614156132e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806141146024913960400191505060405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561334b57600080fd5b505afa15801561335f573d6000803e3d6000fd5b505050506040513d602081101561337557600080fd5b5051905061339a73ffffffffffffffffffffffffffffffffffffffff83163383613883565b5050565b600f5481565b600e5481565b60045481565b6133b8613691565b73ffffffffffffffffffffffffffffffffffffffff166133d6612a43565b73ffffffffffffffffffffffffffffffffffffffff161461345857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff81166134c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806141386026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b613559613691565b73ffffffffffffffffffffffffffffffffffffffff16613577612a43565b73ffffffffffffffffffffffffffffffffffffffff16146135f957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610190811115613654576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e81526020018061415e602e913960400191505060405180910390fd5b600d55565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b3390565b60008282018381101561370957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b3b151590565b6000826137275750600061370c565b8282028284828161373457fe5b0414613709576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806142356021913960400191505060405180910390fd5b60008082116137fb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161380457fe5b049392505050565b60008282111561387d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052613910908490613da9565b505050565b61391d6121d0565b61398857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6139d9613691565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190a1565b6000613a0d61215f565b90508015613aab5760055460048054604080517fe2bbb15800000000000000000000000000000000000000000000000000000000815292830191909152602482018490525173ffffffffffffffffffffffffffffffffffffffff9092169163e2bbb1589160448082019260009290919082900301818387803b158015613a9257600080fd5b505af1158015613aa6573d6000803e3d6000fd5b505050505b50565b801580613b5a5750604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b158015613b2c57600080fd5b505afa158015613b40573d6000803e3d6000fd5b505050506040513d6020811015613b5657600080fd5b5051155b613baf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806142ed6036913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052613910908490613da9565b613c446121d0565b15613cb057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586139d9613691565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261314c9085905b6060613e0b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613e819092919063ffffffff16565b80519091501561391057808060200190516020811015613e2a57600080fd5b5051613910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180614293602a913960400191505060405180910390fd5b6060613e908484600085613e9a565b90505b9392505050565b606082471015613ef5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806141b16026913960400191505060405180910390fd5b613efe85613712565b613f6957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310613fd357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613f96565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614035576040519150601f19603f3d011682016040523d82523d6000602084013e61403a565b606091505b509150915061404a828286614055565b979650505050505050565b60608315614064575081613e93565b8251156140745782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156140d85781810151838201526020016140c0565b50505050905090810190601f1680156141055780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe546f6b656e2063616e6e6f742062652073616d652061732072657761726420746f6b656e4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736465706f7369744665652063616e6e6f74206265206d6f7265207468616e204d41585f4445504f5349545f464545546f6b656e2063616e6e6f742062652073616d65206173206465706f73697420746f6b656e416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c63616c6c4665652063616e6e6f74206265206d6f7265207468616e204d41585f43414c4c5f464545706572666f726d616e63654665652063616e6e6f74206265206d6f7265207468616e204d41585f504552464f524d414e43455f464545536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777769746864726177466565506572696f642063616e6e6f74206265206d6f7265207468616e204d41585f57495448445241575f4645455f504552494f445361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656477697468647261774665652063616e6e6f74206265206d6f7265207468616e204d41585f57495448445241575f4645455361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a264697066735822122039ccb34e9ef6de70b14998f9626e098e4843acd63aab2b13858ed5ba9d72f57e64736f6c634300060c00334f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220000496c019e7a85f0b3367f29f86f8019e115546531a00ef9fb0ca86fd1353b464736f6c634300060c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
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.