Contract 0x58Fde5bdB2C6Bd828Bc41c12a68189C7cd93dCE2 1

Contract Overview

Impermax: TraderJoe V3 Staked LP Factory
Balance:
0 AVAX

AVAX Value:
$0.00
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x61fc9d2f28b594d1a89a583a11cfcf600cf34c64b1cf6a8ffd5c98c585d80ce9Create Staked LP...110458272022-02-17 17:18:16293 days 5 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.15033968 40
0xd5160aee77a365ea2de6f13c9f29934723a3c6d4408e73f833502495d43e6fccCreate Staked LP...110430252022-02-17 15:40:01293 days 7 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.378441715807 100.689775529
0x17758ff51f2d0dbe937bc686c88804076a767da34f2c1866c216b9b28998e17aCreate Staked LP...98782512022-01-21 21:14:39320 days 2 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.13154722 35
0x57147835dafe68a8c541e1cb48fbf534a77d49c91da188775e9e95be17f25366Create Staked LP...84043362021-12-18 15:18:42354 days 7 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.0939623 25
0xf375b09a18cc9c31ebc334b368c33e83335276c36ba673bd3b384d81d2f5b5b7Create Staked LP...67379362021-11-09 20:49:15393 days 2 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.12494830169933.244264375
0x99387a9dc3914bbc011f6aa3d9e7ce9229454b4f0dbd1fea89a6abb0caa18fa9Create Staked LP...67379042021-11-09 20:48:14393 days 2 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.11668583305231.045917632
0x79a86c12066a0d07b948193e36f4c19beb814edf86f7234007368f6cc2b07d67Create Staked LP...63460892021-10-31 14:11:43402 days 9 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.093962325
0xe65f8e4b3254402de956f71cf465e09da5c8ff011363bb9b0bbb442f66bf23d4Create Staked LP...61932932021-10-28 0:07:47405 days 23 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.093962325
0x9e3a87892fdd998f5451462e894c7816c26adb1a614cab3819c0c3b644486122Create Staked LP...61932852021-10-28 0:07:30405 days 23 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.093962325
0xd9489d68bc10dcb48ac92f1ccbdd8af37b7e44e825668af8903cbf88a8750f9eCreate Staked LP...61931592021-10-28 0:03:17405 days 23 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.093962325
0x92993f24897b7f2967a60e5868d4126bbc31cf0749d446f7a18723fc02b5f45eCreate Staked LP...61921242021-10-27 23:28:27405 days 23 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Impermax: TraderJoe V3 Staked LP Factory0 AVAX0.09389225
0x022581831e9d24349c4fda15a4718e567ec56e4474cac33afc46301950a7c08f0x6080604061921062021-10-27 23:27:48405 days 23 hrs ago0x9fc5341db9a9cdf8337b4bd286d4cfc03b20ad35 IN  Create: StakedLPTokenFactory0230 AVAX0.09942872525
[ Download CSV Export 
Latest 11 internal transactions
Parent Txn Hash Block From To Value
0x61fc9d2f28b594d1a89a583a11cfcf600cf34c64b1cf6a8ffd5c98c585d80ce9110458272022-02-17 17:18:16293 days 5 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0xd5160aee77a365ea2de6f13c9f29934723a3c6d4408e73f833502495d43e6fcc110430252022-02-17 15:40:01293 days 7 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0x17758ff51f2d0dbe937bc686c88804076a767da34f2c1866c216b9b28998e17a98782512022-01-21 21:14:39320 days 2 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0x57147835dafe68a8c541e1cb48fbf534a77d49c91da188775e9e95be17f2536684043362021-12-18 15:18:42354 days 7 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0xf375b09a18cc9c31ebc334b368c33e83335276c36ba673bd3b384d81d2f5b5b767379362021-11-09 20:49:15393 days 2 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0x99387a9dc3914bbc011f6aa3d9e7ce9229454b4f0dbd1fea89a6abb0caa18fa967379042021-11-09 20:48:14393 days 2 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0x79a86c12066a0d07b948193e36f4c19beb814edf86f7234007368f6cc2b07d6763460892021-10-31 14:11:43402 days 9 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0xe65f8e4b3254402de956f71cf465e09da5c8ff011363bb9b0bbb442f66bf23d461932932021-10-28 0:07:47405 days 23 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0x9e3a87892fdd998f5451462e894c7816c26adb1a614cab3819c0c3b64448612261932852021-10-28 0:07:30405 days 23 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0xd9489d68bc10dcb48ac92f1ccbdd8af37b7e44e825668af8903cbf88a8750f9e61931592021-10-28 0:03:17405 days 23 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
0x92993f24897b7f2967a60e5868d4126bbc31cf0749d446f7a18723fc02b5f45e61921242021-10-27 23:28:27405 days 23 hrs ago Impermax: TraderJoe V3 Staked LP Factory  Contract Creation0 AVAX
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakedLPTokenFactory023

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at snowtrace.io on 2021-11-17
*/

// File: contracts\libraries\SafeMath.sol

pragma solidity =0.5.16;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @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 addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction underflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    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 multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b, string memory errorMessage) 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, errorMessage);

        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) {
        // Solidity only automatically asserts when dividing by 0
        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;
    }
}

// File: contracts\ImpermaxERC20.sol

pragma solidity =0.5.16;


// This contract is basically UniswapV2ERC20 with small modifications
// src: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol

contract ImpermaxERC20 {
	using SafeMath for uint;
	
	string public name;
	string public symbol;
	uint8 public decimals = 18;
	uint public totalSupply;
	mapping(address => uint) public balanceOf;
	mapping(address => mapping(address => uint)) public allowance;
	
	bytes32 public DOMAIN_SEPARATOR;
	mapping(address => uint) public nonces;
	
	event Transfer(address indexed from, address indexed to, uint value);
	event Approval(address indexed owner, address indexed spender, uint value);

	constructor() public {}	
	
	function _setName(string memory _name, string memory _symbol) internal {
		name = _name;
		symbol = _symbol;
		uint chainId;
		assembly {
			chainId := chainid
		}
		DOMAIN_SEPARATOR = keccak256(
			abi.encode(
				keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
				keccak256(bytes(_name)),
				keccak256(bytes("1")),
				chainId,
				address(this)
			)
		);
	}

	function _mint(address to, uint value) internal {
		totalSupply = totalSupply.add(value);
		balanceOf[to] = balanceOf[to].add(value);
		emit Transfer(address(0), to, value);
	}

	function _burn(address from, uint value) internal {
		balanceOf[from] = balanceOf[from].sub(value);
		totalSupply = totalSupply.sub(value);
		emit Transfer(from, address(0), value);
	}

	function _approve(address owner, address spender, uint value) private {
		allowance[owner][spender] = value;
		emit Approval(owner, spender, value);
	}

	function _transfer(address from, address to, uint value) internal {
		balanceOf[from] = balanceOf[from].sub(value, "Impermax: TRANSFER_TOO_HIGH");
		balanceOf[to] = balanceOf[to].add(value);
		emit Transfer(from, to, value);
	}

	function approve(address spender, uint value) external returns (bool) {
		_approve(msg.sender, spender, value);
		return true;
	}

	function transfer(address to, uint value) external returns (bool) {
		_transfer(msg.sender, to, value);
		return true;
	}

	function transferFrom(address from, address to, uint value) external returns (bool) {
		if (allowance[from][msg.sender] != uint(-1)) {
			allowance[from][msg.sender] = allowance[from][msg.sender].sub(value, "Impermax: TRANSFER_NOT_ALLOWED");
		}
		_transfer(from, to, value);
		return true;
	}
	
	function _checkSignature(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s, bytes32 typehash) internal {
		require(deadline >= block.timestamp, "Impermax: EXPIRED");
		bytes32 digest = keccak256(
			abi.encodePacked(
				'\x19\x01',
				DOMAIN_SEPARATOR,
				keccak256(abi.encode(typehash, owner, spender, value, nonces[owner]++, deadline))
			)
		);
		address recoveredAddress = ecrecover(digest, v, r, s);
		require(recoveredAddress != address(0) && recoveredAddress == owner, "Impermax: INVALID_SIGNATURE");	
	}

	// keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
	bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
	function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
		_checkSignature(owner, spender, value, deadline, v, r, s, PERMIT_TYPEHASH);
		_approve(owner, spender, value);
	}
}

// File: contracts\interfaces\IERC20.sol

pragma solidity >=0.5.0;

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

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view 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);
}

// File: contracts\interfaces\IPoolToken.sol

pragma solidity >=0.5.0;

interface IPoolToken {

	/*** Impermax ERC20 ***/
	
	event Transfer(address indexed from, address indexed to, uint value);
	event Approval(address indexed owner, address indexed spender, 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;
	
	/*** Pool Token ***/
	
	event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens);
	event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens);
	event Sync(uint totalBalance);
	
	function underlying() external view returns (address);
	function factory() external view returns (address);
	function totalBalance() external view returns (uint);
	function MINIMUM_LIQUIDITY() external pure returns (uint);

	function exchangeRate() external returns (uint);
	function mint(address minter) external returns (uint mintTokens);
	function redeem(address redeemer) external returns (uint redeemAmount);
	function skim(address to) external;
	function sync() external;
	
	function _setFactory() external;
}

// File: contracts\PoolToken.sol

pragma solidity =0.5.16;





contract PoolToken is IPoolToken, ImpermaxERC20 {
   	uint internal constant initialExchangeRate = 1e18;
	address public underlying;
	address public factory;
	uint public totalBalance;
	uint public constant MINIMUM_LIQUIDITY = 1000;
	
	event Mint(address indexed sender, address indexed minter, uint mintAmount, uint mintTokens);
	event Redeem(address indexed sender, address indexed redeemer, uint redeemAmount, uint redeemTokens);
	event Sync(uint totalBalance);
	
	/*** Initialize ***/
	
	// called once by the factory
	function _setFactory() external {
		require(factory == address(0), "Impermax: FACTORY_ALREADY_SET");
		factory = msg.sender;
	}
	
	/*** PoolToken ***/
	
	function _update() internal {
		totalBalance = IERC20(underlying).balanceOf(address(this));
		emit Sync(totalBalance);
	}

	function exchangeRate() public returns (uint) 
	{
		uint _totalSupply = totalSupply; // gas savings
		uint _totalBalance = totalBalance; // gas savings
		if (_totalSupply == 0 || _totalBalance == 0) return initialExchangeRate;
		return _totalBalance.mul(1e18).div(_totalSupply);
	}
	
	// this low-level function should be called from another contract
	function mint(address minter) external nonReentrant update returns (uint mintTokens) {
		uint balance = IERC20(underlying).balanceOf(address(this));
		uint mintAmount = balance.sub(totalBalance);
		mintTokens = mintAmount.mul(1e18).div(exchangeRate());

		if(totalSupply == 0) {
			// permanently lock the first MINIMUM_LIQUIDITY tokens
			mintTokens = mintTokens.sub(MINIMUM_LIQUIDITY);
			_mint(address(0), MINIMUM_LIQUIDITY);
		}
		require(mintTokens > 0, "Impermax: MINT_AMOUNT_ZERO");
		_mint(minter, mintTokens);
		emit Mint(msg.sender, minter, mintAmount, mintTokens);
	}

	// this low-level function should be called from another contract
	function redeem(address redeemer) external nonReentrant update returns (uint redeemAmount) {
		uint redeemTokens = balanceOf[address(this)];
		redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18);

		require(redeemAmount > 0, "Impermax: REDEEM_AMOUNT_ZERO");
		require(redeemAmount <= totalBalance, "Impermax: INSUFFICIENT_CASH");
		_burn(address(this), redeemTokens);
		_safeTransfer(redeemer, redeemAmount);
		emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens);		
	}

	// force real balance to match totalBalance
	function skim(address to) external nonReentrant {
		_safeTransfer(to, IERC20(underlying).balanceOf(address(this)).sub(totalBalance));
	}

	// force totalBalance to match real balance
	function sync() external nonReentrant update {}
	
	/*** Utilities ***/
	
	// same safe transfer function used by UniSwapV2 (with fixed underlying)
	bytes4 private constant SELECTOR = bytes4(keccak256(bytes("transfer(address,uint256)")));
	function _safeTransfer(address to, uint amount) internal {
		(bool success, bytes memory data) = underlying.call(abi.encodeWithSelector(SELECTOR, to, amount));
		require(success && (data.length == 0 || abi.decode(data, (bool))), "Impermax: TRANSFER_FAILED");
	}
	
	// prevents a contract from calling itself, directly or indirectly.
	bool internal _notEntered = true;
	modifier nonReentrant() {
		require(_notEntered, "Impermax: REENTERED");
		_notEntered = false;
		_;
		_notEntered = true;
	}
	
	// update totalBalance with current balance
	modifier update() {
		_;
		_update();
	}
}

// File: contracts\interfaces\IMasterChef023.sol

pragma solidity >=0.5.0;

// For:
// TraderJoeV3

interface IMasterChef023 {
	function poolInfo(uint256) external view returns (
		address lpToken, 
		uint256 accRewardTokenPerShare,
		uint256 lastRewardBlock,
		uint256 allocPoint,
		address rewarder 
	);
	function userInfo(uint256, address) external view returns (
		uint256 amount,
		uint256 rewardDebt
	);
	function totalAllocPoint() external view returns (uint256);
	function rewarder(uint256) external view returns (address);

	function deposit(uint256 _pid, uint256 _amount) external;
	function withdraw(uint256 _pid, uint256 _amount) external;
}

// File: contracts\interfaces\ISimpleRewarder.sol

pragma solidity >=0.5.0;

interface ISimpleRewarder {
	function isNative() external pure returns (bool);
	function pendingTokens(address user) external view returns (uint256 pending);
	function rewardToken() external view returns (address);
}

// File: contracts\interfaces\IUniswapV2Router01.sol

pragma solidity >=0.5.0;

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

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

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

// File: contracts\interfaces\IUniswapV2Pair.sol

pragma solidity >=0.5.0;

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

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

// File: contracts\interfaces\IWETH.sol

pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

// File: contracts\libraries\SafeToken.sol

pragma solidity 0.5.16;

interface ERC20Interface {
    function balanceOf(address user) external view returns (uint256);
}

library SafeToken {
    function myBalance(address token) internal view returns (uint256) {
        return ERC20Interface(token).balanceOf(address(this));
    }

    function balanceOf(address token, address user) internal view returns (uint256) {
        return ERC20Interface(token).balanceOf(user);
    }

    function safeApprove(address token, address to, uint256 value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "!safeApprove");
    }

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

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

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call.value(value)(new bytes(0));
        require(success, "!safeTransferETH");
    }
}

// File: contracts\libraries\Math.sol

pragma solidity =0.5.16;

// a library for performing various math operations
// forked from: https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/libraries/Math.sol

library Math {
    function min(uint x, uint y) internal pure returns (uint z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

// File: contracts\StakedLPToken023.sol

pragma solidity =0.5.16;










contract StakedLPToken023 is IUniswapV2Pair, PoolToken {
	using SafeToken for address;
	
	bool public constant isStakedLPToken = true;
	string public constant stakedLPTokenType = "023";
	
	uint256 public pid;
	address public token0;
	address public token1;
	address public router;
	address public masterChef;
	address public rewardsToken;
	address public WETH;
	uint256 public constant REINVEST_BOUNTY = 0.02e18;

	event Reinvest(address indexed caller, uint256 reward, uint256 bounty);
		
	function _initialize(
		uint256 _pid,
		address _underlying,
		address _token0,
		address _token1,
		address _router,
		address _masterChef,
		address _rewardsToken,
		address _WETH
	) external {
		require(factory == address(0), "StakedLPToken: FACTORY_ALREADY_SET"); // sufficient check
		factory = msg.sender;
		_setName("Staked Uniswap V2", "STKD-UNI-V2");
		pid = _pid;
		underlying = _underlying;
		token0 = _token0;
		token1 = _token1;
		router = _router;
		masterChef = _masterChef;
		rewardsToken = _rewardsToken;
		WETH = _WETH;
		_rewardsToken.safeApprove(address(_router), uint256(-1));
		_WETH.safeApprove(address(_router), uint256(-1));
		_underlying.safeApprove(address(_masterChef), uint256(-1));
	}
	
	function () external payable {
		uint256 balance = address(this).balance;
		IWETH(WETH).deposit.value(balance)();
	}
		
	/*** PoolToken Overrides ***/
	
	function _update() internal {
		(uint256 _totalBalance,) = IMasterChef023(masterChef).userInfo(pid, address(this));
		totalBalance = _totalBalance;
		emit Sync(_totalBalance);
	}
	
	// this low-level function should be called from another contract
	function mint(address minter) external nonReentrant update returns (uint mintTokens) {
		uint mintAmount = underlying.myBalance();
		// handle pools with deposit fees by checking balance before and after deposit
		(uint256 _totalBalanceBefore,) = IMasterChef023(masterChef).userInfo(pid, address(this));
		IMasterChef023(masterChef).deposit(pid, mintAmount);
		(uint256 _totalBalanceAfter,) = IMasterChef023(masterChef).userInfo(pid, address(this));
		mintTokens = _totalBalanceAfter.sub(_totalBalanceBefore).mul(1e18).div(exchangeRate());

		if(totalSupply == 0) {
			// permanently lock the first MINIMUM_LIQUIDITY tokens
			mintTokens = mintTokens.sub(MINIMUM_LIQUIDITY);
			_mint(address(0), MINIMUM_LIQUIDITY);
		}
		require(mintTokens > 0, "StakedLPToken: MINT_AMOUNT_ZERO");
		_mint(minter, mintTokens);
		emit Mint(msg.sender, minter, mintAmount, mintTokens);
	}

	// this low-level function should be called from another contract
	function redeem(address redeemer) external nonReentrant update returns (uint redeemAmount) {
		uint redeemTokens = balanceOf[address(this)];
		redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18);

		require(redeemAmount > 0, "StakedLPToken: REDEEM_AMOUNT_ZERO");
		require(redeemAmount <= totalBalance, "StakedLPToken: INSUFFICIENT_CASH");
		_burn(address(this), redeemTokens);
		IMasterChef023(masterChef).withdraw(pid, redeemAmount);
		_safeTransfer(redeemer, redeemAmount);
		emit Redeem(msg.sender, redeemer, redeemAmount, redeemTokens);		
	}
	
	/*** Reinvest ***/
	
	function _optimalDepositA(uint256 amountA, uint256 reserveA) internal pure returns (uint256) {
		uint256 a = uint256(1997).mul(reserveA);
		uint256 b = amountA.mul(1000).mul(reserveA).mul(3988);
		uint256 c = Math.sqrt(a.mul(a).add(b));
		return c.sub(a).div(1994);
	}
	
	function approveRouter(address token, uint256 amount) internal {
		if (IERC20(token).allowance(address(this), router) >= amount) return;
		token.safeApprove(address(router), uint256(-1));
	}
	
	function swapExactTokensForTokens(address tokenIn, address tokenOut, uint256 amount) internal {
		address[] memory path = new address[](2);
		path[0] = address(tokenIn);
		path[1] = address(tokenOut);
		approveRouter(tokenIn, amount);
		IUniswapV2Router01(router).swapExactTokensForTokens(amount, 0, path, address(this), now);
	}
	
	function addLiquidity(address tokenA, address tokenB, uint256 amountA, uint256 amountB) internal returns (uint256 liquidity) {
		approveRouter(tokenA, amountA);
		approveRouter(tokenB, amountB);
		(,,liquidity) = IUniswapV2Router01(router).addLiquidity(tokenA, tokenB, amountA, amountB, 0, 0, address(this), now);
	}
	
	function _getReward() internal returns (uint256) {
		IMasterChef023(masterChef).withdraw(pid, 0);
		(,,,,address rewarder) = IMasterChef023(masterChef).poolInfo(pid);
		if (rewarder != address(0)) {
			bool isNative = ISimpleRewarder(rewarder).isNative();
			address token = isNative ? WETH : ISimpleRewarder(rewarder).rewardToken();
			uint256 myBalance = token.myBalance();
			if (myBalance > 0) {
				swapExactTokensForTokens(token, rewardsToken, myBalance);
			}
		}
		return rewardsToken.myBalance();
	}
	
	function getReward() external nonReentrant returns (uint256) {
		require(msg.sender == tx.origin);
		return _getReward();
	}

	function reinvest() external nonReentrant update {
		require(msg.sender == tx.origin);
		// 1. Withdraw all the rewards.		
		uint256 reward = _getReward();
		if (reward == 0) return;
		// 2. Send the reward bounty to the caller.
		uint256 bounty = reward.mul(REINVEST_BOUNTY) / 1e18;
		rewardsToken.safeTransfer(msg.sender, bounty);
		// 3. Convert all the remaining rewards to token0 or token1.
		address tokenA;
		address tokenB;
		if (token0 == rewardsToken || token1 == rewardsToken) {
			(tokenA, tokenB) = token0 == rewardsToken ? (token0, token1) : (token1, token0);
		}
		else {
			swapExactTokensForTokens(rewardsToken, WETH, reward.sub(bounty));
			if (token0 == WETH || token1 == WETH) { 
				(tokenA, tokenB) = token0 == WETH ? (token0, token1) : (token1, token0);
			}
			else {
				swapExactTokensForTokens(WETH, token0, WETH.myBalance());
				(tokenA, tokenB) = (token0, token1);
			}
		}
		// 4. Convert tokenA to LP Token underlyings.
		uint256 totalAmountA = tokenA.myBalance();
		assert(totalAmountA > 0);
		(uint256 r0, uint256 r1,) = IUniswapV2Pair(underlying).getReserves();
		uint256 reserveA = tokenA == token0 ? r0 : r1;
		uint256 swapAmount = _optimalDepositA(totalAmountA, reserveA);
		swapExactTokensForTokens(tokenA, tokenB, swapAmount);
		uint256 liquidity = addLiquidity(tokenA, tokenB, totalAmountA.sub(swapAmount), tokenB.myBalance());
		// 5. Stake the LP Tokens. 
		IMasterChef023(masterChef).deposit(pid, liquidity);
		emit Reinvest(msg.sender, reward, bounty);
	}
	
	/*** Mirrored From uniswapV2Pair ***/

	function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) {
		(reserve0, reserve1, blockTimestampLast) = IUniswapV2Pair(underlying).getReserves();
		// if no token has been minted yet mirror uniswap getReserves
		if (totalSupply == 0) return (reserve0, reserve1, blockTimestampLast);
		// else, return the underlying reserves of this contract
		uint256 _totalBalance = totalBalance;
		uint256 _totalSupply = IUniswapV2Pair(underlying).totalSupply();
		reserve0 = safe112(_totalBalance.mul(reserve0).div(_totalSupply));
		reserve1 = safe112(_totalBalance.mul(reserve1).div(_totalSupply));
		require(reserve0 > 100 && reserve1 > 100, "StakedLPToken: INSUFFICIENT_RESERVES");
	}
	function price0CumulativeLast() external view returns (uint256) {
		return IUniswapV2Pair(underlying).price0CumulativeLast();
	}
	function price1CumulativeLast() external view returns (uint256) {
		return IUniswapV2Pair(underlying).price1CumulativeLast();
	}

	/*** Utilities ***/
	
	function safe112(uint n) internal pure returns (uint112) {
		require(n < 2**112, "StakedLPToken: SAFE112");
		return uint112(n);
	}
}

// File: contracts\StakedLPTokenFactory023.sol

pragma solidity =0.5.16;





contract StakedLPTokenFactory023 {
	address public router;
	address public masterChef;
	address public rewardsToken;
	address public WETH;

	mapping(uint256 => address) public getStakedLPToken;
	address[] public allStakedLPToken;

	event StakedLPTokenCreated(address indexed token0, address indexed token1, uint256 indexed pid, address stakedLPToken, uint);

	constructor(address _router, address _masterChef, address _rewardsToken) public {
		router = _router;
		masterChef = _masterChef;
		rewardsToken = _rewardsToken;
		WETH = IUniswapV2Router01(_router).WAVAX();
	}

	function allStakedLPTokenLength() external view returns (uint) {
		return allStakedLPToken.length;
	}

	function createStakedLPToken(uint256 pid) external returns (address payable stakedLPToken) {
		require(getStakedLPToken[pid] == address(0), "StakedLPTokenFactory: PID_EXISTS");
		(address pair,,,,) = IMasterChef023(masterChef).poolInfo(pid);
		address token0 = IUniswapV2Pair(pair).token0();
		address token1 = IUniswapV2Pair(pair).token1();
		bytes memory bytecode = type(StakedLPToken023).creationCode;
		assembly {
			stakedLPToken := create2(0, add(bytecode, 32), mload(bytecode), pid)
		}
		StakedLPToken023(stakedLPToken)._initialize(pid, pair, token0, token1, router, masterChef, rewardsToken, WETH);
		getStakedLPToken[pid] = stakedLPToken;
		allStakedLPToken.push(stakedLPToken);
		emit StakedLPTokenCreated(token0, token1, pid, stakedLPToken, allStakedLPToken.length);
	}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_masterChef","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"address","name":"stakedLPToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"StakedLPTokenCreated","type":"event"},{"constant":true,"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allStakedLPToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"allStakedLPTokenLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"pid","type":"uint256"}],"name":"createStakedLPToken","outputs":[{"internalType":"address payable","name":"stakedLPToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getStakedLPToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"masterChef","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506040516146a93803806146a98339818101604052606081101561003357600080fd5b508051602080830151604093840151600080546001600160a01b038087166001600160a01b0319928316811790935560018054828716908416179055600280549185169190921617905585516339d94ae160e11b8152955194959294919390926373b295c29260048083019392829003018186803b1580156100b457600080fd5b505afa1580156100c8573d6000803e3d6000fd5b505050506040513d60208110156100de57600080fd5b5051600380546001600160a01b039092166001600160a01b0319909216919091179055505050614596806101136000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063ad5c46481161005b578063ad5c464814610112578063c09902741461011a578063d1af0c7d14610137578063f887ea401461013f57610088565b8063575a86b21461008d57806370b3dc25146100be5780638ad8e368146100db578063940e0a6e146100f8575b600080fd5b610095610147565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610095600480360360208110156100d457600080fd5b5035610163565b610095600480360360208110156100f157600080fd5b503561018b565b6101006101bf565b60408051918252519081900360200190f35b6100956101c5565b6100956004803603602081101561013057600080fd5b50356101e1565b61009561061c565b610095610638565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6005818154811061019857fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60055490565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b60008181526004602052604081205473ffffffffffffffffffffffffffffffffffffffff161561027257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5374616b65644c50546f6b656e466163746f72793a205049445f455849535453604482015290519081900360640190fd5b600154604080517f1526fe2700000000000000000000000000000000000000000000000000000000815260048101859052905160009273ffffffffffffffffffffffffffffffffffffffff1691631526fe279160248083019260a0929190829003018186803b1580156102e457600080fd5b505afa1580156102f8573d6000803e3d6000fd5b505050506040513d60a081101561030e57600080fd5b5051604080517f0dfe1681000000000000000000000000000000000000000000000000000000008152905191925060009173ffffffffffffffffffffffffffffffffffffffff841691630dfe1681916004808301926020929190829003018186803b15801561037c57600080fd5b505afa158015610390573d6000803e3d6000fd5b505050506040513d60208110156103a657600080fd5b5051604080517fd21220a7000000000000000000000000000000000000000000000000000000008152905191925060009173ffffffffffffffffffffffffffffffffffffffff85169163d21220a7916004808301926020929190829003018186803b15801561041457600080fd5b505afa158015610428573d6000803e3d6000fd5b505050506040513d602081101561043e57600080fd5b505160405190915060609061045560208201610654565b6020820181038252601f19601f820116604052509050858151602083016000f560008054600154600254600354604080517fe9d60d9f000000000000000000000000000000000000000000000000000000008152600481018e905273ffffffffffffffffffffffffffffffffffffffff8c811660248301528b811660448301528a81166064830152958616608482015293851660a485015291841660c4840152831660e4830152519398509088169263e9d60d9f926101048084019391929182900301818387803b15801561052957600080fd5b505af115801561053d573d6000803e3d6000fd5b5050506000878152600460209081526040808320805473ffffffffffffffffffffffffffffffffffffffff808c167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316811790935560058054600181018255968190527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db090960180549092168317909155935482519182529281019290925280518a9450868416938816927f0a6f208b96fdd7a6d70ee93ea0fb94bed632180bfa94564c9a5166b9d3ffe88b92908290030190a450505050919050565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b613f00806106628339019056fe60806040526002805460ff19908116601217909155600b80549091166001179055613ed18061002f6000396000f3fe6080604052600436106102a05760003560e01c806370a082311161016e578063d1af0c7d116100cb578063e9d60d9f1161007f578063f887ea4011610064578063f887ea4014610992578063fdb5a03e146109a7578063fff6cae9146109bc576102a0565b8063e9d60d9f14610904578063f10684541461097d576102a0565b8063d505accf116100b0578063d505accf1461083c578063dd62ed3e146108a7578063e8bea167146108ef576102a0565b8063d1af0c7d14610812578063d21220a714610827576102a0565b8063ad5c464811610122578063ba9a7a5611610107578063ba9a7a56146107a8578063bc25cf77146107bd578063c45a0155146107fd576102a0565b8063ad5c46481461077e578063ad7a672f14610793576102a0565b806395a2251f1161015357806395a2251f146106e357806395d89b4114610723578063a9059cbb14610738576102a0565b806370a08231146106635780637ecebe00146106a3576102a0565b80633644e5151161021c5780635909c0d5116101d05780636a627842116101b55780636a627842146105f95780636c2a3bc5146106395780636f307dc31461064e576102a0565b80635909c0d5146105cf5780635a3d5493146105e4576102a0565b80633d18b912116102015780633d18b9121461058e5780634a5d316c146105a3578063575a86b2146105ba576102a0565b80633644e515146105645780633ba0b9a914610579576102a0565b80630dfe16811161027357806323b872dd1161025857806323b872dd146104d457806330adf81f14610524578063313ce56714610539576102a0565b80630dfe16811461046f57806318160ddd146104ad576102a0565b806306fdde031461032a5780630902f1ac146103b4578063095ea7b3146104005780630a6410631461045a575b601254604080517fd0e30db00000000000000000000000000000000000000000000000000000000081529051479273ffffffffffffffffffffffffffffffffffffffff169163d0e30db091849160048082019260009290919082900301818588803b15801561030e57600080fd5b505af1158015610322573d6000803e3d6000fd5b505050505050005b34801561033657600080fd5b5061033f6109d1565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610379578181015183820152602001610361565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103c057600080fd5b506103c9610a7d565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b34801561040c57600080fd5b506104466004803603604081101561042357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610cc3565b604080519115158252519081900360200190f35b34801561046657600080fd5b50610446610cda565b34801561047b57600080fd5b50610484610cdf565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156104b957600080fd5b506104c2610cfb565b60408051918252519081900360200190f35b3480156104e057600080fd5b50610446600480360360608110156104f757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610d01565b34801561053057600080fd5b506104c2610e15565b34801561054557600080fd5b5061054e610e39565b6040805160ff9092168252519081900360200190f35b34801561057057600080fd5b506104c2610e42565b34801561058557600080fd5b506104c2610e48565b34801561059a57600080fd5b506104c2610e98565b3480156105af57600080fd5b506105b8610f78565b005b3480156105c657600080fd5b50610484611029565b3480156105db57600080fd5b506104c2611045565b3480156105f057600080fd5b506104c26110e1565b34801561060557600080fd5b506104c26004803603602081101561061c57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661114c565b34801561064557600080fd5b506104c2611560565b34801561065a57600080fd5b5061048461156b565b34801561066f57600080fd5b506104c26004803603602081101561068657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611587565b3480156106af57600080fd5b506104c2600480360360208110156106c657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611599565b3480156106ef57600080fd5b506104c26004803603602081101561070657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166115ab565b34801561072f57600080fd5b5061033f61184e565b34801561074457600080fd5b506104466004803603604081101561075b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356118c6565b34801561078a57600080fd5b506104846118d3565b34801561079f57600080fd5b506104c26118ef565b3480156107b457600080fd5b506104c26118f5565b3480156107c957600080fd5b506105b8600480360360208110156107e057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166118fb565b34801561080957600080fd5b50610484611a7e565b34801561081e57600080fd5b50610484611a9a565b34801561083357600080fd5b50610484611ab6565b34801561084857600080fd5b506105b8600480360360e081101561085f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611ad2565b3480156108b357600080fd5b506104c2600480360360408110156108ca57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611b16565b3480156108fb57600080fd5b5061033f611b33565b34801561091057600080fd5b506105b8600480360361010081101561092857600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff602082013581169160408101358216916060820135811691608081013582169160a082013581169160c081013582169160e09091013516611b6c565b34801561098957600080fd5b506104c2611dd4565b34801561099e57600080fd5b50610484611dda565b3480156109b357600080fd5b506105b8611df6565b3480156109c857600080fd5b506105b861236e565b6000805460408051602060026001851615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a755780601f10610a4a57610100808354040283529160200191610a75565b820191906000526020600020905b815481529060010190602001808311610a5857829003601f168201915b505050505081565b6000806000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610aea57600080fd5b505afa158015610afe573d6000803e3d6000fd5b505050506040513d6060811015610b1457600080fd5b5080516020820151604090920151600354919550919350909150610b3757610cbe565b600a54600854604080517f18160ddd000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff16916318160ddd916004808301926020929190829003018186803b158015610ba557600080fd5b505afa158015610bb9573d6000803e3d6000fd5b505050506040513d6020811015610bcf57600080fd5b50519050610c0b610c0682610bfa856dffffffffffffffffffffffffffff8a1663ffffffff61240f16565b9063ffffffff61248916565b6124cb565b9450610c34610c0682610bfa856dffffffffffffffffffffffffffff891663ffffffff61240f16565b93506064856dffffffffffffffffffffffffffff16118015610c6657506064846dffffffffffffffffffffffffffff16115b610cbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613dc36024913960400191505060405180910390fd5b50505b909192565b6000610cd0338484612552565b5060015b92915050565b600181565b600d5473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610e0057604080518082018252601e81527f496d7065726d61783a205452414e534645525f4e4f545f414c4c4f574544000060208083019190915273ffffffffffffffffffffffffffffffffffffffff87166000908152600582528381203382529091529190912054610dce91849063ffffffff6125c116565b73ffffffffffffffffffffffffffffffffffffffff851660009081526005602090815260408083203384529091529020555b610e0b848484612672565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b600354600a5460009190811580610e5d575080155b15610e7457670de0b6b3a764000092505050610e95565b610e9082610bfa83670de0b6b3a764000063ffffffff61240f16565b925050505b90565b600b5460009060ff16610f0c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055333214610f4057600080fd5b610f4861278b565b9050600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590565b60095473ffffffffffffffffffffffffffffffffffffffff1615610ffd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f496d7065726d61783a20464143544f52595f414c52454144595f534554000000604482015290519081900360640190fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055565b60105473ffffffffffffffffffffffffffffffffffffffff1681565b600854604080517f5909c0d5000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff1691635909c0d5916004808301926020929190829003018186803b1580156110b057600080fd5b505afa1580156110c4573d6000803e3d6000fd5b505050506040513d60208110156110da57600080fd5b5051905090565b600854604080517f5a3d5493000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff1691635a3d5493916004808301926020929190829003018186803b1580156110b057600080fd5b600b5460009060ff166111c057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905560085460009061120d9073ffffffffffffffffffffffffffffffffffffffff16612a6f565b601054600c54604080517f93f1a40b0000000000000000000000000000000000000000000000000000000081526004810192909252306024830152805193945060009373ffffffffffffffffffffffffffffffffffffffff909316926393f1a40b926044808201939291829003018186803b15801561128b57600080fd5b505afa15801561129f573d6000803e3d6000fd5b505050506040513d60408110156112b557600080fd5b5051601054600c54604080517fe2bbb1580000000000000000000000000000000000000000000000000000000081526004810192909252602482018690525192935073ffffffffffffffffffffffffffffffffffffffff9091169163e2bbb1589160448082019260009290919082900301818387803b15801561133757600080fd5b505af115801561134b573d6000803e3d6000fd5b5050601054600c54604080517f93f1a40b000000000000000000000000000000000000000000000000000000008152600481019290925230602483015280516000955073ffffffffffffffffffffffffffffffffffffffff90931693506393f1a40b92604480840193829003018186803b1580156113c857600080fd5b505afa1580156113dc573d6000803e3d6000fd5b505050506040513d60408110156113f257600080fd5b50519050611429611401610e48565b610bfa670de0b6b3a764000061141d858763ffffffff612b1116565b9063ffffffff61240f16565b93506003546000141561145757611448846103e863ffffffff612b1116565b935061145760006103e8612b53565b600084116114c657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5374616b65644c50546f6b656e3a204d494e545f414d4f554e545f5a45524f00604482015290519081900360640190fd5b6114d08585612b53565b6040805184815260208101869052815173ffffffffffffffffffffffffffffffffffffffff88169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a3505050611530612c04565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055919050565b66470de4df82000081565b60085473ffffffffffffffffffffffffffffffffffffffff1681565b60046020526000908152604090205481565b60076020526000908152604090205481565b600b5460009060ff1661161f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690553060009081526004602052604090205461167b670de0b6b3a7640000610bfa61166e610e48565b849063ffffffff61240f16565b9150600082116116d6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613de76021913960400191505060405180910390fd5b600a5482111561174757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f5374616b65644c50546f6b656e3a20494e53554646494349454e545f43415348604482015290519081900360640190fd5b6117513082612ce8565b601054600c54604080517f441a3e700000000000000000000000000000000000000000000000000000000081526004810192909252602482018590525173ffffffffffffffffffffffffffffffffffffffff9092169163441a3e709160448082019260009290919082900301818387803b1580156117ce57600080fd5b505af11580156117e2573d6000803e3d6000fd5b505050506117f08383612dac565b6040805183815260208101839052815173ffffffffffffffffffffffffffffffffffffffff86169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a350611530612c04565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f81018490048402820184019092528181529291830182828015610a755780601f10610a4a57610100808354040283529160200191610a75565b6000610cd0338484612672565b60125473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b6103e881565b600b5460ff1661196c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055600a54600854604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051611a50938593611a4b93919273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b158015611a1357600080fd5b505afa158015611a27573d6000803e3d6000fd5b505050506040513d6020811015611a3d57600080fd5b50519063ffffffff612b1116565b612dac565b50600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60115473ffffffffffffffffffffffffffffffffffffffff1681565b600e5473ffffffffffffffffffffffffffffffffffffffff1681565b611b02878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9612fb8565b611b0d878787612552565b50505050505050565b600560209081526000928352604080842090915290825290205481565b6040518060400160405280600381526020017f303233000000000000000000000000000000000000000000000000000000000081525081565b60095473ffffffffffffffffffffffffffffffffffffffff1615611bdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613e7b6022913960400191505060405180910390fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055604080518082018252601181527f5374616b656420556e69737761702056320000000000000000000000000000006020808301919091528251808401909352600b83527f53544b442d554e492d563200000000000000000000000000000000000000000090830152611c769161325b565b600c889055600880547fffffffffffffffffffffffff000000000000000000000000000000000000000090811673ffffffffffffffffffffffffffffffffffffffff8a811691909117909255600d80548216898416179055600e80548216888416179055600f8054821687841617905560108054821686841617905560118054821685841690811790915560128054909216928416929092179055611d3c90857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61333f565b611d8373ffffffffffffffffffffffffffffffffffffffff8216857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff63ffffffff61333f16565b611dca73ffffffffffffffffffffffffffffffffffffffff8816847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff63ffffffff61333f16565b5050505050505050565b600c5481565b600f5473ffffffffffffffffffffffffffffffffffffffff1681565b600b5460ff16611e6757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055333214611e9b57600080fd5b6000611ea561278b565b905080611eb25750612339565b6000670de0b6b3a7640000611ed48366470de4df82000063ffffffff61240f16565b81611edb57fe5b6011549190049150611f0a9073ffffffffffffffffffffffffffffffffffffffff16338363ffffffff61351c16565b601154600d54600091829173ffffffffffffffffffffffffffffffffffffffff90811691161480611f585750601154600e5473ffffffffffffffffffffffffffffffffffffffff9081169116145b15611fd257601154600d5473ffffffffffffffffffffffffffffffffffffffff908116911614611fa757600e54600d5473ffffffffffffffffffffffffffffffffffffffff9182169116611fc8565b600d54600e5473ffffffffffffffffffffffffffffffffffffffff91821691165b90925090506120f3565b60115460125461200b9173ffffffffffffffffffffffffffffffffffffffff9081169116612006878763ffffffff612b1116565b6136f2565b601254600d5473ffffffffffffffffffffffffffffffffffffffff908116911614806120545750601254600e5473ffffffffffffffffffffffffffffffffffffffff9081169116145b156120a357601254600d5473ffffffffffffffffffffffffffffffffffffffff908116911614611fa757600e54600d5473ffffffffffffffffffffffffffffffffffffffff9182169116611fc8565b601254600d546120d09173ffffffffffffffffffffffffffffffffffffffff908116911661200682612a6f565b5050600d54600e5473ffffffffffffffffffffffffffffffffffffffff91821691165b60006121148373ffffffffffffffffffffffffffffffffffffffff16612a6f565b90506000811161212057fe5b600080600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561218b57600080fd5b505afa15801561219f573d6000803e3d6000fd5b505050506040513d60608110156121b557600080fd5b508051602090910151600d546dffffffffffffffffffffffffffff92831694509116915060009073ffffffffffffffffffffffffffffffffffffffff8781169116146122015781612203565b825b90506000612211858361396f565b905061221e8787836136f2565b60006122598888612235898663ffffffff612b1116565b6122548b73ffffffffffffffffffffffffffffffffffffffff16612a6f565b6139f0565b601054600c54604080517fe2bbb1580000000000000000000000000000000000000000000000000000000081526004810192909252602482018490525192935073ffffffffffffffffffffffffffffffffffffffff9091169163e2bbb1589160448082019260009290919082900301818387803b1580156122d957600080fd5b505af11580156122ed573d6000803e3d6000fd5b5050604080518d8152602081018d905281513394507fc003f45bc224d116b6d079100d4ab57a5b9633244c47a5a92a176c5b79a85f2893509081900390910190a2505050505050505050505b612341612c04565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b600b5460ff166123df57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f496d7065726d61783a205245454e544552454400000000000000000000000000604482015290519081900360640190fd5b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055612341612c04565b60008261241e57506000610cd4565b8282028284828161242b57fe5b0414612482576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613e5a6021913960400191505060405180910390fd5b9392505050565b600061248283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613ae6565b60006e010000000000000000000000000000821061254a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5374616b65644c50546f6b656e3a205341464531313200000000000000000000604482015290519081900360640190fd5b50805b919050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6000818484111561266a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561262f578181015183820152602001612617565b50505050905090810190601f16801561265c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b604080518082018252601b81527f496d7065726d61783a205452414e534645525f544f4f5f48494748000000000060208083019190915273ffffffffffffffffffffffffffffffffffffffff86166000908152600490915291909120546126e091839063ffffffff6125c116565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600460205260408082209390935590841681522054612722908263ffffffff613b6516565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b601054600c54604080517f441a3e7000000000000000000000000000000000000000000000000000000000815260048101929092526000602483018190529051909273ffffffffffffffffffffffffffffffffffffffff169163441a3e70916044808301928692919082900301818387803b15801561280957600080fd5b505af115801561281d573d6000803e3d6000fd5b5050601054600c54604080517f1526fe270000000000000000000000000000000000000000000000000000000081526004810192909252516000945073ffffffffffffffffffffffffffffffffffffffff9092169250631526fe279160248083019260a0929190829003018186803b15801561289857600080fd5b505afa1580156128ac573d6000803e3d6000fd5b505050506040513d60a08110156128c257600080fd5b5060800151905073ffffffffffffffffffffffffffffffffffffffff811615612a475760008173ffffffffffffffffffffffffffffffffffffffff166373cfc6b26040518163ffffffff1660e01b815260040160206040518083038186803b15801561292d57600080fd5b505afa158015612941573d6000803e3d6000fd5b505050506040513d602081101561295757600080fd5b505190506000816129d9578273ffffffffffffffffffffffffffffffffffffffff1663f7c618c16040518163ffffffff1660e01b815260040160206040518083038186803b1580156129a857600080fd5b505afa1580156129bc573d6000803e3d6000fd5b505050506040513d60208110156129d257600080fd5b50516129f3565b60125473ffffffffffffffffffffffffffffffffffffffff165b90506000612a168273ffffffffffffffffffffffffffffffffffffffff16612a6f565b90508015612a4357601154612a4390839073ffffffffffffffffffffffffffffffffffffffff16836136f2565b5050505b601154612a699073ffffffffffffffffffffffffffffffffffffffff16612a6f565b91505090565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009173ffffffffffffffffffffffffffffffffffffffff8416916370a0823191602480820192602092909190829003018186803b158015612adf57600080fd5b505afa158015612af3573d6000803e3d6000fd5b505050506040513d6020811015612b0957600080fd5b505192915050565b600061248283836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f77008152506125c1565b600354612b66908263ffffffff613b6516565b60035573ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054612b9f908263ffffffff613b6516565b73ffffffffffffffffffffffffffffffffffffffff831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b601054600c54604080517f93f1a40b0000000000000000000000000000000000000000000000000000000081526004810192909252306024830152805160009373ffffffffffffffffffffffffffffffffffffffff16926393f1a40b926044808301939192829003018186803b158015612c7d57600080fd5b505afa158015612c91573d6000803e3d6000fd5b505050506040513d6040811015612ca757600080fd5b5051600a8190556040805182815290519192507f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf4919081900360200190a150565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020526040902054612d1e908263ffffffff612b1116565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902055600354612d57908263ffffffff612b1116565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff86811660248301526044808301879052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009560609594169382918083835b60208310612eb257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612e75565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612f14576040519150601f19603f3d011682016040523d82523d6000602084013e612f19565b606091505b5091509150818015612f47575080511580612f475750808060200190516020811015612f4457600080fd5b50515b612fb257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f496d7065726d61783a205452414e534645525f4641494c454400000000000000604482015290519081900360640190fd5b50505050565b4285101561302757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496d7065726d61783a2045585049524544000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa158015613169573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116158015906131e457508973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b61324f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f496d7065726d61783a20494e56414c49445f5349474e41545552450000000000604482015290519081900360640190fd5b50505050505050505050565b815161326e906000906020850190613d2a565b508051613282906001906020840190613d2a565b506040514690806052613e0882396040805191829003605201822086516020978801208383018352600184527f310000000000000000000000000000000000000000000000000000000000000093880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b6020831061341557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016133d8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613477576040519150601f19603f3d011682016040523d82523d6000602084013e61347c565b606091505b50915091508180156134aa5750805115806134aa57508080602001905160208110156134a757600080fd5b50515b61351557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f2173616665417070726f76650000000000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b602083106135f257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016135b5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613654576040519150601f19603f3d011682016040523d82523d6000602084013e613659565b606091505b5091509150818015613687575080511580613687575080806020019051602081101561368457600080fd5b50515b61351557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f21736166655472616e7366657200000000000000000000000000000000000000604482015290519081900360640190fd5b6040805160028082526060808301845292602083019080388339019050509050838160008151811061372057fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050828160018151811061376857fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506137ac8483613bd9565b600f546040517f38ed1739000000000000000000000000000000000000000000000000000000008152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a4870152875173ffffffffffffffffffffffffffffffffffffffff909716966338ed1739968a968a9594939092909160c40190602080880191028083838b5b83811015613858578181015183820152602001613840565b505050509050019650505050505050600060405180830381600087803b15801561388157600080fd5b505af1158015613895573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405260208110156138dc57600080fd5b81019080805160405193929190846401000000008211156138fc57600080fd5b90830190602082018581111561391157600080fd5b825186602082028301116401000000008211171561392e57600080fd5b82525081516020918201928201910280838360005b8381101561395b578181015183820152602001613943565b505050509050016040525050505050505050565b6000806139846107cd8463ffffffff61240f16565b905060006139a2610f9461141d8681896103e863ffffffff61240f16565b905060006139ce6139c9836139bd868063ffffffff61240f16565b9063ffffffff613b6516565b613cd9565b90506139e66107ca610bfa838663ffffffff612b1116565b9695505050505050565b60006139fc8584613bd9565b613a068483613bd9565b600f54604080517fe8e3370000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528781166024830152604482018790526064820186905260006084830181905260a483018190523060c48401524260e4840152925193169263e8e337009261010480840193606093929083900390910190829087803b158015613aae57600080fd5b505af1158015613ac2573d6000803e3d6000fd5b505050506040513d6060811015613ad857600080fd5b506040015195945050505050565b60008183613b4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561262f578181015183820152602001612617565b506000838581613b5b57fe5b0495945050505050565b60008282018381101561248257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600f54604080517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff92831660248201529051839285169163dd62ed3e916044808301926020929190829003018186803b158015613c5257600080fd5b505afa158015613c66573d6000803e3d6000fd5b505050506040513d6020811015613c7c57600080fd5b505110613c8857613cd5565b600f54613cd59073ffffffffffffffffffffffffffffffffffffffff84811691167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff63ffffffff61333f16565b5050565b60006003821115613d1c575080600160028204015b81811015613d1657809150600281828581613d0557fe5b040181613d0e57fe5b049050613cee565b5061254d565b811561254d57506001919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613d6b57805160ff1916838001178555613d98565b82800160010185558215613d98579182015b82811115613d98578251825591602001919060010190613d7d565b50613da4929150613da8565b5090565b610e9591905b80821115613da45760008155600101613dae56fe5374616b65644c50546f6b656e3a20494e53554646494349454e545f52455345525645535374616b65644c50546f6b656e3a2052454445454d5f414d4f554e545f5a45524f454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775374616b65644c50546f6b656e3a20464143544f52595f414c52454144595f534554a265627a7a723158203bf110411b3feecc9456aeac17ca6a52e54057efabb9e781ef86560c63c9b7ec64736f6c63430005100032a265627a7a72315820b41083d788bc690856516678387ed5539f0c41a87b7a6318d92b6ed5ed85e05264736f6c6343000510003200000000000000000000000060ae616a2155ee3d9a68541ba4544862310933d4000000000000000000000000188bed1968b795d5c9022f6a0bb5931ac4c18f000000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd

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

00000000000000000000000060ae616a2155ee3d9a68541ba4544862310933d4000000000000000000000000188bed1968b795d5c9022f6a0bb5931ac4c18f000000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd

-----Decoded View---------------
Arg [0] : _router (address): 0x60ae616a2155ee3d9a68541ba4544862310933d4
Arg [1] : _masterChef (address): 0x188bed1968b795d5c9022f6a0bb5931ac4c18f00
Arg [2] : _rewardsToken (address): 0x6e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000060ae616a2155ee3d9a68541ba4544862310933d4
Arg [1] : 000000000000000000000000188bed1968b795d5c9022f6a0bb5931ac4c18f00
Arg [2] : 0000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd


Deployed ByteCode Sourcemap

33118:1496:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33118:1496:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33180:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;33265:51;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33265:51:0;;:::i;33320:33::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33320:33:0;;:::i;33709:103::-;;;:::i;:::-;;;;;;;;;;;;;;;;33240:19;;;:::i;33817:794::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33817:794:0;;:::i;33209:27::-;;;:::i;33155:21::-;;;:::i;33180:25::-;;;;;;:::o;33265:51::-;;;;;;;;;;;;;;;:::o;33320:33::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33320:33:0;:::o;33709:103::-;33784:16;:23;33709:103;:::o;33240:19::-;;;;;;:::o;33817:794::-;33877:29;33921:21;;;:16;:21;;;;;;:35;:21;:35;33913:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34034:10;;34019:40;;;;;;;;;;;;;;33999:12;;34034:10;;;34019:35;;:40;;;;;;;;;;;;;;34034:10;34019:40;;;5:2:-1;;;;30:1;27;20:12;5:2;34019:40:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;34019:40:0;;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;34019:40:0;;34081:29;;;;;;;34019:40;;-1:-1:-1;34064:14:0;;34081:27;;;;;;:29;;;;;34019:40;;34081:29;;;;;;;:27;:29;;;5:2:-1;;;;30:1;27;20:12;5:2;34081:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;34081:29:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;34081:29:0;34132;;;;;;;;34081;;-1:-1:-1;34115:14:0;;34132:27;;;;;;:29;;;;;34081;;34132;;;;;;;:27;:29;;;5:2:-1;;;;30:1;27;20:12;5:2;34132:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;34132:29:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;34132:29:0;34190:35;;34132:29;;-1:-1:-1;34166:21:0;;34190:35;34132:29;34190:35;;;:::i;:::-;41:4:-1;34:5;30:16;25:3;21:26;14:5;7:41;87:2;83:7;78:2;73:3;69:12;65:26;61:2;54:38;34190:35:0;34166:59;;34309:3;34298:8;34292:15;34287:2;34277:8;34273:17;34270:1;34262:51;34393:6;;;;34401:10;34413:12;;34427:4;;34322:110;;;;;;;;;;;;:43;:110;;;;;;;;;;;;;;;;;;;;;34393:6;;;34322:110;;;;34401:10;;;34322:110;;;;34413:12;;;34322:110;;;;34427:4;;34322:110;;;;;34245:68;;-1:-1:-1;34322:43:0;;;;;;:110;;;;;34393:6;;34322:110;;;;;;34393:6;34322:43;:110;;;5:2:-1;;;;30:1;27;20:12;5:2;34322:110:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;;34437:21:0;;;;:16;:21;;;;;;;;:37;;;;;;;;;;;;;;;34479:16;27:10:-1;;34437:37:0;23:18:-1;;45:23;;34479:36:0;;;;;;;;;;;;;;;;;;34582:23;;34525:81;;;;;;;;;;;;;;34454:3;;-1:-1:-1;34525:81:0;;;;;;;;;;;;;;;;33817:794;;;;;;;:::o;33209:27::-;;;;;;:::o;33155:21::-;;;;;;:::o;33118:1496::-;;;;;;;;:::o

Swarm Source

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