Contract 0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b71

 

Contract Overview

Balance:
0 FTM

FTM Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf88083a9b30a42e0f2c9293345d86237ea3da2982b6d2bb692426c9e8726e84cReinvest451739962022-08-18 14:56:2047 secs ago0xd968665350a0bb7d487aadba94d920d8890ee06f IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.000862408709
0xee3f17881765670c45cde1536f8d4481a45eb9660a6bc558a533cdee1b3083b4Reinvest451739962022-08-18 14:56:2047 secs ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004216605
0xa2d5c2fbeb8dcf765ddd75bf80770969764ecb7a9e09d4a0bd8d459177c3bf0fReinvest451739602022-08-18 14:55:301 min ago0x0290009c77908568f53223efdeee3506cf27c6c4 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.003430014533
0x8b49f69a2ac505fffe6a4dc61b285e01e3f1dc9d0423c5b277030ffff3b6b807Reinvest451739132022-08-18 14:54:402 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004241675
0x1ae5dd8003e5d971b5b13e4e5d27c7e9140914e2d79e73365af16562229e6289Reinvest451738752022-08-18 14:53:593 mins ago0x657439ed989b0ec28a09b592fda8c61ebd434b6a IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.00385937648
0xf3f537b36de57d162396571d2049a90d76eee9bfda5f53475695672b02307392Reinvest451738202022-08-18 14:53:024 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.00421636
0xe4352846eee1db5e4e70490507a7a245b06635d02322df152250e860dfb657e6Reinvest451737882022-08-18 14:52:194 mins ago0xe4a7d73bccbae0e7398f8d437ff16b4623a5ac3a IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004099945113
0x5bc5e1af9005d8a6fb7e5c75df53d06005abfd31328d511c9b25d32e382313d2Reinvest451737522022-08-18 14:51:185 mins ago0x9029ed3f753125a0ac46b0a1ff78fef67213e57e IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004088154235
0x7e2b229d3efccbf63b87ed1adf2801d573e5a07f71159409b9c0ff7ee5273a04Reinvest451737112022-08-18 14:50:216 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004227675
0xc033aa12a7b8e0ceb02c6744e9bf62cb8b6704e9d9f8a00a4f807e8923967561Reinvest451736732022-08-18 14:49:417 mins ago0x6868ac68dd1b4b2b400f388346d019a606aded7e IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.003786799474
0xef5be759e9416c79685e6dc61f927557301d6b957230de3962141a8cd09fa459Reinvest451736252022-08-18 14:48:498 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.00424172
0xd3a4d781efa847bce848bf343ae9f26f747b9adac7b48473610812d862c8b5c9Reinvest451735892022-08-18 14:48:098 mins ago0x40c5cf51be4b6e0ad376d598e1615c156d6fc8fc IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.003813138288
0x64ac8e8d7db7fac548ccf2f3d9affcb06946da534f308aa57dd5a3305b99c318Reinvest451735352022-08-18 14:47:089 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004227675
0xfde4f02420deeb94077b8e502c3df195b42ce61469ded4c4572b5fc62ffa3d2eReinvest451734882022-08-18 14:46:1910 mins ago0xf0ab1a62b3ca931619d3108159f0c4010873702b IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.003897139882
0x823a69c29b5005c63b90240251a5f9bf8cf871efc83389717ace3eaced2fbcecReinvest451734492022-08-18 14:45:2611 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.00418086
0x534949d6d0593ea04df1dfbf33125973831ee6bf312692ee22d5fd8fb9be6be5Reinvest451734132022-08-18 14:44:4512 mins ago0xe4a7d73bccbae0e7398f8d437ff16b4623a5ac3a IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.005886128275
0x1e367e2efb737b4e0bb8e8677d12d5362565ff5b30b26e1ac052afcef6471544Reinvest451733342022-08-18 14:43:2013 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.00423065
0x51fdc1a369061719cfa662acb258f52a6134b036b8f112a89e24af41f484f74aReinvest451732872022-08-18 14:42:3014 mins ago0xd968665350a0bb7d487aadba94d920d8890ee06f IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004185295397
0x4bf9b2e2975e72f1a4f2a9b2b8010fe2d18011f42f511ed7337fa7d10edef00aReinvest451732352022-08-18 14:41:3415 mins ago0x6868ac68dd1b4b2b400f388346d019a606aded7e IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.00434088
0x953b745a4851648fd312a2597aa7f961a52e6b8af529148daa7de980ffbdfb64Reinvest451732332022-08-18 14:41:3215 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.00420529
0x69b2de2a02bfdf23f7d7d44f846c2b84cbfd96a1d6355fb72406685ae3d7d41dReinvest451731932022-08-18 14:40:4216 mins ago0x40c5cf51be4b6e0ad376d598e1615c156d6fc8fc IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.003978052785
0x0ee56a515268ebd91643c948ae7269be662403985871c8bd267e5e48b50f21d4Reinvest451731432022-08-18 14:39:4817 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.005076726
0x90b8f2f8f841ba8de6992348ccf7322a1ff6598b7bee6535925297d32dcefa96Reinvest451731032022-08-18 14:38:5918 mins ago0x9d7593003c0d48014a38be07ca8c312e6d32f17d IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.009857720938
0xc920fcd6f80c070d82aff464623d13b8efddbc7ec165b255fe63ebb6f6528e5aReinvest451729972022-08-18 14:36:4120 mins ago0x04b0b09e218072902de57d770ca7d6fafdaeea82 IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004230605
0xe56767d79ad93c38df43d6b2c56b7568b4f2bb122b4c9447bbbcd23edcb15718Reinvest451729512022-08-18 14:35:5121 mins ago0xf0ab1a62b3ca931619d3108159f0c4010873702b IN  0x1d1b8da1826cc7624b91c4c616ecd3fd1ca04b710 FTM0.004389115
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0xb5370a90ac35c6ed5f5a83c66cfde6077703c95614d61fe0b4751dca1fbe5fc8426143202022-07-12 18:38:4436 days 20 hrs ago 0x701e3156c4e5abe044f756936792032bb96481b9  Contract Creation0 FTM
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x92Eb021edA4C3c841d48475A3fA0310D9d5c307E

Contract Name:
SpookyV2VaultToken

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 16 : SpookyV2VaultToken.sol
pragma solidity =0.5.16;

import "@openzeppelin/contracts/ownership/Ownable.sol";
import "./PoolToken.sol";
import "./interfaces/IMasterChef.sol";
import "./interfaces/ISpookyV2VaultToken.sol";
import "./interfaces/IOptiSwap.sol";
import "./interfaces/IRewarderHelper.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IUniswapV2Router01.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./libraries/SafeToken.sol";
import "./libraries/Math.sol";

interface OptiSwapPair {
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}

interface MasterChefV2 {
    function rewarder(uint256 pid) external view returns (address);
    function lpToken(uint256 pid) external view returns (address);
}

contract SpookyV2VaultToken is ISpookyV2VaultToken, IUniswapV2Pair, PoolToken {
    using SafeToken for address;

    bool public constant isVaultToken = true;

    address public optiSwap;
    address public rewarderHelper;
    IUniswapV2Router01 public router;
    IMasterChef public masterChef;
    address public rewardsToken;
    address public WETH;
    address public token0;
    address public token1;
    uint256 public swapFeeFactor;
    uint256 public pid;
    uint256 public constant MIN_REINVEST_BOUNTY = 0.001e18;
    uint256 public constant MAX_REINVEST_BOUNTY = 0.01e18;
    uint256 public REINVEST_BOUNTY = MAX_REINVEST_BOUNTY;

    event ReinvestRewardToken(address indexed caller, address rewardToken, uint256 reward, uint256 bounty);
    event UpdateReinvestBounty(uint256 _newReinvestBounty);

    function _initialize(
        address _optiSwap,
        address _rewarderHelper,
        IUniswapV2Router01 _router,
        IMasterChef _masterChef,
        address _rewardsToken,
        uint256 _swapFeeFactor,
        uint256 _pid
    ) external {
        require(factory == address(0), "VaultToken: FACTORY_ALREADY_SET"); // sufficient check
        optiSwap = _optiSwap;
        rewarderHelper = _rewarderHelper;
        factory = msg.sender;
        _setName("Tarot Vault Token", "vTAROT");
        WETH = _router.WETH();
        router = _router;
        masterChef = _masterChef;
        swapFeeFactor = _swapFeeFactor;
        pid = _pid;
        underlying = MasterChefV2(address(masterChef)).lpToken(_pid);
        token0 = IUniswapV2Pair(underlying).token0();
        token1 = IUniswapV2Pair(underlying).token1();
        rewardsToken = _rewardsToken;
        rewardsToken.safeApprove(address(router), uint256(-1));
        WETH.safeApprove(address(router), uint256(-1));
        underlying.safeApprove(address(masterChef), uint256(-1));
    }

    function updateReinvestBounty(uint256 _newReinvestBounty) external onlyFactoryOwner {
        require(_newReinvestBounty >= MIN_REINVEST_BOUNTY && _newReinvestBounty <= MAX_REINVEST_BOUNTY, "VaultToken: INVLD_REINVEST_BOUNTY");
        REINVEST_BOUNTY = _newReinvestBounty;

        emit UpdateReinvestBounty(_newReinvestBounty);
    }

    function getRewardTokenInfo()
        public
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory pendingAmounts,
            uint256[] memory rewardRates
        ) {
            MasterChefV2 masterChefV2 = MasterChefV2(address(masterChef));
            address rewarder = masterChefV2.rewarder(pid);
            if (rewarder != address(0)) {
                return IRewarderHelper(rewarderHelper).getRewardTokenInfo(rewarder, address(this));
            }
        }

    function getRewardTokenInfoWithBalances()
        public
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory pendingAmounts,
            uint256[] memory rewardRates,
            uint256[] memory balances
        ) {
            MasterChefV2 masterChefV2 = MasterChefV2(address(masterChef));
            address rewarder = masterChefV2.rewarder(pid);
            if (rewarder != address(0)) {
                (rewardTokens, pendingAmounts, rewardRates) = IRewarderHelper(rewarderHelper).getRewardTokenInfo(rewarder, address(this));
                balances = new uint256[](rewardTokens.length);
                for (uint256 i = 0; i < rewardTokens.length; i++) {
                    balances[i] = rewardTokens[i].myBalance();
                }
            }
        }

    /*** PoolToken Overrides ***/

    function _update() internal {
        (uint256 _totalBalance, ) = 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 (uint256 mintTokens)
    {
        uint256 mintAmount = underlying.myBalance();
        // handle pools with deposit fees by checking balance before and after deposit
        (uint256 _totalBalanceBefore, ) = masterChef.userInfo(
            pid,
            address(this)
        );
        masterChef.deposit(pid, mintAmount);
        (uint256 _totalBalanceAfter, ) = 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, "VaultToken: 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 (uint256 redeemAmount)
    {
        uint256 redeemTokens = balanceOf[address(this)];
        redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18);

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

    /*** Reinvest ***/

    function _optimalDepositA(
        uint256 _amountA,
        uint256 _reserveA,
        uint256 _swapFeeFactor
    ) internal pure returns (uint256) {
        uint256 a = uint256(1000).add(_swapFeeFactor).mul(_reserveA);
        uint256 b = _amountA.mul(1000).mul(_reserveA).mul(4).mul(
            _swapFeeFactor
        );
        uint256 c = Math.sqrt(a.mul(a).add(b));
        uint256 d = uint256(2).mul(_swapFeeFactor);
        return c.sub(a).div(d);
    }

    function approveRouter(address token, uint256 amount) internal {
        if (IERC20(token).allowance(address(this), address(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);
        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) = router.addLiquidity(
            tokenA,
            tokenB,
            amountA,
            amountB,
            0,
            0,
            address(this),
            now
        );
    }

    function swapTokensForBestAmountOut(
        IOptiSwap _optiSwap,
        address tokenIn,
        address tokenOut,
        uint256 amountIn
    ) internal returns (uint256 amountOut) {
        if (tokenIn == tokenOut) {
            return amountIn;
        }
        address pair;
        (pair, amountOut) = _optiSwap.getBestAmountOut(amountIn, tokenIn, tokenOut);
        require(pair != address(0), "NO_PAIR");
        tokenIn.safeTransfer(pair, amountIn);
        if (tokenIn < tokenOut) {
            OptiSwapPair(pair).swap(0, amountOut, address(this), new bytes(0));
        } else {
            OptiSwapPair(pair).swap(amountOut, 0, address(this), new bytes(0));
        }
    }

    function optiSwapExactTokensForTokens(
        address tokenIn,
        address tokenOut,
        uint256 amountIn
    ) internal returns (uint256 amountOut) {
        if (tokenIn == tokenOut) {
            return amountIn;
        }
        IOptiSwap _optiSwap = IOptiSwap(optiSwap);
        address nextHop = _optiSwap.getBridgeToken(tokenIn);
        if (nextHop == tokenOut) {
            return swapTokensForBestAmountOut(_optiSwap, tokenIn, tokenOut, amountIn);
        }
        address waypoint = _optiSwap.getBridgeToken(tokenOut);
        if (tokenIn == waypoint) {
            return swapTokensForBestAmountOut(_optiSwap, tokenIn, tokenOut, amountIn);
        }
        uint256 hopAmountOut;
        if (nextHop != tokenIn) {
            hopAmountOut = swapTokensForBestAmountOut(_optiSwap, tokenIn, nextHop, amountIn);
        } else {
            hopAmountOut = amountIn;
        }
        if (nextHop == waypoint) {
            return swapTokensForBestAmountOut(_optiSwap, nextHop, tokenOut, hopAmountOut);
        } else if (waypoint == tokenOut) {
            return optiSwapExactTokensForTokens(nextHop, tokenOut, hopAmountOut);
        } else {
            uint256 waypointAmountOut = optiSwapExactTokensForTokens(nextHop, waypoint, hopAmountOut);
            return swapTokensForBestAmountOut(_optiSwap, waypoint, tokenOut, waypointAmountOut);
        }
    }

    function reinvest() external nonReentrant update {
        require(msg.sender == tx.origin);
        // 1. Withdraw all the rewards.
        masterChef.withdraw(pid, 0);

        uint256 liquidity = reinvestOne(rewardsToken);
        (address[] memory rewardTokens, ,) = getRewardTokenInfo();
        for (uint256 i = 0; i < rewardTokens.length; i++) {
            liquidity += reinvestOne(rewardTokens[i]);
        }

        // 5. Stake the LP Tokens.
        masterChef.deposit(pid, liquidity);
    }

    function reinvestOne(address _rewardToken) internal returns (uint256 liquidity) {
        uint256 reward = _rewardToken.myBalance();
        if (reward == 0) return 0;
        // 2. Send the reward bounty to the caller.
        uint256 bounty = reward.mul(REINVEST_BOUNTY) / 1e18;
        _rewardToken.safeTransfer(msg.sender, bounty);
        // 3. Convert all the remaining rewards to token0 or token1.
        address tokenA;
        address tokenB;
        if (token0 == _rewardToken || token1 == _rewardToken) {
            (tokenA, tokenB) = token0 == _rewardToken
                ? (token0, token1)
                : (token1, token0);
        } else {
            if (token1 == WETH) {
                (tokenA, tokenB) = (token1, token0);
            } else {
                (tokenA, tokenB) = (token0, token1);
            }
            optiSwapExactTokensForTokens(_rewardToken, tokenA, reward.sub(bounty));
        }
        // 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,
            swapFeeFactor
        );
        uint256 balanceBeforeB = tokenB.myBalance();
        swapExactTokensForTokens(tokenA, tokenB, swapAmount);
        uint256 balanceAfterB = tokenB.myBalance();
        uint256 deltaB = balanceAfterB.sub(balanceBeforeB);
        liquidity = addLiquidity(
            tokenA,
            tokenB,
            totalAmountA.sub(swapAmount),
            deltaB
        );
        emit ReinvestRewardToken(msg.sender, _rewardToken, 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,
            "VaultToken: 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(uint256 n) internal pure returns (uint112) {
        require(n < 2**112, "VaultToken: SAFE112");
        return uint112(n);
    }

    /*** Modifiers ***/

    modifier onlyFactoryOwner() {
        require(Ownable(factory).owner() == msg.sender, "NOT_AUTHORIZED");
        _;
    }
}

File 2 of 16 : Ownable.sol
pragma solidity ^0.5.0;

import "../GSN/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * 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(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _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 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 onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 16 : PoolToken.sol
pragma solidity =0.5.16;

import "./TarotERC20.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IPoolToken.sol";
import "./libraries/SafeMath.sol";

contract PoolToken is IPoolToken, TarotERC20 {
    uint256 internal constant initialExchangeRate = 1e18;
    address public underlying;
    address public factory;
    uint256 public totalBalance;
    uint256 public constant MINIMUM_LIQUIDITY = 1000;

    event Mint(
        address indexed sender,
        address indexed minter,
        uint256 mintAmount,
        uint256 mintTokens
    );
    event Redeem(
        address indexed sender,
        address indexed redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    );
    event Sync(uint256 totalBalance);

    /*** Initialize ***/

    // called once by the factory
    function _setFactory() external {
        require(factory == address(0), "Tarot: FACTORY_ALREADY_SET");
        factory = msg.sender;
    }

    /*** PoolToken ***/

    function _update() internal {
        totalBalance = IERC20(underlying).balanceOf(address(this));
        emit Sync(totalBalance);
    }

    function exchangeRate() public view returns (uint256) {
        uint256 _totalSupply = totalSupply; // gas savings
        uint256 _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 (uint256 mintTokens)
    {
        uint256 balance = IERC20(underlying).balanceOf(address(this));
        uint256 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, "Tarot: 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 (uint256 redeemAmount)
    {
        uint256 redeemTokens = balanceOf[address(this)];
        redeemAmount = redeemTokens.mul(exchangeRate()).div(1e18);

        require(redeemAmount > 0, "Tarot: REDEEM_AMOUNT_ZERO");
        require(redeemAmount <= totalBalance, "Tarot: 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, uint256 amount) internal {
        (bool success, bytes memory data) = underlying.call(
            abi.encodeWithSelector(SELECTOR, to, amount)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "Tarot: TRANSFER_FAILED"
        );
    }

    // prevents a contract from calling itself, directly or indirectly.
    bool internal _notEntered = true;
    modifier nonReentrant() {
        require(_notEntered, "Tarot: REENTERED");
        _notEntered = false;
        _;
        _notEntered = true;
    }

    // update totalBalance with current balance
    modifier update() {
        _;
        _update();
    }
}

File 4 of 16 : IMasterChef.sol
pragma solidity 0.5.16;

import "./IERC20.sol";

// Making the original MasterChef as an interface leads to compilation fail.
// Use Contract instead of Interface here
contract IMasterChef {
    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool. Reward tokens to distribute per block.
        uint256 lastRewardBlock; // Last block number that reward token distribution occurs.
        uint256 accRewardTokenPerShare; // Accumulated reward tokens per share, times 1e12. See below.
    }

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

    // Deposit LP tokens to MasterChef.
    function deposit(uint256 _pid, uint256 _amount) external {}

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) external {}
}

File 5 of 16 : ISpookyV2VaultToken.sol
pragma solidity >=0.5.0;

import "./IMasterChef.sol";
import "./IUniswapV2Router01.sol";

interface ISpookyV2VaultToken {
    /*** Tarot ERC20 ***/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 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 (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 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 (uint256);

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

    /*** Pool Token ***/

    event Mint(
        address indexed sender,
        address indexed minter,
        uint256 mintAmount,
        uint256 mintTokens
    );
    event Redeem(
        address indexed sender,
        address indexed redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    );
    event Sync(uint256 totalBalance);

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external view returns (uint256);

    function mint(address minter) external returns (uint256 mintTokens);

    function redeem(address redeemer) external returns (uint256 redeemAmount);

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;

    /*** VaultToken ***/

    event Reinvest(address indexed caller, uint256 reward, uint256 bounty);

    function isVaultToken() external pure returns (bool);

    function router() external view returns (IUniswapV2Router01);

    function masterChef() external view returns (IMasterChef);

    function rewardsToken() external view returns (address);

    function WETH() external view returns (address);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function swapFeeFactor() external view returns (uint256);

    function pid() external view returns (uint256);

    function REINVEST_BOUNTY() external pure returns (uint256);

    function getReserves()
        external
        view
        returns (
            uint112 reserve0,
            uint112 reserve1,
            uint32 blockTimestampLast
        );

    function price0CumulativeLast() external view returns (uint256);

    function price1CumulativeLast() external view returns (uint256);

    function _initialize(
        address _optiSwap,
        address _rewarderHelper,
        IUniswapV2Router01 _router,
        IMasterChef _masterChef,
        address _rewardsToken,
        uint256 _swapFeeFactor,
        uint256 _pid
    ) external;

    function reinvest() external;
}

File 6 of 16 : IOptiSwap.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IOptiSwap {
    function weth() external view returns (address);

    function bridgeFromTokens(uint256 index) external view returns (address token);

    function bridgeFromTokensLength() external view returns (uint256);

    function getBridgeToken(address _token) external view returns (address bridgeToken);

    function addBridgeToken(address _token, address _bridgeToken) external;

    function getDexInfo(uint256 index) external view returns (address dex, address handler);

    function dexListLength() external view returns (uint256);

    function indexOfDex(address _dex) external view returns (uint256);

    function getDexEnabled(address _dex) external view returns (bool);

    function addDex(address _dex, address _handler) external;

    function removeDex(address _dex) external;

    function getBestAmountOut(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (address pair, uint256 amountOut);
}

File 7 of 16 : IRewarderHelper.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

interface IRewarderHelper {
    function getRewardTokenInfo(address _rewarder, address _vaultToken)
        external
        view
        returns (
            address[] memory rewardTokens,
            uint256[] memory pendingAmounts,
            uint256[] memory rewardRates
        );
}

File 8 of 16 : IERC20.sol
pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 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 (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool);
}

File 9 of 16 : IUniswapV2Router01.sol
pragma solidity >=0.5.0;

interface IUniswapV2Router01 {
    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
    ) external returns (uint256[] memory amounts);

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

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

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

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

    function swapETHForExactTokens(
        uint256 amountOut,
        address[] calldata path,
        address to,
        uint256 deadline
    ) 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);
}

File 10 of 16 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

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

    function totalSupply() external view returns (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 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 (uint256);

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

File 11 of 16 : 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 12 of 16 : 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(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

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

File 13 of 16 : Context.sol
pragma solidity ^0.5.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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 14 of 16 : TarotERC20.sol
pragma solidity =0.5.16;

import "./libraries/SafeMath.sol";

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

contract TarotERC20 {
    using SafeMath for uint256;

    string public name;
    string public symbol;
    uint8 public decimals = 18;
    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) public allowance;

    bytes32 public DOMAIN_SEPARATOR;
    mapping(address => uint256) public nonces;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    constructor() public {}

    function _setName(string memory _name, string memory _symbol) internal {
        name = _name;
        symbol = _symbol;
        uint256 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, uint256 value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(address(0), to, value);
    }

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

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

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

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

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

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool) {
        if (allowance[from][msg.sender] != uint256(-1)) {
            allowance[from][msg.sender] = allowance[from][msg.sender].sub(
                value,
                "Tarot: TRANSFER_NOT_ALLOWED"
            );
        }
        _transfer(from, to, value);
        return true;
    }

    function _checkSignature(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s,
        bytes32 typehash
    ) internal {
        require(deadline >= block.timestamp, "Tarot: 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,
            "Tarot: 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,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        _checkSignature(
            owner,
            spender,
            value,
            deadline,
            v,
            r,
            s,
            PERMIT_TYPEHASH
        );
        _approve(owner, spender, value);
    }
}

File 15 of 16 : IPoolToken.sol
pragma solidity >=0.5.0;

interface IPoolToken {
    /*** Tarot ERC20 ***/

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 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 (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 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 (uint256);

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

    /*** Pool Token ***/

    event Mint(
        address indexed sender,
        address indexed minter,
        uint256 mintAmount,
        uint256 mintTokens
    );
    event Redeem(
        address indexed sender,
        address indexed redeemer,
        uint256 redeemAmount,
        uint256 redeemTokens
    );
    event Sync(uint256 totalBalance);

    function underlying() external view returns (address);

    function factory() external view returns (address);

    function totalBalance() external view returns (uint256);

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

    function exchangeRate() external view returns (uint256);

    function mint(address minter) external returns (uint256 mintTokens);

    function redeem(address redeemer) external returns (uint256 redeemAmount);

    function skim(address to) external;

    function sync() external;

    function _setFactory() external;
}

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintTokens","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bounty","type":"uint256"}],"name":"Reinvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bounty","type":"uint256"}],"name":"ReinvestRewardToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"totalBalance","type":"uint256"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_newReinvestBounty","type":"uint256"}],"name":"UpdateReinvestBounty","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_REINVEST_BOUNTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MIN_REINVEST_BOUNTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"REINVEST_BOUNTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_optiSwap","type":"address"},{"internalType":"address","name":"_rewarderHelper","type":"address"},{"internalType":"contract IUniswapV2Router01","name":"_router","type":"address"},{"internalType":"contract IMasterChef","name":"_masterChef","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"_swapFeeFactor","type":"uint256"},{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"_initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"_setFactory","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"reserve0","type":"uint112"},{"internalType":"uint112","name":"reserve1","type":"uint112"},{"internalType":"uint32","name":"blockTimestampLast","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRewardTokenInfo","outputs":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint256[]","name":"pendingAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"rewardRates","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getRewardTokenInfoWithBalances","outputs":[{"internalType":"address[]","name":"rewardTokens","type":"address[]"},{"internalType":"uint256[]","name":"pendingAmounts","type":"uint256[]"},{"internalType":"uint256[]","name":"rewardRates","type":"uint256[]"},{"internalType":"uint256[]","name":"balances","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isVaultToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"masterChef","outputs":[{"internalType":"contract IMasterChef","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"mintTokens","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"optiSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price0CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"price1CumulativeLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"redeemer","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"reinvest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewarderHelper","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":"contract IUniswapV2Router01","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"swapFeeFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_newReinvestBounty","type":"uint256"}],"name":"updateReinvestBounty","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

60806040526002805460ff19908116601217909155600b80549091166001179055662386f26fc10000601555613e0d8061003a6000396000f3fe608060405234801561001057600080fd5b506004361061027f5760003560e01c80636f307dc31161015c578063bc25cf77116100ce578063d505accf11610087578063d505accf14610827578063dd62ed3e14610878578063f1068454146108a6578063f887ea40146108ae578063fdb5a03e146108b6578063fff6cae9146108be5761027f565b8063bc25cf771461078f578063c45a0155146107b5578063c815a88a146107bd578063c8c4ff8c1461080f578063d1af0c7d14610817578063d21220a71461081f5761027f565b806395d89b411161012057806395d89b411461073b57806396fa4c1114610743578063a9059cbb1461074b578063ad5c464814610777578063ad7a672f1461077f578063ba9a7a56146107875761027f565b80636f307dc31461059657806370a082311461059e5780637ecebe00146105c4578063885f3ee6146105ea57806395a2251f146107155761027f565b806346fb738b116101f557806360c2affa116101b957806360c2affa1461046a578063647428b91461047257806368f91a44146105585780636a627842146105605780636c2a3bc5146105865780636ee272271461058e5761027f565b806346fb738b1461042b5780634a5d316c1461044a578063575a86b2146104525780635909c0d51461045a5780635a3d5493146104625761027f565b806318160ddd1161024757806318160ddd146103a557806323b872dd146103bf57806330adf81f146103f5578063313ce567146103fd5780633644e5151461041b5780633ba0b9a9146104235761027f565b8063024907681461028457806306fdde03146102a85780630902f1ac14610325578063095ea7b31461035d5780630dfe16811461039d575b600080fd5b61028c6108c6565b604080516001600160a01b039092168252519081900360200190f35b6102b06108d5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102ea5781810151838201526020016102d2565b50505050905090810190601f1680156103175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61032d610963565b604080516001600160701b03948516815292909316602083015263ffffffff168183015290519081900360600190f35b6103896004803603604081101561037357600080fd5b506001600160a01b038135169060200135610b33565b604080519115158252519081900360200190f35b61028c610b4a565b6103ad610b59565b60408051918252519081900360200190f35b610389600480360360608110156103d557600080fd5b506001600160a01b03813581169160208101359091169060400135610b5f565b6103ad610c2f565b610405610c53565b6040805160ff9092168252519081900360200190f35b6103ad610c5c565b6103ad610c62565b6104486004803603602081101561044157600080fd5b5035610cb2565b005b610448610e02565b61028c610e74565b6103ad610e83565b6103ad610ef9565b61028c610f3e565b61047a610f52565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b838110156104c25781810151838201526020016104aa565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156105015781810151838201526020016104e9565b50505050905001848103825285818151815260200191508051906020019060200280838360005b83811015610540578181015183820152602001610528565b50505050905001965050505050505060405180910390f35b6103ad61121d565b6103ad6004803603602081101561057657600080fd5b50356001600160a01b0316611223565b6103ad61152e565b610389611534565b61028c611539565b6103ad600480360360208110156105b457600080fd5b50356001600160a01b0316611548565b6103ad600480360360208110156105da57600080fd5b50356001600160a01b031661155a565b6105f261156c565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b8381101561063e578181015183820152602001610626565b50505050905001858103845288818151815260200191508051906020019060200280838360005b8381101561067d578181015183820152602001610665565b50505050905001858103835287818151815260200191508051906020019060200280838360005b838110156106bc5781810151838201526020016106a4565b50505050905001858103825286818151815260200191508051906020019060200280838360005b838110156106fb5781810151838201526020016106e3565b505050509050019850505050505050505060405180910390f35b6103ad6004803603602081101561072b57600080fd5b50356001600160a01b03166118bd565b6102b0611aca565b6103ad611b24565b6103896004803603604081101561076157600080fd5b506001600160a01b038135169060200135611b2f565b61028c611b3c565b6103ad611b4b565b6103ad611b51565b610448600480360360208110156107a557600080fd5b50356001600160a01b0316611b57565b61028c611c51565b610448600480360360e08110156107d357600080fd5b506001600160a01b0381358116916020810135821691604082013581169160608101358216916080820135169060a08101359060c00135611c60565b6103ad612008565b61028c612013565b61028c612022565b610448600480360360e081101561083d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135612031565b6103ad6004803603604081101561088e57600080fd5b506001600160a01b038135811691602001351661206c565b6103ad612089565b61028c61208f565b61044861209e565b610448612253565b600c546001600160a01b031681565b6000805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561095b5780601f106109305761010080835404028352916020019161095b565b820191906000526020600020905b81548152906001019060200180831161093e57829003601f168201915b505050505081565b6000806000600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156109b657600080fd5b505afa1580156109ca573d6000803e3d6000fd5b505050506040513d60608110156109e057600080fd5b5080516020820151604090920151600354919550919350909150610a0357610b2e565b600a54600854604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015610a4b57600080fd5b505afa158015610a5f573d6000803e3d6000fd5b505050506040513d6020811015610a7557600080fd5b50519050610aaa610aa582610a99856001600160701b038a1663ffffffff6122af16565b9063ffffffff61230816565b61234a565b9450610acc610aa582610a99856001600160701b03891663ffffffff6122af16565b93506064856001600160701b0316118015610af057506064846001600160701b0316115b610b2b5760405162461bcd60e51b8152600401808060200182810382526021815260200180613db86021913960400191505060405180910390fd5b50505b909192565b6000610b403384846123a2565b5060015b92915050565b6011546001600160a01b031681565b60035481565b6001600160a01b038316600090815260056020908152604080832033845290915281205460001914610c1957604080518082018252601b81527f5461726f743a205452414e534645525f4e4f545f414c4c4f57454400000000006020808301919091526001600160a01b0387166000908152600582528381203382529091529190912054610bf491849063ffffffff61240416565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b610c2484848461249b565b5060015b9392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60025460ff1681565b60065481565b600354600a5460009190811580610c77575080155b15610c8e57670de0b6b3a764000092505050610caf565b610caa82610a9983670de0b6b3a764000063ffffffff6122af16565b925050505b90565b60095460408051638da5cb5b60e01b8152905133926001600160a01b031691638da5cb5b916004808301926020929190829003018186803b158015610cf657600080fd5b505afa158015610d0a573d6000803e3d6000fd5b505050506040513d6020811015610d2057600080fd5b50516001600160a01b031614610d6e576040805162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015290519081900360640190fd5b66038d7ea4c680008110158015610d8c5750662386f26fc100008111155b610dc75760405162461bcd60e51b8152600401808060200182810382526021815260200180613d976021913960400191505060405180910390fd5b60158190556040805182815290517ffa1e13889c5c5294758f01f045a83de15feca61a17e6281f4d11a5110085d9329181900360200190a150565b6009546001600160a01b031615610e60576040805162461bcd60e51b815260206004820152601a60248201527f5461726f743a20464143544f52595f414c52454144595f534554000000000000604482015290519081900360640190fd5b600980546001600160a01b03191633179055565b600e546001600160a01b031681565b60085460408051635909c0d560e01b815290516000926001600160a01b031691635909c0d5916004808301926020929190829003018186803b158015610ec857600080fd5b505afa158015610edc573d6000803e3d6000fd5b505050506040513d6020811015610ef257600080fd5b5051905090565b60085460408051635a3d549360e01b815290516000926001600160a01b031691635a3d5493916004808301926020929190829003018186803b158015610ec857600080fd5b600b5461010090046001600160a01b031681565b600e546014546040805163c346253d60e01b8152600481019290925251606092839283926001600160a01b0390921691600091839163c346253d91602480820192602092909190829003018186803b158015610fad57600080fd5b505afa158015610fc1573d6000803e3d6000fd5b505050506040513d6020811015610fd757600080fd5b505190506001600160a01b03811615610b2b57600c546040805163bab5705b60e01b81526001600160a01b0384811660048301523060248301529151919092169163bab5705b916044808301926000929190829003018186803b15801561103d57600080fd5b505afa158015611051573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052606081101561107a57600080fd5b8101908080516040519392919084600160201b82111561109957600080fd5b9083019060208201858111156110ae57600080fd5b82518660208202830111600160201b821117156110ca57600080fd5b82525081516020918201928201910280838360005b838110156110f75781810151838201526020016110df565b5050505090500160405260200180516040519392919084600160201b82111561111f57600080fd5b90830190602082018581111561113457600080fd5b82518660208202830111600160201b8211171561115057600080fd5b82525081516020918201928201910280838360005b8381101561117d578181015183820152602001611165565b5050505090500160405260200180516040519392919084600160201b8211156111a557600080fd5b9083019060208201858111156111ba57600080fd5b82518660208202830111600160201b821117156111d657600080fd5b82525081516020918201928201910280838360005b838110156112035781810151838201526020016111eb565b505050509050016040525050509450945094505050610b2e565b60135481565b600b5460009060ff16611270576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600854600090611292906001600160a01b031661258d565b600e54601454604080516393f1a40b60e01b8152600481019290925230602483015280519394506000936001600160a01b03909316926393f1a40b926044808201939291829003018186803b1580156112ea57600080fd5b505afa1580156112fe573d6000803e3d6000fd5b505050506040513d604081101561131457600080fd5b5051600e5460145460408051631c57762b60e31b8152600481019290925260248201869052519293506001600160a01b039091169163e2bbb1589160448082019260009290919082900301818387803b15801561137057600080fd5b505af1158015611384573d6000803e3d6000fd5b5050600e54601454604080516393f1a40b60e01b815260048101929092523060248301528051600095506001600160a01b0390931693506393f1a40b92604480840193829003018186803b1580156113db57600080fd5b505afa1580156113ef573d6000803e3d6000fd5b505050506040513d604081101561140557600080fd5b5051905061143c611414610c62565b610a99670de0b6b3a7640000611430858763ffffffff61260916565b9063ffffffff6122af16565b93506003546000141561146a5761145b846103e863ffffffff61260916565b935061146a60006103e861264b565b600084116114bf576040805162461bcd60e51b815260206004820152601c60248201527f5661756c74546f6b656e3a204d494e545f414d4f554e545f5a45524f00000000604482015290519081900360640190fd5b6114c9858561264b565b604080518481526020810186905281516001600160a01b0388169233927f2f00e3cdd69a77be7ed215ec7b2a36784dd158f921fca79ac29deffa353fe6ee929081900390910190a350505061151c6126e2565b600b805460ff19166001179055919050565b60155481565b600181565b6008546001600160a01b031681565b60046020526000908152604090205481565b60076020526000908152604090205481565b600e546014546040805163c346253d60e01b81526004810192909252516060928392839283926001600160a01b031691600091839163c346253d916024808301926020929190829003018186803b1580156115c657600080fd5b505afa1580156115da573d6000803e3d6000fd5b505050506040513d60208110156115f057600080fd5b505190506001600160a01b038116156118b557600c546040805163bab5705b60e01b81526001600160a01b0384811660048301523060248301529151919092169163bab5705b916044808301926000929190829003018186803b15801561165657600080fd5b505afa15801561166a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052606081101561169357600080fd5b8101908080516040519392919084600160201b8211156116b257600080fd5b9083019060208201858111156116c757600080fd5b82518660208202830111600160201b821117156116e357600080fd5b82525081516020918201928201910280838360005b838110156117105781810151838201526020016116f8565b5050505090500160405260200180516040519392919084600160201b82111561173857600080fd5b90830190602082018581111561174d57600080fd5b82518660208202830111600160201b8211171561176957600080fd5b82525081516020918201928201910280838360005b8381101561179657818101518382015260200161177e565b5050505090500160405260200180516040519392919084600160201b8211156117be57600080fd5b9083019060208201858111156117d357600080fd5b82518660208202830111600160201b821117156117ef57600080fd5b82525081516020918201928201910280838360005b8381101561181c578181015183820152602001611804565b505050509050016040525050508096508197508298505050508551604051908082528060200260200182016040528015611860578160200160208202803883390190505b50925060005b86518110156118b35761189487828151811061187e57fe5b60200260200101516001600160a01b031661258d565b8482815181106118a057fe5b6020908102919091010152600101611866565b505b505090919293565b600b5460009060ff1661190a576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff1916905530600090815260046020526040902054611948670de0b6b3a7640000610a9961193b610c62565b849063ffffffff6122af16565b91506000821161199f576040805162461bcd60e51b815260206004820152601e60248201527f5661756c74546f6b656e3a2052454445454d5f414d4f554e545f5a45524f0000604482015290519081900360640190fd5b600a548211156119f6576040805162461bcd60e51b815260206004820152601d60248201527f5661756c74546f6b656e3a20494e53554646494349454e545f43415348000000604482015290519081900360640190fd5b611a0030826127a0565b600e5460145460408051630441a3e760e41b8152600481019290925260248201859052516001600160a01b039092169163441a3e709160448082019260009290919082900301818387803b158015611a5757600080fd5b505af1158015611a6b573d6000803e3d6000fd5b50505050611a79838361283d565b604080518381526020810183905281516001600160a01b0386169233927f3f693fff038bb8a046aa76d9516190ac7444f7d69cf952c4cbdc086fdef2d6fc929081900390910190a35061151c6126e2565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561095b5780601f106109305761010080835404028352916020019161095b565b66038d7ea4c6800081565b6000610b4033848461249b565b6010546001600160a01b031681565b600a5481565b6103e881565b600b5460ff16611ba1576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff19169055600a54600854604080516370a0823160e01b81523060048201529051611c41938593611c3c9391926001600160a01b03909116916370a08231916024808301926020929190829003018186803b158015611c0457600080fd5b505afa158015611c18573d6000803e3d6000fd5b505050506040513d6020811015611c2e57600080fd5b50519063ffffffff61260916565b61283d565b50600b805460ff19166001179055565b6009546001600160a01b031681565b6009546001600160a01b031615611cbe576040805162461bcd60e51b815260206004820152601f60248201527f5661756c74546f6b656e3a20464143544f52595f414c52454144595f53455400604482015290519081900360640190fd5b600b80546001600160a01b03808a1661010002610100600160a81b031990921691909117909155600c80549188166001600160a01b0319928316179055600980549091163317905560408051808201825260118152702a30b937ba102b30bab63a102a37b5b2b760791b602080830191909152825180840190935260068352651d95105493d560d21b90830152611d54916129cf565b846001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611d8d57600080fd5b505afa158015611da1573d6000803e3d6000fd5b505050506040513d6020811015611db757600080fd5b5051601080546001600160a01b03199081166001600160a01b0393841617909155600d80548216888416179055600e8054909116868316179081905560138490556014839055604080516378ed5d1f60e01b815260048101859052905191909216916378ed5d1f916024808301926020929190829003018186803b158015611e3e57600080fd5b505afa158015611e52573d6000803e3d6000fd5b505050506040513d6020811015611e6857600080fd5b5051600880546001600160a01b0319166001600160a01b03928316179081905560408051630dfe168160e01b815290519190921691630dfe1681916004808301926020929190829003018186803b158015611ec257600080fd5b505afa158015611ed6573d6000803e3d6000fd5b505050506040513d6020811015611eec57600080fd5b5051601180546001600160a01b0319166001600160a01b039283161790556008546040805163d21220a760e01b81529051919092169163d21220a7916004808301926020929190829003018186803b158015611f4757600080fd5b505afa158015611f5b573d6000803e3d6000fd5b505050506040513d6020811015611f7157600080fd5b5051601280546001600160a01b03199081166001600160a01b0393841617909155600f80549091168583161790819055600d54611fb5929182169116600019612a97565b600d54601054611fda916001600160a01b03918216911660001963ffffffff612a9716565b600e54600854611fff916001600160a01b03918216911660001963ffffffff612a9716565b50505050505050565b662386f26fc1000081565b600f546001600160a01b031681565b6012546001600160a01b031681565b612061878787878787877f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9612bf0565b611fff8787876123a2565b600560209081526000928352604080842090915290825290205481565b60145481565b600d546001600160a01b031681565b600b5460ff166120e8576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff191690553332146120fe57600080fd5b600e5460145460408051630441a3e760e41b8152600481019290925260006024830181905290516001600160a01b039093169263441a3e7092604480820193929182900301818387803b15801561215457600080fd5b505af1158015612168573d6000803e3d6000fd5b5050600f546000925061218491506001600160a01b0316612dc5565b90506060612190610f52565b50909150600090505b81518110156121ca576121be8282815181106121b157fe5b6020026020010151612dc5565b90920191600101612199565b50600e5460145460408051631c57762b60e31b8152600481019290925260248201859052516001600160a01b039092169163e2bbb1589160448082019260009290919082900301818387803b15801561222257600080fd5b505af1158015612236573d6000803e3d6000fd5b5050505050506122446126e2565b600b805460ff19166001179055565b600b5460ff1661229d576040805162461bcd60e51b815260206004820152601060248201526f15185c9bdd0e8814915153951154915160821b604482015290519081900360640190fd5b600b805460ff191690556122446126e2565b6000826122be57506000610b44565b828202828482816122cb57fe5b0414610c285760405162461bcd60e51b8152600401808060200182810382526021815260200180613d766021913960400191505060405180910390fd5b6000610c2883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506130d6565b6000600160701b821061239a576040805162461bcd60e51b81526020600482015260136024820152722b30bab63a2a37b5b2b71d1029a0a32298989960691b604482015290519081900360640190fd5b50805b919050565b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600081848411156124935760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612458578181015183820152602001612440565b50505050905090810190601f1680156124855780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b604080518082018252601881527f5461726f743a205452414e534645525f544f4f5f4849474800000000000000006020808301919091526001600160a01b0386166000908152600490915291909120546124fc91839063ffffffff61240416565b6001600160a01b038085166000908152600460205260408082209390935590841681522054612531908263ffffffff61313b16565b6001600160a01b0380841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b1580156125d757600080fd5b505afa1580156125eb573d6000803e3d6000fd5b505050506040513d602081101561260157600080fd5b505192915050565b6000610c2883836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250612404565b60035461265e908263ffffffff61313b16565b6003556001600160a01b03821660009081526004602052604090205461268a908263ffffffff61313b16565b6001600160a01b03831660008181526004602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600e54601454604080516393f1a40b60e01b8152600481019290925230602483015280516000936001600160a01b0316926393f1a40b926044808301939192829003018186803b15801561273557600080fd5b505afa158015612749573d6000803e3d6000fd5b505050506040513d604081101561275f57600080fd5b5051600a8190556040805182815290519192507f8a0df8ef054fae2c3d2d19a7b322e864870cc9fd3cb07fb9526309c596244bf4919081900360200190a150565b6001600160a01b0382166000908152600460205260409020546127c9908263ffffffff61260916565b6001600160a01b0383166000908152600460205260409020556003546127f5908263ffffffff61260916565b6003556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600854604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0386811660248301526044808301879052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1781529251815160009560609594169382918083835b602083106128ea5780518252601f1990920191602091820191016128cb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461294c576040519150601f19603f3d011682016040523d82523d6000602084013e612951565b606091505b509150915081801561297f57508051158061297f575080806020019051602081101561297c57600080fd5b50515b6129c9576040805162461bcd60e51b815260206004820152601660248201527515185c9bdd0e881514905394d1915497d1905253115160521b604482015290519081900360640190fd5b50505050565b81516129e2906000906020850190613c8b565b5080516129f6906001906020840190613c8b565b506040514690806052613d248239604080519182900360520182208651602097880120838301835260018452603160f81b93880193909352815180880191909152808201929092527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606083015260808201939093523060a0808301919091528351808303909101815260c090910190925250805192019190912060065550565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663095ea7b360e01b178152925182516000946060949389169392918291908083835b60208310612b145780518252601f199092019160209182019101612af5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612b76576040519150601f19603f3d011682016040523d82523d6000602084013e612b7b565b606091505b5091509150818015612ba9575080511580612ba95750808060200190516020811015612ba657600080fd5b50515b612be9576040805162461bcd60e51b815260206004820152600c60248201526b2173616665417070726f766560a01b604482015290519081900360640190fd5b5050505050565b42851015612c36576040805162461bcd60e51b815260206004820152600e60248201526d15185c9bdd0e881156141254915160921b604482015290519081900360640190fd5b6006546001600160a01b03808a1660008181526007602090815260408083208054600180820190925582518085018a905280840196909652958e166060860152608085018d905260a085019590955260c08085018c90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff8a166101828501526101a284018990526101c28401889052519193926101e280820193601f1981019281900390910190855afa158015612d32573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590612d685750896001600160a01b0316816001600160a01b0316145b612db9576040805162461bcd60e51b815260206004820152601860248201527f5461726f743a20494e56414c49445f5349474e41545552450000000000000000604482015290519081900360640190fd5b50505050505050505050565b600080612dda836001600160a01b031661258d565b905080612deb57600091505061239d565b6000670de0b6b3a7640000612e0b601554846122af90919063ffffffff16565b81612e1257fe5b049050612e2f6001600160a01b038516338363ffffffff61319516565b60115460009081906001600160a01b0387811691161480612e5d57506012546001600160a01b038781169116145b15612ead576011546001600160a01b03878116911614612e8f576012546011546001600160a01b039182169116612ea3565b6011546012546001600160a01b0391821691165b9092509050612f12565b6010546012546001600160a01b0390811691161415612ee05750506012546011546001600160a01b039182169116612ef6565b50506011546012546001600160a01b0391821691165b612f108683612f0b878763ffffffff61260916565b6132e8565b505b6000612f26836001600160a01b031661258d565b905060008111612f3257fe5b600080600860009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015612f8357600080fd5b505afa158015612f97573d6000803e3d6000fd5b505050506040513d6060811015612fad57600080fd5b5080516020909101516011546001600160701b039283169450911691506000906001600160a01b03878116911614612fe55781612fe7565b825b90506000612ff88583601354613518565b9050600061300e876001600160a01b031661258d565b905061301b8888846135b3565b600061302f886001600160a01b031661258d565b90506000613043828463ffffffff61260916565b90506130608a8a61305a8b8863ffffffff61260916565b846137b6565b9c50336001600160a01b03167f3ab90d36837fc209a4bd86b71ef4e4746ad3bb1f70843745fd00e61d1f1984cb8f8e8e60405180846001600160a01b03166001600160a01b03168152602001838152602001828152602001935050505060405180910390a2505050505050505050505050919050565b600081836131255760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612458578181015183820152602001612440565b50600083858161313157fe5b0495945050505050565b600082820183811015610c28576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106132125780518252601f1990920191602091820191016131f3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613274576040519150601f19603f3d011682016040523d82523d6000602084013e613279565b606091505b50915091508180156132a75750805115806132a757508080602001905160208110156132a457600080fd5b50515b612be9576040805162461bcd60e51b815260206004820152600d60248201526c10b9b0b332aa3930b739b332b960991b604482015290519081900360640190fd5b6000826001600160a01b0316846001600160a01b0316141561330b575080610c28565b600b546040805163711f958560e11b81526001600160a01b038781166004830152915161010090930490911691600091839163e23f2b0a91602480820192602092909190829003018186803b15801561336357600080fd5b505afa158015613377573d6000803e3d6000fd5b505050506040513d602081101561338d57600080fd5b505190506001600160a01b0380821690861614156133ba576133b182878787613885565b92505050610c28565b6000826001600160a01b031663e23f2b0a876040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561341257600080fd5b505afa158015613426573d6000803e3d6000fd5b505050506040513d602081101561343c57600080fd5b505190506001600160a01b03878116908216141561346a5761346083888888613885565b9350505050610c28565b6000876001600160a01b0316836001600160a01b0316146134985761349184898589613885565b905061349b565b50845b816001600160a01b0316836001600160a01b031614156134cc576134c184848984613885565b945050505050610c28565b866001600160a01b0316826001600160a01b031614156134f1576134c18388836132e8565b60006134fe8484846132e8565b905061350c85848a84613885565b95505050505050610c28565b600080613531846114306103e88663ffffffff61313b16565b905060006135508461143060048189818c6103e863ffffffff6122af16565b9050600061357c6135778361356b868063ffffffff6122af16565b9063ffffffff61313b16565b613b8b565b9050600061359160028763ffffffff6122af16565b90506135a781610a99848763ffffffff61260916565b98975050505050505050565b604080516002808252606080830184529260208301908038833901905050905083816000815181106135e157fe5b60200260200101906001600160a01b031690816001600160a01b031681525050828160018151811061360f57fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506136398483613bdc565b600d546040516338ed173960e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b03909716966338ed1739968a968a9594939092909160c40190602080880191028083838b5b838110156136bf5781810151838201526020016136a7565b505050509050019650505050505050600060405180830381600087803b1580156136e857600080fd5b505af11580156136fc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561372557600080fd5b8101908080516040519392919084600160201b82111561374457600080fd5b90830190602082018581111561375957600080fd5b82518660208202830111600160201b8211171561377557600080fd5b82525081516020918201928201910280838360005b838110156137a257818101518382015260200161378a565b505050509050016040525050505050505050565b60006137c28584613bdc565b6137cc8483613bdc565b600d546040805162e8e33760e81b81526001600160a01b0388811660048301528781166024830152604482018790526064820186905260006084830181905260a483018190523060c48401524260e4840152925193169263e8e337009261010480840193606093929083900390910190829087803b15801561384d57600080fd5b505af1158015613861573d6000803e3d6000fd5b505050506040513d606081101561387757600080fd5b506040015195945050505050565b6000826001600160a01b0316846001600160a01b031614156138a8575080613b83565b60408051630820681160e11b8152600481018490526001600160a01b0386811660248301528581166044830152825160009391891692631040d022926064808301939192829003018186803b15801561390057600080fd5b505afa158015613914573d6000803e3d6000fd5b505050506040513d604081101561392a57600080fd5b508051602090910151925090506001600160a01b03811661397c576040805162461bcd60e51b81526020600482015260076024820152662727afa820a4a960c91b604482015290519081900360640190fd5b6139966001600160a01b038616828563ffffffff61319516565b836001600160a01b0316856001600160a01b03161015613a9a57604080516000808252602082019283905263022c0d9f60e01b835260248201818152604483018690523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a9590939092909160c48501918083838b5b83811015613a2e578181015183820152602001613a16565b50505050905090810190601f168015613a5b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613a7d57600080fd5b505af1158015613a91573d6000803e3d6000fd5b50505050613b81565b604080516000808252602082019283905263022c0d9f60e01b835260248201858152604483018290523060648401819052608060848501908152845160a486018190526001600160a01b0388169663022c0d9f968a969590939092909160c48501918083838a5b83811015613b19578181015183820152602001613b01565b50505050905090810190601f168015613b465780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613b6857600080fd5b505af1158015613b7c573d6000803e3d6000fd5b505050505b505b949350505050565b60006003821115613bce575080600160028204015b81811015613bc857809150600281828581613bb757fe5b040181613bc057fe5b049050613ba0565b5061239d565b811561239d57506001919050565b600d5460408051636eb1769f60e11b81523060048201526001600160a01b0392831660248201529051839285169163dd62ed3e916044808301926020929190829003018186803b158015613c2f57600080fd5b505afa158015613c43573d6000803e3d6000fd5b505050506040513d6020811015613c5957600080fd5b505110613c6557613c87565b600d54613c87906001600160a01b03848116911660001963ffffffff612a9716565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613ccc57805160ff1916838001178555613cf9565b82800160010185558215613cf9579182015b82811115613cf9578251825591602001919060010190613cde565b50613d05929150613d09565b5090565b610caf91905b80821115613d055760008155600101613d0f56fe454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775661756c74546f6b656e3a20494e564c445f5245494e564553545f424f554e54595661756c74546f6b656e3a20494e53554646494349454e545f5245534552564553a265627a7a723158209e5008b0c9e43696db83c4073f004cc0cca278e3c581373ded33a467f391d69d64736f6c63430005100032

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

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.