Contract 0x3ec8552ef28912fcC1cAd7068a1df73C83bd6b00

 
Txn Hash Method
Block
From
To
Value
0xd8d181d7ad1d761c9515e0b24a2fb4afebec77083c433de9a338b08d41c9969bCreate New Rover...127188872021-06-27 22:57:55120 days 20 hrs ago0x87ae65e97a8ae90f5dd9d61487fe60db087965b3 IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.03793328
0xaceb641661b10dc060eae3091ca5c6def6f05b3241c35c6df52a137bfac8a994Create New Rover...122846322021-04-21 16:29:12188 days 2 hrs ago0xe47b34100844f90c71026118cc78372b8e518f0d IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.23437694173
0x76df1f6e666fab9d40ff2d74f332f00bbbe5feadbea1f81cad8a6747689bd1caCreate New Rover...122844132021-04-21 15:39:03188 days 3 hrs ago0xe47b34100844f90c71026118cc78372b8e518f0d IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.23545555173.8
0x52bd9a5ecc04bf30a7bc73c1ca90583c536f530bdd5700bdc3e79d2342ecbe23Create New Rover...117321292021-01-26 15:29:39273 days 3 hrs agoENS Name route420.eth IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.10760480
0x68d3b0b185b4b66b7e7cbecf7b0f645554d2ef2cfb90a22a69d705af9d8ebe11Create New Rover...117101682021-01-23 6:21:08276 days 13 hrs agoENS Name anonkun.eth IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.091463468
0xe47b75384d8716cf5974f667b55d0e11569a9f515dc44644185d42b7a44432b5Create New Rover...116430502021-01-12 23:00:14286 days 20 hrs agoENS Name route420.eth IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.0565849084542.069
0x2e8c320f880b1da4e1ff4116c55cba87323763cb2fff6da7e91b24ba3895af23Create New Rover...116250412021-01-10 4:59:05289 days 14 hrs agoENS Name route420.eth IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.06109309908445.42069
0x2f0a1e2141f7fb5705579a977680442e51a504960d110590c1a4199213fa5693Create New Rover...115302102020-12-26 15:40:34304 days 3 hrs agoENS Name route420.eth IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.0928084569
0x82731d0fd62c2f7c285540115bdfcd8cf419e7700b82756762b5938bfccc3fd9Create New Rover...113888842020-12-04 22:35:35325 days 20 hrs agoENS Name route420.eth IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.0493555429936.6942069
0x6cab595c7da2f2a6dba70bbfa52d06c88c84fc3e9be56276c67ae243f9cd48a0Create New Rover...113775142020-12-03 4:44:29327 days 14 hrs agoBased.Money: Deployer IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.03766224000128.000000001
0x47e16af5bb70476018553d18207c137d8aa4b10fbdbd074910d010bb31dddb1bCreate New Rover...110551682020-10-14 17:25:55377 days 1 hr agoBased.Money: Deployer IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.121057290
0xb7e1df327e8389ba04540fa66942424a95af0f0a34369fa69fd09518ab704afdCreate New Rover...110499032020-10-13 22:06:37377 days 21 hrs agoBased.Money: Deployer IN  0x3ec8552ef28912fcc1cad7068a1df73c83bd6b000 Ether0.108806480
0xea7ea9c01f221871a88c6b60fec12f4c6ce64ade455563f48a92cabca87610390x61018060110498382020-10-13 21:52:09377 days 21 hrs agoBased.Money: Deployer IN  Create: BasedGod0 Ether0.4102905680
[ Download CSV Export 
Latest 12 internal transactions
Parent Txn Hash Block From To Value
0xd8d181d7ad1d761c9515e0b24a2fb4afebec77083c433de9a338b08d41c9969b127188872021-06-27 22:57:55120 days 20 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0xaceb641661b10dc060eae3091ca5c6def6f05b3241c35c6df52a137bfac8a994122846322021-04-21 16:29:12188 days 2 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x76df1f6e666fab9d40ff2d74f332f00bbbe5feadbea1f81cad8a6747689bd1ca122844132021-04-21 15:39:03188 days 3 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x52bd9a5ecc04bf30a7bc73c1ca90583c536f530bdd5700bdc3e79d2342ecbe23117321292021-01-26 15:29:39273 days 3 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x68d3b0b185b4b66b7e7cbecf7b0f645554d2ef2cfb90a22a69d705af9d8ebe11117101682021-01-23 6:21:08276 days 13 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0xe47b75384d8716cf5974f667b55d0e11569a9f515dc44644185d42b7a44432b5116430502021-01-12 23:00:14286 days 20 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x2e8c320f880b1da4e1ff4116c55cba87323763cb2fff6da7e91b24ba3895af23116250412021-01-10 4:59:05289 days 14 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x2f0a1e2141f7fb5705579a977680442e51a504960d110590c1a4199213fa5693115302102020-12-26 15:40:34304 days 3 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x82731d0fd62c2f7c285540115bdfcd8cf419e7700b82756762b5938bfccc3fd9113888842020-12-04 22:35:35325 days 20 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x6cab595c7da2f2a6dba70bbfa52d06c88c84fc3e9be56276c67ae243f9cd48a0113775142020-12-03 4:44:29327 days 14 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0x47e16af5bb70476018553d18207c137d8aa4b10fbdbd074910d010bb31dddb1b110551682020-10-14 17:25:55377 days 1 hr ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
0xb7e1df327e8389ba04540fa66942424a95af0f0a34369fa69fd09518ab704afd110499032020-10-13 22:06:37377 days 21 hrs ago 0x3ec8552ef28912fcc1cad7068a1df73c83bd6b00  Contract Creation0 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BasedGod

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-10-13
*/

pragma solidity >=0.6.0;

interface IPoolFactory {
    function createNewPool(
        address _rewardToken,
        address _rover,
        uint256 _duration,
        address _distributor
    ) external returns (address);
}



pragma solidity >=0.6.0;

interface IBasedGod {
    function getSellingSchedule() external view returns (uint256);
    function weth() external view returns (address);
    function susd() external view returns (address);
    function based() external view returns (address);
    function uniswapRouter() external view returns (address);
    function moonbase() external view returns (address);
    function deployer() external view returns (address);
    function getRovers() external view returns (address[] memory);
    function getTokenRovers(address token) external view returns (address[] memory);
}




pragma solidity ^0.6.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, 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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * 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);
        uint256 c = a - b;

        return c;
    }

    /**
     * @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) {
        // 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 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}




pragma solidity ^0.6.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);
}




pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}




pragma solidity ^0.6.0;




/**
 * @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");
        }
    }
}




pragma solidity ^0.6.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;
    }
}




pragma solidity ^0.6.0;

/**
 * @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.
 */
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 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;
    }
}



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



pragma solidity >=0.6.2;


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



pragma solidity >=0.6.0;

interface ISwapModule {
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function swapReward(uint256 amountIn, address receiver, address[] calldata path) external returns (uint256);
}



pragma solidity >=0.6.0;








contract Rover is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    uint256 public constant vestingTime = 365*24*60*60; // 1 year

    uint256 public roverStart;
    uint256 public latestBalance;
    uint256 public totalTokensReceived;
    uint256 public totalTokensWithdrawn;
    address[] public path;

    // prepare for v1.69 migration
    address public marsColony;
    bool public migrationCompleted;

    IBasedGod public basedGod;
    IERC20 public immutable based;
    IERC20 public immutable rewardToken;
    address public immutable swapModule;


    modifier updateBalance() {
        sync();
        _;
        latestBalance = rewardToken.balanceOf(address(this));
    }

    modifier onlyBasedDeployer() {
        require(msg.sender == basedGod.deployer(), "Not a deployer");
        _;
    }

    modifier onlyMarsColony() {
        require(msg.sender == marsColony, "Not a new moonbase");
        _;
    }

    /// @param _pair either "sUSD" or "WETH"
    constructor (
        address _rewardToken,
        string memory _pair,
        address _swapModule
    )
        public
    {
        basedGod = IBasedGod(msg.sender);
        // set immutables
        rewardToken = IERC20(_rewardToken);
        based = IERC20(basedGod.based());
        swapModule = _swapModule;

        address[] memory _path = new address[](3);
        _path[0] = _rewardToken;
        _path[2] = basedGod.based();

        if (keccak256(abi.encodePacked(_pair)) == keccak256(abi.encodePacked("WETH"))) {
            _path[1] = basedGod.weth();
        } else if (keccak256(abi.encodePacked(_pair)) == keccak256(abi.encodePacked("sUSD"))) {
            _path[1] = basedGod.susd();
        } else {
            revert("must use a CERTIFIED OFFICIAL $BASEDâ„¢ pair");
        }

        // ensure that the path exists
        uint[] memory amountsOut = ISwapModule(_swapModule).getAmountsOut(10**10, _path);
        require(amountsOut[amountsOut.length - 1] >= 1, "Path does not exist");

        path = _path;
    }

    function balance() public view returns (uint256) {
        return rewardToken.balanceOf(address(this));
    }

    function calculateReward() public view returns (uint256) {
        uint256 timeElapsed = block.timestamp.sub(roverStart);
        if (timeElapsed > vestingTime) timeElapsed = vestingTime;
        uint256 maxClaimable = totalTokensReceived.mul(timeElapsed).div(vestingTime);
        return maxClaimable.sub(totalTokensWithdrawn);
    }

    function rugPull() public virtual updateBalance {
        require(roverStart != 0, "Rover is not initialized");

        // Calculate how much reward can be swapped
        uint256 availableReward = calculateReward();

        // Record that the tokens are being withdrawn
        totalTokensWithdrawn = totalTokensWithdrawn.add(availableReward);
        // Swap for BASED
        (bool success, bytes memory result) = swapModule.delegatecall(
            abi.encodeWithSignature(
                "swapReward(uint256,address,address[])",
                availableReward,
                address(this),
                path
            )
        );
        require(success, "SwapModule: Swap failed");
        uint256 basedReward = abi.decode(result, (uint256));

        // Split the reward between the caller and the moonbase contract
        uint256 callerReward = basedReward.div(100);
        uint256 moonbaseReward = basedReward.sub(callerReward);

        // Reward the caller
        based.transfer(msg.sender, callerReward);
        // Send to MoonBase
        based.transfer(basedGod.moonbase(), moonbaseReward);
    }

    function setMarsColony(address _marsColony) public onlyBasedDeployer {
        marsColony = _marsColony;
    }

    // WARNING: Alpha leak!
    function migrateRoverBalanceToMarsColonyV1_69() external onlyMarsColony updateBalance {
        require(migrationCompleted == false, "Migration completed");

        IERC20 moonbase = IERC20(basedGod.moonbase());
        uint256 marsColonyShare = moonbase.balanceOf(msg.sender);
        uint256 totalSupply = moonbase.totalSupply();
        // withdraw amount is proportional to total supply share of mbBASED of msg.sender
        uint256 amountToMigrate =
            rewardToken.balanceOf(address(this)).mul(marsColonyShare).div(totalSupply);

        rewardToken.transfer(msg.sender, amountToMigrate);
        migrationCompleted = true;

        // update rewards
        totalTokensReceived = totalTokensReceived.sub(amountToMigrate);
    }

    function init() internal updateBalance {
        require(roverStart == 0, "Already initialized");
        roverStart = block.timestamp;
        renounceOwnership();
    }

    function sync() internal {
        uint256 currentBalance = rewardToken.balanceOf(address(this));
        if (currentBalance > latestBalance) {
            uint diff = currentBalance.sub(latestBalance);
            totalTokensReceived = totalTokensReceived.add(diff);
        }
    }
}



pragma solidity >=0.6.0;


contract RoverVault is Rover {
    constructor(address _rewardToken, string memory _pair, address _swapModule)
        public
        Rover(_rewardToken, _pair, _swapModule)
    {}

    function startRover() public onlyOwner {
        init();
    }
}




pragma solidity ^0.6.0;





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

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(sender, recipient, amount);

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

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

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

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

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

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

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

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

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

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

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




pragma solidity ^0.6.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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



pragma solidity >=0.6.0;

interface IPool {
    function getReward() external;
    function stake(uint256 amount) external;
    function earned(address account) external view returns (uint256);
}



pragma solidity >=0.6.0;





contract FarmingRover is Rover, ERC20, ReentrancyGuard {
    IPool public rewardPool;

    /// @param _pair either "sUSD" or "WETH"
    constructor (
        address _rewardToken,
        string memory _pair,
        address _swapModule
    )
        public
        Rover(_rewardToken, _pair, _swapModule)
        ERC20(
            string(abi.encodePacked("Rover ", ERC20(_rewardToken).name())),
            string(abi.encodePacked("r", ERC20(_rewardToken).symbol()))
        )
    {
        // Mint the single token
        _mint(address(this), 1);
    }

    function earned() public view returns (uint256){
        return rewardPool.earned(address(this));
    }

    function startRover(address _rewardPool)
        public
        onlyOwner
    {
        init();

        this.approve(_rewardPool, 1);
        rewardPool = IPool(_rewardPool);
        rewardPool.stake(1);
    }

    function rugPull() public override nonReentrant {
        claimReward();

        // this couses reentracy
        super.rugPull();
    }

    function claimReward() internal {
        // ignore errors
        (bool success,) = address(rewardPool).call(abi.encodeWithSignature("getReward()"));
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal override {
        require(balanceOf(address(this)) == 1, "NOT BASED: only one transfer allowed.");
        require(recipient == address(rewardPool),
            "NOT BASED: Recipient address must be equal to rewardPool address.");
        super._transfer(sender, recipient, amount);
    }
}



pragma solidity >=0.6.0;





contract BasedGod {
    address[] public rovers;
    // rewardToken => rover address array
    mapping(address => address[]) public tokenRover;
    address public immutable moonbase;
    address public immutable based;
    address public immutable susd;
    address public immutable weth;
    // mainnet 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
    address public immutable uniswapRouter;
    address public immutable poolFactory;
    address public immutable basedGodV1;
    address public immutable deployer;

    constructor (
        address _based,
        address _moonbase,
        address _susd,
        address _weth,
        address _uniswapRouter,
        address _poolFactory,
        address _basedGodV1
    ) public {
        susd = _susd;
        based = _based;
        moonbase = _moonbase;
        weth = _weth;
        uniswapRouter = _uniswapRouter;
        poolFactory = _poolFactory;
        basedGodV1 = _basedGodV1;
        deployer = msg.sender;
    }

    function getRovers() public view returns (address[] memory) {
        address[] memory legacyRovers = IBasedGod(basedGodV1).getRovers();
        return legacyRovers.length == 0 ? rovers : concatArrays(legacyRovers, rovers);
    }

    function getTokenRovers(address token) public view returns (address[] memory) {
        address[] memory legacyRovers = IBasedGod(basedGodV1).getTokenRovers(token);
        return legacyRovers.length == 0 ? tokenRover[token] : concatArrays(legacyRovers, tokenRover[token]);
    }

    /// @dev Use this Rover if you want to depoit tokens directly to Rover contract and you don't need to farm
    /// @param _rewardToken address of the reward token
    /// @param _pair through which pair do you want to sell reward tokens, either "sUSD" or "WETH"
    /// @param _swapModule contract address with swap implementation
    function createNewRoverVault(address _rewardToken, string calldata _pair, address _swapModule) external returns (RoverVault rover) {
        rover = new RoverVault(_rewardToken, _pair, _swapModule);
        rover.transferOwnership(msg.sender);
        _saveRover(_rewardToken, address(rover));
    }

    /// @dev Use this Rover if you have a reward pool and you want the Rover to farm it
    /// @param _rewardToken address of the reward token
    /// @param _pair either "sUSD" or "WETH"
    /// @param _swapModule contract address with swap implementation
    function createNewFarmingRover(address _rewardToken, string calldata _pair, address _swapModule) external returns (FarmingRover rover) {
        rover = new FarmingRover(_rewardToken, _pair, _swapModule);
        rover.transferOwnership(msg.sender);
        _saveRover(_rewardToken, address(rover));
    }

    /// @dev Use this if you want to deploy Farming Rover and Pool at once
    /// @param _distributor who can notify of rewards
    /// @param _swapModule contract address with swap implementation
    function createNewFarmingRoverAndPool(
        address _rewardToken,
        address _distributor,
        string calldata _pair,
        address _swapModule,
        uint256 _duration
    ) external returns (FarmingRover rover, address rewardsPool) {
        require(_distributor != address(0), "someone has to notify of rewards and it ain't us");

        rover = new FarmingRover(_rewardToken, _pair, _swapModule);
        _saveRover(_rewardToken, address(rover));

        rewardsPool = IPoolFactory(poolFactory).createNewPool(
            _rewardToken,
            address(rover),
            _duration,
            _distributor
        );

        rover.startRover(rewardsPool);
    }

    function _saveRover(address _rewardToken, address _rover) internal {
        rovers.push(address(_rover));
        tokenRover[_rewardToken].push(address(_rover));
    }

    function concatArrays(address[] memory arr1, address[] memory arr2) internal pure returns (address[] memory) {
        address[] memory resultArray = new address[](arr1.length + arr2.length);
        uint i=0;
        for (; i < arr1.length; i++) {
            resultArray[i] = arr1[i];
        }

        uint j=0;
        while (j < arr2.length) {
            resultArray[i++] = arr2[j++];
        }
        return resultArray;
    }
}




pragma solidity ^0.6.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}




pragma solidity >=0.6.6;




contract ERC20Migrator {
    using SafeMath for uint256;

    IERC20 public legacyToken;
    IERC20 public newToken;

    uint256 public totalMigrated;

    constructor (address _legacyToken, address _newToken) public {
        require(_legacyToken != address(0), "legacyToken address is required");
        require(_newToken != address(0), "_newToken address is required");

        legacyToken = IERC20(_legacyToken);
        newToken = IERC20(_newToken);
    }

    function migrate(address account, uint256 amount) internal {
        legacyToken.transferFrom(account, address(this), amount);
        newToken.transfer(account, amount);
        totalMigrated = totalMigrated.add(amount);
    }

    function migrateAll() public {
        address account = msg.sender;
        uint256 balance = legacyToken.balanceOf(account);
        uint256 allowance = legacyToken.allowance(account, address(this));
        uint256 amount = Math.min(balance, allowance);
        require(amount > 0, "ERC20Migrator::migrateAll: Approval and balance must be > 0");
        migrate(account, amount);
    }
}



/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

* Synthetix: CurveRewards.sol
*
* Docs: https://docs.synthetix.io/
*
*
* MIT License
* ===========
*
* Copyright (c) 2020 Synthetix
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/


pragma solidity ^0.6.0;







abstract contract IRewardDistributionRecipient is Ownable {
    address rewardDistribution;

    constructor(address _rewardDistribution) public {
        rewardDistribution = _rewardDistribution;
    }

    function notifyRewardAmount(uint256 reward) virtual external;

    modifier onlyRewardDistribution() {
        require(_msgSender() == rewardDistribution, "Caller is not reward distribution");
        _;
    }

    function setRewardDistribution(address _rewardDistribution)
        external
        onlyOwner
    {
        rewardDistribution = _rewardDistribution;
    }
}

/*
*   Changes made to the SynthetixReward contract
*
*   uni to lpToken, and make it as a parameter of the constructor instead of hardcoded.
*
*
*/

contract LPTokenWrapper {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IERC20 public immutable lpToken;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    constructor(address _lpToken) public {
        lpToken = IERC20(_lpToken);
    }

    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    function stake(uint256 amount) public virtual {
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        lpToken.safeTransferFrom(msg.sender, address(this), amount);
    }

    function withdraw(uint256 amount) public virtual {
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        lpToken.safeTransfer(msg.sender, amount);
    }
}

/*
*   [Hardwork]
*   This pool doesn't mint.
*   the rewards should be first transferred to this pool, then get "notified"
*   by calling `notifyRewardAmount`
*/

contract NoMintRewardPool is LPTokenWrapper, IRewardDistributionRecipient {
    IERC20 public immutable rewardToken;
    uint256 public immutable duration; // making it not a constant is less gas efficient, but portable

    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);

    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    // [Hardwork] setting the reward, lpToken, duration, and rewardDistribution for each pool
    constructor(address _rewardToken,
        address _lpToken,
        uint256 _duration,
        address _rewardDistribution) public
    LPTokenWrapper(_lpToken)
    IRewardDistributionRecipient(_rewardDistribution)
    {
        rewardToken = IERC20(_rewardToken);
        duration = _duration;
    }

    function lastTimeRewardApplicable() public view returns (uint256) {
        return Math.min(block.timestamp, periodFinish);
    }

    function rewardPerToken() public view returns (uint256) {
        if (totalSupply() == 0) {
            return rewardPerTokenStored;
        }
        return
            rewardPerTokenStored.add(
                lastTimeRewardApplicable()
                    .sub(lastUpdateTime)
                    .mul(rewardRate)
                    .mul(1e18)
                    .div(totalSupply())
            );
    }

    function earned(address account) public view returns (uint256) {
        return
            balanceOf(account)
                .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
                .div(1e18)
                .add(rewards[account]);
    }

    // stake visibility is public as overriding LPTokenWrapper's stake() function
    function stake(uint256 amount) public updateReward(msg.sender) override {
        require(amount > 0, "Cannot stake 0");
        super.stake(amount);
        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount) public updateReward(msg.sender) override {
        require(amount > 0, "Cannot withdraw 0");
        super.withdraw(amount);
        emit Withdrawn(msg.sender, amount);
    }

    function exit() external {
        withdraw(balanceOf(msg.sender));
        getReward();
    }

    function getReward() public updateReward(msg.sender) {
        uint256 reward = earned(msg.sender);
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function notifyRewardAmount(uint256 reward)
        external
        override
        onlyRewardDistribution
        updateReward(address(0))
    {
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(duration);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(duration);
        }
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(duration);
        emit RewardAdded(reward);
    }
}



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



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



pragma solidity >=0.4.0;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
    // range: [0, 2**112 - 1]
    // resolution: 1 / 2**112
    struct uq112x112 {
        uint224 _x;
    }

    // range: [0, 2**144 - 1]
    // resolution: 1 / 2**112
    struct uq144x112 {
        uint _x;
    }

    uint8 private constant RESOLUTION = 112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 x) internal pure returns (uq112x112 memory) {
        return uq112x112(uint224(x) << RESOLUTION);
    }

    // encodes a uint144 as a UQ144x112
    function encode144(uint144 x) internal pure returns (uq144x112 memory) {
        return uq144x112(uint256(x) << RESOLUTION);
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) {
        require(x != 0, 'FixedPoint: DIV_BY_ZERO');
        return uq112x112(self._x / uint224(x));
    }

    // multiply a UQ112x112 by a uint, returning a UQ144x112
    // reverts on overflow
    function mul(uq112x112 memory self, uint y) internal pure returns (uq144x112 memory) {
        uint z;
        require(y == 0 || (z = uint(self._x) * y) / y == uint(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW");
        return uq144x112(z);
    }

    // returns a UQ112x112 which represents the ratio of the numerator to the denominator
    // equivalent to encode(numerator).div(denominator)
    function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) {
        require(denominator > 0, "FixedPoint: DIV_BY_ZERO");
        return uq112x112((uint224(numerator) << RESOLUTION) / denominator);
    }

    // decode a UQ112x112 into a uint112 by truncating after the radix point
    function decode(uq112x112 memory self) internal pure returns (uint112) {
        return uint112(self._x >> RESOLUTION);
    }

    // decode a UQ144x112 into a uint144 by truncating after the radix point
    function decode144(uq144x112 memory self) internal pure returns (uint144) {
        return uint144(self._x >> RESOLUTION);
    }
}



pragma solidity >=0.5.0;



// library with helper methods for oracles that are concerned with computing average prices
library UniswapV2OracleLibrary {
    using FixedPoint for *;

    // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
    function currentBlockTimestamp() internal view returns (uint32) {
        return uint32(block.timestamp % 2 ** 32);
    }

    // produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
    function currentCumulativePrices(
        address pair
    ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) {
        blockTimestamp = currentBlockTimestamp();
        price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
        price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();

        // if time has elapsed since the last update on the pair, mock the accumulated price values
        (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IUniswapV2Pair(pair).getReserves();
        if (blockTimestampLast != blockTimestamp) {
            // subtraction overflow is desired
            uint32 timeElapsed = blockTimestamp - blockTimestampLast;
            // addition overflow is desired
            // counterfactual
            price0Cumulative += uint(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
            // counterfactual
            price1Cumulative += uint(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
        }
    }
}




pragma solidity >=0.5.0;



library UniswapV2Library {
    using SafeMath for uint;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(uint(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash
            ))));
    }

    // fetches and sorts the reserves for a pair
    function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
        (address token0,) = sortTokens(tokenA, tokenB);
        (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        amountB = amountA.mul(reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn.mul(997);
        uint numerator = amountInWithFee.mul(reserveOut);
        uint denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(997);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}




pragma solidity >=0.6.6;

// Some code reproduced from
// https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2Pair.sol






interface IOracle {
    function getData() external returns (uint256, bool);
}

// fixed window oracle that recomputes the average price for the entire period once every period
// note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period
contract ExampleOracleSimple {
    using FixedPoint for *;

    uint public PERIOD = 24 hours;

    IUniswapV2Pair immutable pair;
    address public immutable token0;
    address public immutable token1;

    uint    public price0CumulativeLast;
    uint    public price1CumulativeLast;
    uint32  public blockTimestampLast;
    FixedPoint.uq112x112 public price0Average;
    FixedPoint.uq112x112 public price1Average;

    constructor(address factory, address tokenA, address tokenB) public {
        IUniswapV2Pair _pair = IUniswapV2Pair(UniswapV2Library.pairFor(factory, tokenA, tokenB));
        pair = _pair;
        token0 = _pair.token0();
        token1 = _pair.token1();
        price0CumulativeLast = _pair.price0CumulativeLast(); // fetch the current accumulated price value (1 / 0)
        price1CumulativeLast = _pair.price1CumulativeLast(); // fetch the current accumulated price value (0 / 1)
        uint112 reserve0;
        uint112 reserve1;
        (reserve0, reserve1, blockTimestampLast) = _pair.getReserves();
        // ensure that there's liquidity in the pair
        require(reserve0 != 0 && reserve1 != 0, 'ExampleOracleSimple: NO_RESERVES');
    }

    function update() internal {
        (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) =
            UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired

        // ensure that at least one full period has passed since the last update
        require(timeElapsed >= PERIOD, 'ExampleOracleSimple: PERIOD_NOT_ELAPSED');

        // overflow is desired, casting never truncates
        // cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed
        price0Average = FixedPoint.uq112x112(uint224((price0Cumulative - price0CumulativeLast) / timeElapsed));
        price1Average = FixedPoint.uq112x112(uint224((price1Cumulative - price1CumulativeLast) / timeElapsed));

        price0CumulativeLast = price0Cumulative;
        price1CumulativeLast = price1Cumulative;
        blockTimestampLast = blockTimestamp;
    }

    // note this will always return 0 before update has been called successfully for the first time.
    function consult(address token, uint amountIn) internal view returns (uint amountOut) {
        if (token == token0) {
            amountOut = price0Average.mul(amountIn).decode144();
        } else {
            require(token == token1, 'ExampleOracleSimple: INVALID_TOKEN');
            amountOut = price1Average.mul(amountIn).decode144();
        }
    }
}

interface UFragmentsI {
    function monetaryPolicy() external view returns (address);
}


contract BASEDOracle is Ownable, ExampleOracleSimple, IOracle {

    uint256 constant SCALE = 10 ** 18;
    address based;
    address constant uniFactory = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;

    constructor(address based_, address susd_) public ExampleOracleSimple(uniFactory, based_, susd_) {
        PERIOD = 23 hours; // ensure that rebase can always call update
        based = based_;
    }

    // this must be called 24h before first rebase to get proper price
    function updateBeforeRebase() public onlyOwner {
        update();
    }

    function getData() override external returns (uint256, bool) {
        require(msg.sender == UFragmentsI(based).monetaryPolicy());
        update();
        uint256 price = consult(based, SCALE); // will return 1 BASED in sUSD

        if (price == 0) {
            return (0, false);
        }

        return (price, true);
    }
}



pragma solidity >=0.6.0;


contract PoolFactory {
    function createNewPool(
        address _rewardToken,
        address _rover,
        uint256 _duration,
        address _distributor
    ) external returns (address) {
        _distributor = (_distributor != address(0)) ? _distributor : msg.sender;

        NoMintRewardPool rewardsPool = new NoMintRewardPool(
            _rewardToken,
            _rover,
            _duration,
            _distributor  // who can notify of rewards
        );

        return address(rewardsPool);
    }
}



pragma solidity >=0.6.2;

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

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB
        );

    function removeLiquidityETH(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountToken,
            uint256 amountETH
        );

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint256 liquidity,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB
        );

    function removeLiquidityETHWithPermit(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        external
        returns (
            uint256 amountToken,
            uint256 amountETH
        );

    function swapExactTokensForTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external returns (uint256[] memory amounts);

    function swapTokensForExactTokens(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external returns (uint256[] memory amounts);

    function swapExactETHForTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external payable returns (uint256[] memory amounts);

    function swapTokensForExactETH(
        uint256 amountOut,
        uint256 amountInMax,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external returns (uint256[] memory amounts);

    function swapExactTokensForETH(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external returns (uint256[] memory amounts);

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external payable returns (uint256[] memory amounts);

    function quote(
        uint256 amountA,
        uint256 reserveA,
        uint256 reserveB
    ) external pure returns (uint256 amountB);

    function getAmountOut(
        uint256 amountIn,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountOut);

    function getAmountIn(
        uint256 amountOut,
        uint256 reserveIn,
        uint256 reserveOut
    ) external pure returns (uint256 amountIn);

    function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts);

    function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts);

    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    ) external returns (uint256 amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint256 liquidity,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline,
        bool approveMax,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external returns (uint256 amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline,
        bool ifmint
    ) external;
}



pragma solidity >=0.6.0;





contract SakeSwapModule {
    using SafeERC20 for IERC20;

    address public immutable sakeSwapRouter;
    address public immutable uniswapRouter;

    constructor (address _uniswapRouter, address _sakeSwapRouter) public {
        uniswapRouter = _uniswapRouter;
        sakeSwapRouter = _sakeSwapRouter;
    }

    function getPaths(address[] memory path) public pure returns (address[] memory, address[] memory) {
        address[] memory sakePath = new address[](2);
        address[] memory uniswapPath = new address[](2);
        sakePath[0] = path[0];
        sakePath[1] = path[1];
        uniswapPath[0] = path[1];
        uniswapPath[1] = path[2];
        return (sakePath, uniswapPath);
    }

    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint256[] memory) {
        (address[] memory sakePath, address[] memory uniswapPath) = getPaths(path);
        uint256[] memory amounts = new uint256[](2);
        uint256[] memory sakeAmounts = ISakeSwapRouter(sakeSwapRouter).getAmountsOut(amountIn, sakePath);
        amounts[0] = sakeAmounts[sakeAmounts.length - 1];
        uint256[] memory uniswapAmounts = IUniswapV2Router02(uniswapRouter).getAmountsOut(amounts[0], uniswapPath);
        amounts[1] = uniswapAmounts[uniswapAmounts.length - 1];
        return amounts;
    }

    function swapReward(uint256 amountIn, address receiver, address[] memory path) public returns (uint256){
        (address[] memory sakePath, address[] memory uniswapPath) = getPaths(path);

        IERC20(path[0]).safeApprove(sakeSwapRouter, 0);
        IERC20(path[0]).safeApprove(sakeSwapRouter, amountIn);
        uint256 amountOutMin = 1;
        uint256[] memory amounts =
            ISakeSwapRouter(sakeSwapRouter).swapExactTokensForTokens(
                amountIn,
                amountOutMin,
                sakePath,
                receiver,
                block.timestamp,
                false
            );
        amountIn = amounts[amounts.length - 1];

        IERC20(path[1]).safeApprove(uniswapRouter, 0);
        IERC20(path[1]).safeApprove(uniswapRouter, amountIn);
        amounts =
            IUniswapV2Router02(uniswapRouter).swapExactTokensForTokens(
                amountIn,
                amountOutMin,
                uniswapPath,
                receiver,
                block.timestamp
            );
        return amounts[amounts.length - 1];
    }
}



pragma solidity >=0.6.0;




contract UniswapModule {
    using SafeERC20 for IERC20;

    address public immutable uniswapRouter;

    constructor (address _uniswapRouter) public {
        uniswapRouter = _uniswapRouter;
    }
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory) {
        return IUniswapV2Router02(uniswapRouter).getAmountsOut(amountIn, path);
    }

    function swapReward(uint256 amountIn, address receiver, address[] memory path) public returns (uint256){
        // ensure we have no over-approval
        IERC20(path[0]).safeApprove(uniswapRouter, 0);
        IERC20(path[0]).safeApprove(uniswapRouter, amountIn);
        uint256 amountOutMin = 1;
        uint256[] memory amounts =
            IUniswapV2Router02(uniswapRouter).swapExactTokensForTokens(
                amountIn,
                amountOutMin,
                path,
                receiver,
                block.timestamp
            );
        return amounts[amounts.length - 1];
    }
}



pragma solidity >=0.6.0;

interface IMoonBase {
    function notifyRewardAmount(uint256 reward) external;
}



pragma solidity >=0.6.0;

interface IRover {
    function transferOwnership(address newOwner) external;
}



pragma solidity >=0.6.0;

interface IScheduleProvider {
    function getSchedule() external view returns (uint256);
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_based","type":"address"},{"internalType":"address","name":"_moonbase","type":"address"},{"internalType":"address","name":"_susd","type":"address"},{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_poolFactory","type":"address"},{"internalType":"address","name":"_basedGodV1","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"based","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basedGodV1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"string","name":"_pair","type":"string"},{"internalType":"address","name":"_swapModule","type":"address"}],"name":"createNewFarmingRover","outputs":[{"internalType":"contract FarmingRover","name":"rover","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_distributor","type":"address"},{"internalType":"string","name":"_pair","type":"string"},{"internalType":"address","name":"_swapModule","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"createNewFarmingRoverAndPool","outputs":[{"internalType":"contract FarmingRover","name":"rover","type":"address"},{"internalType":"address","name":"rewardsPool","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"string","name":"_pair","type":"string"},{"internalType":"address","name":"_swapModule","type":"address"}],"name":"createNewRoverVault","outputs":[{"internalType":"contract RoverVault","name":"rover","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRovers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenRovers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"moonbase","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rovers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"susd","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenRover","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

61018060405234801561001157600080fd5b50604051615d27380380615d27833981810160405260e081101561003457600080fd5b5080516020820151604083015160608085015160808087015160a08089015160c0998a01516001600160601b031997871b8816909a5297851b8616905294831b84169052811b821660e05291821b81166101005291811b82166101205291821b166101405233901b6101605260805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c6101405160601c6101605160601c615c0361012460003980610cb5525080610432528061090e5280610c6d52508061068452806107b05250806108e7525080610660525080610c9152508061089f5250806108c35250615c036000f3fe60806040523480156200001157600080fd5b50600436106200010c5760003560e01c8063735de9f711620000a5578063c8113531116200006f578063c811353114620003e0578063c925777514620003ea578063d5f3948814620003f4578063f3b557a214620003fe576200010c565b8063735de9f7146200029357806388feedd4146200029d578063ad5f2b3314620002c6578063bdc6fa901462000353576200010c565b80634219dc4011620000e75780634219dc4014620001b357806350423bb614620001bd5780635ab673b1146200027f5780636dc9f1881462000289576200010c565b80632957329214620001115780633e5796fc146200016d5780633fc8cef314620001a9575b600080fd5b6200011b6200042d565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015620001595781810151838201526020016200013f565b505050509050019250505060405180910390f35b6200018d600480360360208110156200018557600080fd5b503562000636565b604080516001600160a01b039092168252519081900360200190f35b6200018d6200065e565b6200018d62000682565b62000259600480360360a0811015620001d557600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156200020957600080fd5b8201836020820111156200021c57600080fd5b803590602001918460018302840111600160201b831117156200023e57600080fd5b91935091506001600160a01b038135169060200135620006a6565b604080516001600160a01b03938416815291909216602082015281519081900390910190f35b6200018d6200089d565b6200018d620008c1565b6200018d620008e5565b6200011b60048036036020811015620002b557600080fd5b50356001600160a01b031662000909565b6200018d60048036036060811015620002de57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156200030957600080fd5b8201836020820111156200031c57600080fd5b803590602001918460018302840111600160201b831117156200033e57600080fd5b9193509150356001600160a01b031662000b63565b6200018d600480360360608110156200036b57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156200039657600080fd5b820183602082011115620003a957600080fd5b803590602001918460018302840111600160201b83111715620003cb57600080fd5b9193509150356001600160a01b031662000c57565b6200018d62000c6b565b6200018d62000c8f565b6200018d62000cb3565b6200018d600480360360408110156200041657600080fd5b506001600160a01b03813516906020013562000cd7565b6060807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663295732926040518163ffffffff1660e01b815260040160006040518083038186803b1580156200048a57600080fd5b505afa1580156200049f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620004c957600080fd5b8101908080516040519392919084600160201b821115620004e957600080fd5b908301906020820185811115620004ff57600080fd5b82518660208202830111600160201b821117156200051c57600080fd5b82525081516020918201928201910280838360005b838110156200054b57818101518382015260200162000531565b5050505090500160405250505090508051600014620005d257620005cc816000805480602002602001604051908101604052809291908181526020018280548015620005c157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620005a2575b505050505062000d0d565b62000630565b60008054806020026020016040519081016040528092919081815260200182805480156200062a57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200060b575b50505050505b91505090565b600081815481106200064457fe5b6000918252602090912001546001600160a01b0316905081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806001600160a01b038716620006f05760405162461bcd60e51b815260040180806020018281038252603081526020018062005b9e6030913960400191505060405180910390fd5b87868686604051620007029062000e87565b6001600160a01b03808616825282166040820152606060208201818152908201849052608082018585808284376000838201819052604051601f909201601f19169093018190039850965090945050505050f08015801562000768573d6000803e3d6000fd5b50915062000777888362000e14565b60408051637edf489360e01b81526001600160a01b038a81166004830152848116602483015260448201869052898116606483015291517f000000000000000000000000000000000000000000000000000000000000000090921691637edf4893916084808201926020929091908290030181600087803b158015620007fc57600080fd5b505af115801562000811573d6000803e3d6000fd5b505050506040513d60208110156200082857600080fd5b505160408051634326f0db60e01b81526001600160a01b038084166004830152915192935090841691634326f0db9160248082019260009290919082900301818387803b1580156200087957600080fd5b505af11580156200088e573d6000803e3d6000fd5b50505050965096945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6060807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166388feedd4846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060006040518083038186803b1580156200098357600080fd5b505afa15801562000998573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620009c257600080fd5b8101908080516040519392919084600160201b821115620009e257600080fd5b908301906020820185811115620009f857600080fd5b82518660208202830111600160201b8211171562000a1557600080fd5b82525081516020918201928201910280838360005b8381101562000a4457818101518382015260200162000a2a565b505050509050016040525050509050805160001462000aec5762000ae68160016000866001600160a01b03166001600160a01b03168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015620005c1576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311620005a257505050505062000d0d565b62000b5c565b6001600160a01b0383166000908152600160209081526040918290208054835181840281018401909452808452909183018282801562000b5657602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000b37575b50505050505b9392505050565b60008484848460405162000b779062000e95565b6001600160a01b03808616825282166040820152606060208201818152908201849052608082018585808284376000838201819052604051601f909201601f19169093018190039850965090945050505050f08015801562000bdd573d6000803e3d6000fd5b506040805163f2fde38b60e01b815233600482015290519192506001600160a01b0383169163f2fde38b9160248082019260009290919082900301818387803b15801562000c2a57600080fd5b505af115801562000c3f573d6000803e3d6000fd5b5050505062000c4f858262000e14565b949350505050565b60008484848460405162000b779062000e87565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6001602052816000526040600020818154811062000cf157fe5b6000918252602090912001546001600160a01b03169150829050565b606080825184510167ffffffffffffffff8111801562000d2c57600080fd5b5060405190808252806020026020018201604052801562000d57578160200160208202803683370190505b50905060005b845181101562000daa5784818151811062000d7457fe5b602002602001015182828151811062000d8957fe5b6001600160a01b039092166020928302919091019091015260010162000d5d565b60005b845181101562000e0a57845160018201918691811062000dc957fe5b602002602001015183838060010194508151811062000de457fe5b60200260200101906001600160a01b031690816001600160a01b03168152505062000dad565b5090949350505050565b60008054600181810183557f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390910180546001600160a01b039485166001600160a01b03199182168117909255949093168252602081815260408320805492830181558352909120018054909216179055565b612fb18062000ea483390190565b611d498062003e558339019056fe60e06040523480156200001157600080fd5b5060405162002fb138038062002fb1833981810160405260608110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b5060405260200180519060200190929190505050826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156200013b57600080fd5b505afa15801562000150573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200017a57600080fd5b81019080805160405193929190846401000000008211156200019b57600080fd5b908301906020820185811115620001b157600080fd5b8251640100000000811182820188101715620001cc57600080fd5b82525081516020918201929091019080838360005b83811015620001fb578181015183820152602001620001e1565b50505050905090810190601f168015620002295780820380516001836020036101000a031916815260200191505b5060405250505060405160200180806502937bb32b9160d51b81525060060182805190602001908083835b60208310620002755780518252601f19909201916020918201910162000254565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620002e357600080fd5b505afa158015620002f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200032257600080fd5b81019080805160405193929190846401000000008211156200034357600080fd5b9083019060208201858111156200035957600080fd5b82516401000000008111828201881017156200037457600080fd5b82525081516020918201929091019080838360005b83811015620003a357818101518382015260200162000389565b50505050905090810190601f168015620003d15780820380516001836020036101000a031916815260200191505b506040525050506040516020018080603960f91b81525060010182805190602001908083835b60208310620004185780518252601f199092019160209182019101620003f7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405284848460006200046162000b1860201b60201c565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600780546001600160a01b0319163317908190556001600160601b0319606085901b1660a05260408051635ab673b160e01b815290516001600160a01b039290921691635ab673b191600480820192602092909190829003018186803b1580156200051557600080fd5b505afa1580156200052a573d6000803e3d6000fd5b505050506040513d60208110156200054157600080fd5b50516001600160601b0319606091821b8116608090815283831b90911660c0526040805160038082529281019091529060208201838036833701905050905083816000815181106200058f57fe5b6001600160a01b0392831660209182029290920181019190915260075460408051635ab673b160e01b815290519190931692635ab673b1926004808301939192829003018186803b158015620005e457600080fd5b505afa158015620005f9573d6000803e3d6000fd5b505050506040513d60208110156200061057600080fd5b50518151829060029081106200062257fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506040516020018080630ae8aa8960e31b815250600401905060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310620006a55780518252601f19909201916020918201910162000684565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014156200079a57600760009054906101000a90046001600160a01b03166001600160a01b0316633fc8cef36040518163ffffffff1660e01b815260040160206040518083038186803b1580156200073657600080fd5b505afa1580156200074b573d6000803e3d6000fd5b505050506040513d60208110156200076257600080fd5b50518151829060019081106200077457fe5b60200260200101906001600160a01b031690816001600160a01b031681525050620008c6565b6040516020018080631cd554d160e21b815250600401905060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310620007fd5780518252601f199092019160209182019101620007dc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014156200088e57600760009054906101000a90046001600160a01b03166001600160a01b031663c92577756040518163ffffffff1660e01b815260040160206040518083038186803b1580156200073657600080fd5b60405162461bcd60e51b815260040180806020018281038252602c81526020018062002f85602c913960400191505060405180910390fd5b6060826001600160a01b031663d06ca61f6402540be400846040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015620009355781810151838201526020016200091b565b50505050905001935050505060006040518083038186803b1580156200095a57600080fd5b505afa1580156200096f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200099957600080fd5b8101908080516040519392919084640100000000821115620009ba57600080fd5b908301906020820185811115620009d057600080fd5b8251866020820283011164010000000082111715620009ee57600080fd5b82525081516020918201928201910280838360005b8381101562000a1d57818101518382015260200162000a03565b50505050905001604052505050905060018160018351038151811062000a3f57fe5b6020026020010151101562000a9b576040805162461bcd60e51b815260206004820152601360248201527f5061746820646f6573206e6f7420657869737400000000000000000000000000604482015290519081900360640190fd5b815162000ab090600590602085019062000ca0565b5050855162000acc9450600b9350602087019250905062000d0a565b50805162000ae290600c90602084019062000d0a565b5050600d805460ff19166012179055506001600e81905562000b0f9030906001600160e01b0362000b1d16565b50505062000dcf565b335b90565b6001600160a01b03821662000b79576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b62000b90600083836001600160e01b0362000c3916565b62000bac81600a5462000c3e60201b62001c7d1790919060201c565b600a556001600160a01b03821660009081526008602090815260409091205462000be191839062001c7d62000c3e821b17901c565b6001600160a01b03831660008181526008602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b505050565b60008282018381101562000c99576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b82805482825590600052602060002090810192821562000cf8579160200282015b8281111562000cf857825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000cc1565b5062000d0692915062000d8b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1062000d4d57805160ff191683800117855562000d7d565b8280016001018555821562000d7d579182015b8281111562000d7d57825182559160200191906001019062000d60565b5062000d0692915062000db2565b62000b1a91905b8082111562000d065780546001600160a01b031916815560010162000d92565b62000b1a91905b8082111562000d06576000815560010162000db9565b60805160601c60a05160601c60c05160601c61214e62000e3760003980611305528061156d5250806109735280610a275280610ae752806110db52806112e152806119395280611ae45280611d56525080610d2252806117905280611822525061214e6000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c806383719cb21161011a578063af6d1fe4116100ad578063d6f192621161007c578063d6f19262146104ef578063dd62ed3e146104f7578063f2fde38b14610525578063f7c618c11461054b578063fa716b3f1461055357610206565b8063af6d1fe4146104ba578063b69ef8a8146104d7578063c7dab436146104df578063cac37f93146104e757610206565b806395d89b41116100e957806395d89b41146104525780639d38ac201461045a578063a457c2d714610462578063a9059cbb1461048e57610206565b806383719cb214610414578063861a4d321461041c5780638da5cb5b14610442578063932d73421461044a57610206565b80633185b0ae1161019d57806366666aa91161016c57806366666aa9146103ce57806370a08231146103d6578063715018a6146103fc5780637158638314610404578063725cedd31461040c57610206565b80633185b0ae1461035057806339509351146103585780634326f0db146103845780635ab673b1146103aa57610206565b80632190dfd0116101d95780632190dfd0146102ea57806323b872dd146102f4578063313ce5671461032a578063316779801461034857610206565b806306fdde031461020b578063095ea7b3146102885780630ff879fa146102c857806318160ddd146102e2575b600080fd5b61021361055b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561024d578181015183820152602001610235565b50505050905090810190601f16801561027a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102b46004803603604081101561029e57600080fd5b506001600160a01b0381351690602001356105f1565b604080519115158252519081900360200190f35b6102d061060f565b60408051918252519081900360200190f35b6102d0610615565b6102f261061b565b005b6102b46004803603606081101561030a57600080fd5b506001600160a01b0381358116916020810135909116906040013561068f565b61033261071c565b6040805160ff9092168252519081900360200190f35b6102b4610725565b6102f2610735565b6102b46004803603604081101561036e57600080fd5b506001600160a01b038135169060200135610b60565b6102f26004803603602081101561039a57600080fd5b50356001600160a01b0316610bb4565b6103b2610d20565b604080516001600160a01b039092168252519081900360200190f35b6103b2610d44565b6102d0600480360360208110156103ec57600080fd5b50356001600160a01b0316610d53565b6102f2610d6e565b6102d0610e22565b6102d0610e28565b6102d0610e92565b6102f26004803603602081101561043257600080fd5b50356001600160a01b0316610e98565b6103b2610f81565b6103b2610f90565b610213610f9f565b6103b2611000565b6102b46004803603604081101561047857600080fd5b506001600160a01b03813516906020013561100f565b6102b4600480360360408110156104a457600080fd5b506001600160a01b03813516906020013561107d565b6103b2600480360360208110156104d057600080fd5b5035611091565b6102d06110b8565b6102d0611153565b6102d061115b565b6102d0611161565b6102d06004803603604081101561050d57600080fd5b506001600160a01b03813581169160200135166111aa565b6102f26004803603602081101561053b57600080fd5b50356001600160a01b03166111d5565b6103b26112df565b6103b2611303565b600b8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105e75780601f106105bc576101008083540402835291602001916105e7565b820191906000526020600020905b8154815290600101906020018083116105ca57829003601f168201915b5050505050905090565b60006106056105fe611327565b848461132b565b5060015b92915050565b60025481565b600a5490565b6002600e541415610673576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600e55610680611417565b6106886114e5565b6001600e55565b600061069c848484611987565b610712846106a8611327565b61070d85604051806060016040528060288152602001612083602891396001600160a01b038a166000908152600960205260408120906106e6611327565b6001600160a01b03168152602081019190915260400160002054919063ffffffff611a2a16565b61132b565b5060019392505050565b600d5460ff1690565b600654600160a01b900460ff1681565b6006546001600160a01b03163314610789576040805162461bcd60e51b81526020600482015260126024820152714e6f742061206e6577206d6f6f6e6261736560701b604482015290519081900360640190fd5b610791611ac1565b600654600160a01b900460ff16156107e6576040805162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb8818dbdb5c1b195d1959606a1b604482015290519081900360640190fd5b60075460408051630db93e3160e31b815290516000926001600160a01b031691636dc9f188916004808301926020929190829003018186803b15801561082b57600080fd5b505afa15801561083f573d6000803e3d6000fd5b505050506040513d602081101561085557600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156108a357600080fd5b505afa1580156108b7573d6000803e3d6000fd5b505050506040513d60208110156108cd57600080fd5b5051604080516318160ddd60e01b815290519192506000916001600160a01b038516916318160ddd916004808301926020929190829003018186803b15801561091557600080fd5b505afa158015610929573d6000803e3d6000fd5b505050506040513d602081101561093f57600080fd5b5051604080516370a0823160e01b815230600482015290519192506000916109fd9184916109f19187916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156109b957600080fd5b505afa1580156109cd573d6000803e3d6000fd5b505050506040513d60208110156109e357600080fd5b50519063ffffffff611b9916565b9063ffffffff611bf916565b6040805163a9059cbb60e01b81523360048201526024810183905290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb916044808201926020929091908290030181600087803b158015610a7057600080fd5b505af1158015610a84573d6000803e3d6000fd5b505050506040513d6020811015610a9a57600080fd5b50506006805460ff60a01b1916600160a01b179055600354610ac2908263ffffffff611c3b16565b6003555050604080516370a0823160e01b815230600482015290516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001693506370a0823192506024808301926020929190829003018186803b158015610b2f57600080fd5b505afa158015610b43573d6000803e3d6000fd5b505050506040513d6020811015610b5957600080fd5b5051600255565b6000610605610b6d611327565b8461070d8560096000610b7e611327565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff611c7d16565b610bbc611327565b6000546001600160a01b03908116911614610c1e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610c26611cd7565b6040805163095ea7b360e01b81526001600160a01b0383166004820152600160248201529051309163095ea7b39160448083019260209291908290030181600087803b158015610c7557600080fd5b505af1158015610c89573d6000803e3d6000fd5b505050506040513d6020811015610c9f57600080fd5b5050600f80546001600160a01b0319166001600160a01b0383811691909117918290556040805163534a7e1d60e11b8152600160048201529051929091169163a694fc3a9160248082019260009290919082900301818387803b158015610d0557600080fd5b505af1158015610d19573d6000803e3d6000fd5b5050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f546001600160a01b031681565b6001600160a01b031660009081526008602052604090205490565b610d76611327565b6000546001600160a01b03908116911614610dd8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035481565b600080610e4060015442611c3b90919063ffffffff16565b90506301e13380811115610e5557506301e133805b6000610e746301e133806109f184600354611b9990919063ffffffff16565b9050610e8b60045482611c3b90919063ffffffff16565b9250505090565b60015481565b600760009054906101000a90046001600160a01b03166001600160a01b031663d5f394886040518163ffffffff1660e01b815260040160206040518083038186803b158015610ee657600080fd5b505afa158015610efa573d6000803e3d6000fd5b505050506040513d6020811015610f1057600080fd5b50516001600160a01b03163314610f5f576040805162461bcd60e51b815260206004820152600e60248201526d2737ba1030903232b83637bcb2b960911b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6006546001600160a01b031681565b600c8054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105e75780601f106105bc576101008083540402835291602001916105e7565b6007546001600160a01b031681565b600061060561101c611327565b8461070d856040518060600160405280602581526020016120f46025913960096000611046611327565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff611a2a16565b600061060561108a611327565b8484611987565b6005818154811061109e57fe5b6000918252602090912001546001600160a01b0316905081565b604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b15801561112257600080fd5b505afa158015611136573d6000803e3d6000fd5b505050506040513d602081101561114c57600080fd5b5051905090565b6301e1338081565b60045481565b600f54604080516246613160e11b815230600482015290516000926001600160a01b031691628cc262916024808301926020929190829003018186803b15801561112257600080fd5b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205490565b6111dd611327565b6000546001600160a01b0390811691161461123f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166112845760405162461bcd60e51b8152600401808060200182810382526026815260200180611fcf6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b3390565b6001600160a01b0383166113705760405162461bcd60e51b81526004018080602001828103825260248152602001806120d06024913960400191505060405180910390fd5b6001600160a01b0382166113b55760405162461bcd60e51b8152600401808060200182810382526022815260200180611ff56022913960400191505060405180910390fd5b6001600160a01b03808416600081815260096020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600f5460408051600481526024810182526020810180516001600160e01b0316631e8c5c8960e11b178152915181516000946001600160a01b03169382918083835b602083106114785780518252601f199092019160209182019101611459565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146114da576040519150601f19603f3d011682016040523d82523d6000602084013e6114df565b606091505b50505050565b6114ed611ac1565b600154611541576040805162461bcd60e51b815260206004820152601860248201527f526f766572206973206e6f7420696e697469616c697a65640000000000000000604482015290519081900360640190fd5b600061154b610e28565b600454909150611561908263ffffffff611c7d16565b600481905550600060607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168330600560405160240180848152602001836001600160a01b03166001600160a01b0316815260200180602001828103825283818154815260200191508054801561160957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115eb575b505060408051601f198184030181529181526020820180516001600160e01b03166334061b6760e11b178152905182519297509550859450925090508083835b602083106116685780518252601f199092019160209182019101611649565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146116c8576040519150601f19603f3d011682016040523d82523d6000602084013e6116cd565b606091505b509150915081611724576040805162461bcd60e51b815260206004820152601760248201527f537761704d6f64756c653a2053776170206661696c6564000000000000000000604482015290519081900360640190fd5b600081806020019051602081101561173b57600080fd5b50519050600061175282606463ffffffff611bf916565b90506000611766838363ffffffff611c3b16565b6040805163a9059cbb60e01b81523360048201526024810185905290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb916044808201926020929091908290030181600087803b1580156117d957600080fd5b505af11580156117ed573d6000803e3d6000fd5b505050506040513d602081101561180357600080fd5b505060075460408051630db93e3160e31b815290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169363a9059cbb93911691636dc9f18891600480820192602092909190829003018186803b15801561187357600080fd5b505afa158015611887573d6000803e3d6000fd5b505050506040513d602081101561189d57600080fd5b5051604080516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482018590525160448083019260209291908290030181600087803b1580156118ed57600080fd5b505af1158015611901573d6000803e3d6000fd5b505050506040513d602081101561191757600080fd5b5050604080516370a0823160e01b815230600482015290516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001697506370a0823196506024808301965060209550909350908390030190508186803b158015610b2f57600080fd5b61199030610d53565b6001146119ce5760405162461bcd60e51b81526004018080602001828103825260258152602001806120176025913960400191505060405180910390fd5b600f546001600160a01b03838116911614611a1a5760405162461bcd60e51b8152600401808060200182810382526041815260200180611f8e6041913960600191505060405180910390fd5b611a25838383611d9c565b505050565b60008184841115611ab95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611a7e578181015183820152602001611a66565b50505050905090810190601f168015611aab5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015611b2b57600080fd5b505afa158015611b3f573d6000803e3d6000fd5b505050506040513d6020811015611b5557600080fd5b5051600254909150811115611b96576000611b7b60025483611c3b90919063ffffffff16565b600354909150611b91908263ffffffff611c7d16565b600355505b50565b600082611ba857506000610609565b82820282848281611bb557fe5b0414611bf25760405162461bcd60e51b81526004018080602001828103825260218152602001806120626021913960400191505060405180910390fd5b9392505050565b6000611bf283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f05565b6000611bf283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a2a565b600082820183811015611bf2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b611cdf611ac1565b60015415611d2a576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b42600155611d36610d6e565b604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015610b2f57600080fd5b6001600160a01b038316611de15760405162461bcd60e51b81526004018080602001828103825260258152602001806120ab6025913960400191505060405180910390fd5b6001600160a01b038216611e265760405162461bcd60e51b8152600401808060200182810382526023815260200180611f6b6023913960400191505060405180910390fd5b611e31838383611a25565b611e748160405180606001604052806026815260200161203c602691396001600160a01b038616600090815260086020526040902054919063ffffffff611a2a16565b6001600160a01b038085166000908152600860205260408082209390935590841681522054611ea9908263ffffffff611c7d16565b6001600160a01b0380841660008181526008602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008183611f545760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611a7e578181015183820152602001611a66565b506000838581611f6057fe5b049594505050505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734e4f542042415345443a20526563697069656e742061646472657373206d75737420626520657175616c20746f20726577617264506f6f6c20616464726573732e4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f20616464726573734e4f542042415345443a206f6e6c79206f6e65207472616e7366657220616c6c6f7765642e45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212205db820c4a5d44c94c7f82fe5ac02ba3a1a2702ccf58fe2b1d783040d6be2feba64736f6c634300060600336d75737420757365206120434552544946494544204f4646494349414c20244241534544e284a2207061697260e06040523480156200001157600080fd5b5060405162001d4938038062001d49833981810160405260608110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b5060405260200151915083905082826000620001116001600160e01b036200076f16565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600780546001600160a01b0319163317908190556001600160601b0319606085901b1660a05260408051635ab673b160e01b815290516001600160a01b039290921691635ab673b191600480820192602092909190829003018186803b158015620001c557600080fd5b505afa158015620001da573d6000803e3d6000fd5b505050506040513d6020811015620001f157600080fd5b50516001600160601b0319606091821b8116608090815283831b90911660c0526040805160038082529281019091529060208201838036833701905050905083816000815181106200023f57fe5b6001600160a01b0392831660209182029290920181019190915260075460408051635ab673b160e01b815290519190931692635ab673b1926004808301939192829003018186803b1580156200029457600080fd5b505afa158015620002a9573d6000803e3d6000fd5b505050506040513d6020811015620002c057600080fd5b5051815182906002908110620002d257fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506040516020018080630ae8aa8960e31b815250600401905060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310620003555780518252601f19909201916020918201910162000334565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014156200044a57600760009054906101000a90046001600160a01b03166001600160a01b0316633fc8cef36040518163ffffffff1660e01b815260040160206040518083038186803b158015620003e657600080fd5b505afa158015620003fb573d6000803e3d6000fd5b505050506040513d60208110156200041257600080fd5b50518151829060019081106200042457fe5b60200260200101906001600160a01b031690816001600160a01b03168152505062000576565b6040516020018080631cd554d160e21b815250600401905060405160208183030381529060405280519060200120836040516020018082805190602001908083835b60208310620004ad5780518252601f1990920191602091820191016200048c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012014156200053e57600760009054906101000a90046001600160a01b03166001600160a01b031663c92577756040518163ffffffff1660e01b815260040160206040518083038186803b158015620003e657600080fd5b60405162461bcd60e51b815260040180806020018281038252602c81526020018062001d1d602c913960400191505060405180910390fd5b6060826001600160a01b031663d06ca61f6402540be400846040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019060200280838360005b83811015620005e5578181015183820152602001620005cb565b50505050905001935050505060006040518083038186803b1580156200060a57600080fd5b505afa1580156200061f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200064957600080fd5b81019080805160405193929190846401000000008211156200066a57600080fd5b9083019060208201858111156200068057600080fd5b82518660208202830111640100000000821117156200069e57600080fd5b82525081516020918201928201910280838360005b83811015620006cd578181015183820152602001620006b3565b505050509050016040525050509050600181600183510381518110620006ef57fe5b602002602001015110156200074b576040805162461bcd60e51b815260206004820152601360248201527f5061746820646f6573206e6f7420657869737400000000000000000000000000604482015290519081900360640190fd5b81516200076090600590602085019062000774565b50505050505050505062000805565b335b90565b828054828255906000526020600020908101928215620007cc579160200282015b82811115620007cc57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000795565b50620007da929150620007de565b5090565b6200077191905b80821115620007da5780546001600160a01b0319168155600101620007e5565b60805160601c60a05160601c60c05160601c6114b06200086d6000398061030752806110345250806106d352806109a05280610a545280610b145280610e0a5280611010528061107952806112f152508061052a52806105bc5280610b5e52506114b06000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638da5cb5b116100b8578063c7dab4361161007c578063c7dab4361461022b578063cac37f9314610233578063f031fd8c1461023b578063f2fde38b14610243578063f7c618c114610269578063fa716b3f1461027157610137565b80638da5cb5b146101ee578063932d7342146101f65780639d38ac20146101fe578063af6d1fe414610206578063b69ef8a81461022357610137565b8063715018a6116100ff578063715018a6146101a857806371586383146101b0578063725cedd3146101b857806383719cb2146101c0578063861a4d32146101c857610137565b80630ff879fa1461013c5780632190dfd01461015657806331677980146101605780633185b0ae1461017c5780635ab673b114610184575b600080fd5b610144610279565b60408051918252519081900360200190f35b61015e61027f565b005b610168610752565b604080519115158252519081900360200190f35b61015e610762565b61018c610b5c565b604080516001600160a01b039092168252519081900360200190f35b61015e610b80565b610144610c34565b610144610c3a565b610144610ca4565b61015e600480360360208110156101de57600080fd5b50356001600160a01b0316610caa565b61018c610d93565b61018c610da2565b61018c610db1565b61018c6004803603602081101561021c57600080fd5b5035610dc0565b610144610de7565b610144610e82565b610144610e8a565b61015e610e90565b61015e6004803603602081101561025957600080fd5b50356001600160a01b0316610f04565b61018c61100e565b61018c611032565b60025481565b610287611056565b6001546102db576040805162461bcd60e51b815260206004820152601860248201527f526f766572206973206e6f7420696e697469616c697a65640000000000000000604482015290519081900360640190fd5b60006102e5610c3a565b6004549091506102fb908263ffffffff61112e16565b600481905550600060607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168330600560405160240180848152602001836001600160a01b03166001600160a01b031681526020018060200182810382528381815481526020019150805480156103a357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610385575b505060408051601f198184030181529181526020820180516001600160e01b03166334061b6760e11b178152905182519297509550859450925090508083835b602083106104025780518252601f1990920191602091820191016103e3565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610462576040519150601f19603f3d011682016040523d82523d6000602084013e610467565b606091505b5091509150816104be576040805162461bcd60e51b815260206004820152601760248201527f537761704d6f64756c653a2053776170206661696c6564000000000000000000604482015290519081900360640190fd5b60008180602001905160208110156104d557600080fd5b5051905060006104ec82606463ffffffff61119116565b90506000610500838363ffffffff6111d316565b6040805163a9059cbb60e01b81523360048201526024810185905290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb916044808201926020929091908290030181600087803b15801561057357600080fd5b505af1158015610587573d6000803e3d6000fd5b505050506040513d602081101561059d57600080fd5b505060075460408051630db93e3160e31b815290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169363a9059cbb93911691636dc9f18891600480820192602092909190829003018186803b15801561060d57600080fd5b505afa158015610621573d6000803e3d6000fd5b505050506040513d602081101561063757600080fd5b5051604080516001600160e01b031960e085901b1681526001600160a01b039092166004830152602482018590525160448083019260209291908290030181600087803b15801561068757600080fd5b505af115801561069b573d6000803e3d6000fd5b505050506040513d60208110156106b157600080fd5b5050604080516370a0823160e01b815230600482015290516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001697506370a0823196506024808301965060209550909350908390030190508186803b15801561072157600080fd5b505afa158015610735573d6000803e3d6000fd5b505050506040513d602081101561074b57600080fd5b5051600255565b600654600160a01b900460ff1681565b6006546001600160a01b031633146107b6576040805162461bcd60e51b81526020600482015260126024820152714e6f742061206e6577206d6f6f6e6261736560701b604482015290519081900360640190fd5b6107be611056565b600654600160a01b900460ff1615610813576040805162461bcd60e51b8152602060048201526013602482015272135a59dc985d1a5bdb8818dbdb5c1b195d1959606a1b604482015290519081900360640190fd5b60075460408051630db93e3160e31b815290516000926001600160a01b031691636dc9f188916004808301926020929190829003018186803b15801561085857600080fd5b505afa15801561086c573d6000803e3d6000fd5b505050506040513d602081101561088257600080fd5b5051604080516370a0823160e01b815233600482015290519192506000916001600160a01b038416916370a08231916024808301926020929190829003018186803b1580156108d057600080fd5b505afa1580156108e4573d6000803e3d6000fd5b505050506040513d60208110156108fa57600080fd5b5051604080516318160ddd60e01b815290519192506000916001600160a01b038516916318160ddd916004808301926020929190829003018186803b15801561094257600080fd5b505afa158015610956573d6000803e3d6000fd5b505050506040513d602081101561096c57600080fd5b5051604080516370a0823160e01b81523060048201529051919250600091610a2a918491610a1e9187916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156109e657600080fd5b505afa1580156109fa573d6000803e3d6000fd5b505050506040513d6020811015610a1057600080fd5b50519063ffffffff61121516565b9063ffffffff61119116565b6040805163a9059cbb60e01b81523360048201526024810183905290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163a9059cbb916044808201926020929091908290030181600087803b158015610a9d57600080fd5b505af1158015610ab1573d6000803e3d6000fd5b505050506040513d6020811015610ac757600080fd5b50506006805460ff60a01b1916600160a01b179055600354610aef908263ffffffff6111d316565b6003555050604080516370a0823160e01b815230600482015290516001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001693506370a0823192506024808301926020929190829003018186803b15801561072157600080fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b610b8861126e565b6000546001600160a01b03908116911614610bea576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035481565b600080610c52600154426111d390919063ffffffff16565b90506301e13380811115610c6757506301e133805b6000610c866301e13380610a1e8460035461121590919063ffffffff16565b9050610c9d600454826111d390919063ffffffff16565b9250505090565b60015481565b600760009054906101000a90046001600160a01b03166001600160a01b031663d5f394886040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b50516001600160a01b03163314610d71576040805162461bcd60e51b815260206004820152600e60248201526d2737ba1030903232b83637bcb2b960911b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b6006546001600160a01b031681565b6007546001600160a01b031681565b60058181548110610dcd57fe5b6000918252602090912001546001600160a01b0316905081565b604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015610e5157600080fd5b505afa158015610e65573d6000803e3d6000fd5b505050506040513d6020811015610e7b57600080fd5b5051905090565b6301e1338081565b60045481565b610e9861126e565b6000546001600160a01b03908116911614610efa576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610f02611272565b565b610f0c61126e565b6000546001600160a01b03908116911614610f6e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610fb35760405162461bcd60e51b81526004018080602001828103825260268152602001806114346026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b604080516370a0823160e01b815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b1580156110c057600080fd5b505afa1580156110d4573d6000803e3d6000fd5b505050506040513d60208110156110ea57600080fd5b505160025490915081111561112b576000611110600254836111d390919063ffffffff16565b600354909150611126908263ffffffff61112e16565b600355505b50565b600082820183811015611188576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b600061118883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611337565b600061118883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113d9565b6000826112245750600061118b565b8282028284828161123157fe5b04146111885760405162461bcd60e51b815260040180806020018281038252602181526020018061145a6021913960400191505060405180910390fd5b3390565b61127a611056565b600154156112c5576040805162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b604482015290519081900360640190fd5b426001556112d1610b80565b604080516370a0823160e01b815230600482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b15801561072157600080fd5b600081836113c35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611388578181015183820152602001611370565b50505050905090810190601f1680156113b55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816113cf57fe5b0495945050505050565b6000818484111561142b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611388578181015183820152602001611370565b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212202aa2f29a50e93cfd4ca632af0cc995de93accc21e121df0cfab9b7bc372d8c2d64736f6c634300060600336d75737420757365206120434552544946494544204f4646494349414c20244241534544e284a22070616972736f6d656f6e652068617320746f206e6f74696679206f66207265776172647320616e642069742061696e2774207573a2646970667358221220fef822b58774b5e484e7d1aa6a6af052a21681e43a79d77dfdf31bd81050482464736f6c6343000606003300000000000000000000000068a118ef45063051eac49c7e647ce5ace48a68a500000000000000000000000026cf82e4ae43d31ea51e72b663d26e26a75af72900000000000000000000000057ab1ec28d129707052df4df418d58a2d46d5f51000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000aaf3cc7f2a2a49a11a8e91e6ce69bdaf206297c20000000000000000000000008c879436d018c044f009f9e96f0db3deb895ced4

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

00000000000000000000000068a118ef45063051eac49c7e647ce5ace48a68a500000000000000000000000026cf82e4ae43d31ea51e72b663d26e26a75af72900000000000000000000000057ab1ec28d129707052df4df418d58a2d46d5f51000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000aaf3cc7f2a2a49a11a8e91e6ce69bdaf206297c20000000000000000000000008c879436d018c044f009f9e96f0db3deb895ced4

-----Decoded View---------------
Arg [0] : _based (address): 0x68a118ef45063051eac49c7e647ce5ace48a68a5
Arg [1] : _moonbase (address): 0x26cf82e4ae43d31ea51e72b663d26e26a75af729
Arg [2] : _susd (address): 0x57ab1ec28d129707052df4df418d58a2d46d5f51
Arg [3] : _weth (address): 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [4] : _uniswapRouter (address): 0x7a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [5] : _poolFactory (address): 0xaaf3cc7f2a2a49a11a8e91e6ce69bdaf206297c2
Arg [6] : _basedGodV1 (address): 0x8c879436d018c044f009f9e96f0db3deb895ced4

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000068a118ef45063051eac49c7e647ce5ace48a68a5
Arg [1] : 00000000000000000000000026cf82e4ae43d31ea51e72b663d26e26a75af729
Arg [2] : 00000000000000000000000057ab1ec28d129707052df4df418d58a2d46d5f51
Arg [3] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [4] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [5] : 000000000000000000000000aaf3cc7f2a2a49a11a8e91e6ce69bdaf206297c2
Arg [6] : 0000000000000000000000008c879436d018c044f009f9e96f0db3deb895ced4


Deployed ByteCode Sourcemap

48192:4324:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;48192:4324:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;49209:232:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;49209:232:0;;;;;;;;;;;;;;;;;48217:23;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;48217:23:0;;:::i;:::-;;;;-1:-1:-1;;;;;48217:23:0;;;;;;;;;;;;;;48457:29;;;:::i;48597:36::-;;;:::i;51169:710::-;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;-1:-1;;;;;51169:710:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11:28;;8:2;;;52:1;49;42:12;8:2;51169:710:0;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;51169:710:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;51169:710:0;;-1:-1:-1;51169:710:0;-1:-1:-1;;;;;;51169:710:0;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;51169:710:0;;;;;;;;;;;;;;;;;;;;;;;;48384:30;;;:::i;48344:33::-;;;:::i;48552:38::-;;;:::i;49449:282::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;49449:282:0;-1:-1:-1;;;;;49449:282:0;;:::i;50078:303::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;50078:303:0;;;;;;;;;;;;;;;-1:-1:-1;;;11:28;;8:2;;;52:1;49;42:12;8:2;50078:303:0;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;50078:303:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;50078:303:0;;-1:-1:-1;50078:303:0;-1:-1:-1;50078:303:0;-1:-1:-1;;;;;50078:303:0;;:::i;50651:309::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;50651:309:0;;;;;;;;;;;;;;;-1:-1:-1;;;11:28;;8:2;;;52:1;49;42:12;8:2;50651:309:0;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;50651:309:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;50651:309:0;;-1:-1:-1;50651:309:0;-1:-1:-1;50651:309:0;-1:-1:-1;;;;;50651:309:0;;:::i;48640:35::-;;;:::i;48421:29::-;;;:::i;48682:33::-;;;:::i;48290:47::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;48290:47:0;;;;;;;;:::i;49209:232::-;49251:16;49280:29;49322:10;-1:-1:-1;;;;;49312:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;49312:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;49312:33:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;49312:33:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;15:2;7:11;;4:2;;;31:1;28;21:12;4:2;49312:33:0;;;;;;;;;;;;;-1:-1:-1;;;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;219:3;213:10;331:9;325:2;311:12;307:21;289:16;285:44;282:59;-1:-1;;;247:12;244:29;233:116;230:2;;;362:1;359;352:12;230:2;373:25;;-1:-1;49312:33:0;;421:4:-1;412:14;;;;49312:33:0;;;;;412:14:-1;49312:33:0;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;49312:33:0;;;;;;;;;;;49280:65;;49363:12;:19;49386:1;49363:24;:70;;49399:34;49412:12;49426:6;49399:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;49399:34:0;;;;;;;;;;;;;;;;;;;;;:12;:34::i;:::-;49363:70;;;49390:6;49363:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;49363:70:0;;;;;;;;;;;;;;;;;;;;;;49356:77;;;49209:232;:::o;48217:23::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;48217:23:0;;-1:-1:-1;48217:23:0;:::o;48457:29::-;;;:::o;48597:36::-;;;:::o;51169:710::-;51384:18;;-1:-1:-1;;;;;51444:26:0;;51436:87;;;;-1:-1:-1;;;51436:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51561:12;51575:5;;51582:11;51544:50;;;;;:::i;:::-;-1:-1:-1;;;;;51544:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1:33:-1;99:1;81:16;;;74:27;;;51544:50:0;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;51544:50:0;;;;-1:-1:-1;51544:50:0;-1:-1:-1;99:1;;-1:-1;;;;;51544:50:0;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51544:50:0;51536:58;;51605:40;51616:12;51638:5;51605:10;:40::i;:::-;51672:157;;;-1:-1:-1;;;51672:157:0;;-1:-1:-1;;;;;51672:157:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51685:11;51672:39;;;;;;:157;;;;;;;;;;;;;;;-1:-1:-1;51672:39:0;:157;;;2:2:-1;;;;27:1;24;17:12;2:2;51672:157:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51672:157:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;51672:157:0;51842:29;;;-1:-1:-1;;;51842:29:0;;-1:-1:-1;;;;;51842:29:0;;;;;;;;;51672:157;;-1:-1:-1;51842:16:0;;;;;;:29;;;;;-1:-1:-1;;51842:29:0;;;;;;;;-1:-1:-1;51842:16:0;:29;;;2:2:-1;;;;27:1;24;17:12;2:2;51842:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;51842:29:0;;;;51169:710;;;;;;;;;:::o;48384:30::-;;;:::o;48344:33::-;;;:::o;48552:38::-;;;:::o;49449:282::-;49509:16;49538:29;49580:10;-1:-1:-1;;;;;49570:36:0;;49607:5;49570:43;;;;;;;;;;;;;-1:-1:-1;;;;;49570:43:0;-1:-1:-1;;;;;49570:43:0;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;49570:43:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;49570:43:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;49570:43:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;15:2;7:11;;4:2;;;31:1;28;21:12;4:2;49570:43:0;;;;;;;;;;;;;-1:-1:-1;;;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;219:3;213:10;331:9;325:2;311:12;307:21;289:16;285:44;282:59;-1:-1;;;247:12;244:29;233:116;230:2;;;362:1;359;352:12;230:2;373:25;;-1:-1;49570:43:0;;421:4:-1;412:14;;;;49570:43:0;;;;;412:14:-1;49570:43:0;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;49570:43:0;;;;;;;;;;;49538:75;;49631:12;:19;49654:1;49631:24;:92;;49678:45;49691:12;49705:10;:17;49716:5;-1:-1:-1;;;;;49705:17:0;-1:-1:-1;;;;;49705:17:0;;;;;;;;;;;;49678:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;49678:45:0;;;;;;;;;;;;;;;;;;;;:12;:45::i;:::-;49631:92;;;-1:-1:-1;;;;;49658:17:0;;;;;;:10;:17;;;;;;;;;49631:92;;;;;;;;;;;;;;;;;49658:17;;49631:92;;49658:17;49631:92;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;49631:92:0;;;;;;;;;;;;;;;;;;;;;;49624:99;49449:282;-1:-1:-1;;;49449:282:0:o;50078:303::-;50191:16;50243:12;50257:5;;50264:11;50228:48;;;;;:::i;:::-;-1:-1:-1;;;;;50228:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1:33:-1;99:1;81:16;;;74:27;;;50228:48:0;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;50228:48:0;;;;-1:-1:-1;50228:48:0;-1:-1:-1;99:1;;-1:-1;;;;;50228:48:0;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;50287:35:0;;;-1:-1:-1;;;50287:35:0;;50311:10;50287:35;;;;;;50220:56;;-1:-1:-1;;;;;;50287:23:0;;;;;:35;;;;;-1:-1:-1;;50287:35:0;;;;;;;;-1:-1:-1;50287:23:0;:35;;;2:2:-1;;;;27:1;24;17:12;2:2;50287:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;50287:35:0;;;;50333:40;50344:12;50366:5;50333:10;:40::i;:::-;50078:303;;;;;;:::o;50651:309::-;50766:18;50822:12;50836:5;;50843:11;50805:50;;;;;:::i;48640:35::-;;;:::o;48421:29::-;;;:::o;48682:33::-;;;:::o;48290:47::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;48290:47:0;;-1:-1:-1;48290:47:0;;-1:-1:-1;48290:47:0:o;52066:447::-;52157:16;52186:28;52245:4;:11;52231:4;:11;:25;52217:40;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;52217:40:0;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;125:4;109:14;101:6;88:42;144:17;;-1:-1;52217:40:0;-1:-1:-1;52186:71:0;-1:-1:-1;52268:6:0;52287:80;52298:4;:11;52294:1;:15;52287:80;;;52348:4;52353:1;52348:7;;;;;;;;;;;;;;52331:11;52343:1;52331:14;;;;;;;;-1:-1:-1;;;;;52331:24:0;;;:14;;;;;;;;;;;:24;52311:3;;52287:80;;;52379:6;52398:79;52409:4;:11;52405:1;:15;52398:79;;;52456:9;;52461:3;;;;52456:4;;:9;;;;;;;;;;;;52437:11;52449:3;;;;;;52437:16;;;;;;;;;;;;;:28;-1:-1:-1;;;;;52437:28:0;;;-1:-1:-1;;;;;52437:28:0;;;;;52398:79;;;-1:-1:-1;52494:11:0;;52066:447;-1:-1:-1;;;;52066:447:0:o;51887:171::-;51965:6;27:10:-1;;39:1;23:18;;;45:23;;51965:28:0;;;;;;-1:-1:-1;;;;;51965:28:0;;;-1:-1:-1;;;;;;51965:28:0;;;;;;;;52004:24;;;;;;51965:28;52004:24;;;;;;27:10:-1;;23:18;;;45:23;;52004:46:0;;;;;;;;;;;;;;51887:171::o;48192:4324::-;;;;;;;;:::o;:::-;;;;;;;;:::o

Swarm Source

ipfs://fef822b58774b5e484e7d1aa6a6af052a21681e43a79d77dfdf31bd810504824
Block Transaction Difficulty Gas Used Reward
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.