false
true
0

Contract Address Details

0x79925587bE77C25b292C0ecA6FEdD3A3f07916F9

Contract Name
SwitchLimitOrder
Creator
0xf3b5e2–b7ead4 at 0xdeb911–9a46da
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
12 Transactions
Transfers
24 Transfers
Gas Used
6,511,972
Last Balance Update
26043380
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
SwitchLimitOrder




Optimization enabled
true
Compiler version
v0.8.20+commit.a1b79de6




Optimization runs
999
EVM Version
shanghai




Verified at
2026-03-10T06:26:13.413004Z

Constructor Arguments

00000000000000000000000099999d19ec98f936934e029e63d1c0a127a15207000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a27000000000000000000000000000000000000000000000000000000000000001e

Arg [0] (address) : 0x99999d19ec98f936934e029e63d1c0a127a15207
Arg [1] (address) : 0xa1077a294dde1b09bb078844df40758a5d0f9a27
Arg [2] (uint256) : 30

              

src/SwitchLimitOrder.sol

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./interface/ISwitchRouter.sol";
import "./interface/IERC20.sol";
import "./interface/IERC1271.sol";
import "./interface/IWETH.sol";
import "./lib/SafeERC20.sol";
import "./lib/Maintainable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

/**
 * @title SwitchLimitOrder
 * @notice Gasless EIP-712 signed limit orders for Switch DEX aggregator.
 *
 *         Users approve once and sign order messages off-chain. Operators (fillers)
 *         fill orders by routing through SwitchRouter.
 *
 *         Four execution modes (feeOnOutput × excessOnInput):
 *
 *         ┌────────────────┬─────────────────────────────────────────────────┐
 *         │ feeOnInput     │ Tokens pulled to this contract first.           │
 *         │ excessOnInput  │ Fee deducted from input. Filler keeps unswapped │
 *         │                │ input. Output → recipient directly.             │
 *         │                │ BEST FOR: tax output tokens, regular tokens.    │
 *         ├────────────────┼─────────────────────────────────────────────────┤
 *         │ feeOnInput     │ Tokens pulled to this contract first.           │
 *         │ excessOnOutput │ Fee deducted from input. All remaining input    │
 *         │                │ routed. Output → contract. Maker gets           │
 *         │                │ minAmountOut, filler keeps output surplus.      │
 *         ├────────────────┼─────────────────────────────────────────────────┤
 *         │ feeOnOutput    │ Router pulls from maker directly via            │
 *         │ excessOnInput  │ goSwitchFrom (1 transfer for tax input).        │
 *         │                │ Excess input pulled to filler separately.       │
 *         │                │ Output → contract for fee deduction → maker.    │
 *         ├────────────────┼─────────────────────────────────────────────────┤
 *         │ feeOnOutput    │ Router pulls ALL input from maker directly.     │
 *         │ excessOnOutput │ Output → contract. Fee deducted from output.    │
 *         │                │ Maker gets minAmountOut, filler keeps surplus.  │
 *         │                │ BEST FOR: tax input tokens.                     │
 *         └────────────────┴─────────────────────────────────────────────────┘
 *
 *         Tax token guidelines (enforced by frontend):
 *           - Tax input token  → use feeOnOutput (avoids double-taxing input)
 *           - Tax output token → use feeOnInput + excessOnInput (output direct to recipient)
 *           - Both tax         → not supported (frontend blocks order creation)
 *
 *         This contract must be set as FEE_EXEMPT on the SwitchRouter.
 *         This contract must be set as LIMIT_ORDER_CONTRACT on the SwitchRouter.
 */
contract SwitchLimitOrder is Maintainable, ReentrancyGuard, EIP712 {
    using SafeERC20 for IERC20;

    // ═══════════════════════════════════════════════════════════════════════════
    // CONSTANTS
    // ═══════════════════════════════════════════════════════════════════════════

    uint256 public constant FEE_DENOMINATOR = 1e4;
    uint256 public constant MAX_FEE = 100; // 1% maximum fee
    uint256 public constant PARTNER_FEE_SHARE = 5000; // 50% of fee goes to partner (in basis points of fee)

    bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");

    bytes32 public constant LIMIT_ORDER_TYPEHASH = keccak256(
        "LimitOrder(address maker,address tokenIn,address tokenOut,uint256 amountIn,uint256 minAmountOut,uint256 deadline,uint256 nonce,bool feeOnOutput,address recipient,bool unwrapOutput,address partnerAddress)"
    );

    // ═══════════════════════════════════════════════════════════════════════════
    // STATE
    // ═══════════════════════════════════════════════════════════════════════════

    address public immutable SWITCH_ROUTER;
    address public immutable WNATIVE;
    uint256 private fee;

    /// @notice Address of the SwitchPLSFlow contract (only caller allowed for placeOrder)
    address public plsFlowContract;

    /// @notice When true, only OPERATOR_ROLE can call fillOrder. Disable when private RPCs are available.
    bool public operatorGateEnabled = true;

    /// @notice Tracks used nonces per maker to prevent replay attacks
    mapping(address => mapping(uint256 => bool)) public noncesUsed;

    // ═══════════════════════════════════════════════════════════════════════════
    // TYPES
    // ═══════════════════════════════════════════════════════════════════════════

    /// @notice EIP-712 signed order — never stored on-chain, passed in calldata
    struct LimitOrder {
        address maker;           // Signer / token owner
        address tokenIn;         // ERC20 to sell (use WPLS for native PLS)
        address tokenOut;        // ERC20 to buy (use WPLS + unwrapOutput for native PLS)
        uint256 amountIn;        // Maximum input amount
        uint256 minAmountOut;    // Minimum output the maker must receive
        uint256 deadline;        // Unix timestamp expiry (0 = no expiry)
        uint256 nonce;           // Unique per-maker (prevents double-fill)
        bool feeOnOutput;        // true = fee from output, false = fee from input
        address recipient;       // Output recipient (usually maker's address)
        bool unwrapOutput;       // true = unwrap WPLS to native PLS for recipient
        address partnerAddress;  // Partner to receive 50% of fees (address(0) = no partner)
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // EVENTS
    // ═══════════════════════════════════════════════════════════════════════════

    event OrderPlaced(
        address indexed maker,
        uint256 indexed nonce,
        address tokenIn,
        address tokenOut,
        uint256 amountIn,
        uint256 minAmountOut,
        uint256 deadline,
        bool feeOnOutput,
        address recipient,
        bool unwrapOutput,
        address partnerAddress,
        bytes signature
    );

    event OrderFilled(
        address indexed maker,
        address indexed filler,
        uint256 indexed nonce,
        address tokenIn,
        address tokenOut,
        uint256 amountIn,
        uint256 makerAmountOut,
        uint256 fillerProfit,
        bool excessOnInput,
        address partnerAddress
    );

    event NonceCancelled(address indexed maker, uint256 indexed nonce);
    event FeeUpdated(uint256 newFee);
    event PLSFlowContractUpdated(address newPLSFlowContract);
    event OperatorGateToggled(bool enabled);

    // ═══════════════════════════════════════════════════════════════════════════
    // ERRORS
    // ═══════════════════════════════════════════════════════════════════════════

    error InvalidSignature();
    error NonceAlreadyUsed();
    error OrderExpired();
    error InsufficientOutput();
    error InvalidAmount();
    error ExcessiveFee();
    error RouteInputExceedsMax();
    error InvalidTokens();
    error TransferFailed();
    error OperatorOnly();

    // ═══════════════════════════════════════════════════════════════════════════
    // CONSTRUCTOR
    // ═══════════════════════════════════════════════════════════════════════════

    constructor(
        address _switchRouter,
        address _wnative,
        uint256 _fee
    ) EIP712("SwitchLimitOrder", "2") {
        require(_switchRouter != address(0), "Invalid router");
        require(_wnative != address(0), "Invalid WNATIVE");
        if (_fee > MAX_FEE) revert ExcessiveFee();
        SWITCH_ROUTER = _switchRouter;
        WNATIVE = _wnative;
        fee = _fee;
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // PLACE ORDER (PLSFlow only — on-chain announcement)
    // ═══════════════════════════════════════════════════════════════════════════

    /**
     * @notice Announce a PLS limit order on-chain.
     *         Only callable by the PLSFlow contract. PLSFlow.createOrder()
     *         calls this after wrapping PLS → WPLS so the backend can
     *         index the OrderPlaced event as the source of truth.
     *
     *         Does NOT consume the nonce (that only happens during fill).
     *         No signature verification — PLSFlow is trusted.
     *
     * @param order      The order parameters (maker = PLSFlow contract)
     * @param signature  Empty bytes (PLSFlow uses ERC-1271, not ECDSA)
     */
    function placeOrder(
        LimitOrder calldata order,
        bytes calldata signature
    ) external {
        require(msg.sender == plsFlowContract, "Only PLSFlow");

        // Basic sanity checks
        if (order.amountIn == 0 || order.minAmountOut == 0) revert InvalidAmount();
        if (order.tokenIn == order.tokenOut) revert InvalidTokens();
        if (noncesUsed[order.maker][order.nonce]) revert NonceAlreadyUsed();

        emit OrderPlaced(
            order.maker,
            order.nonce,
            order.tokenIn,
            order.tokenOut,
            order.amountIn,
            order.minAmountOut,
            order.deadline,
            order.feeOnOutput,
            order.recipient,
            order.unwrapOutput,
            order.partnerAddress,
            signature
        );
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // FILL ORDER
    // ═══════════════════════════════════════════════════════════════════════════

    /**
     * @notice Fill a signed limit order via SwitchRouter routing.
     *
     * @param order          The maker's signed order parameters
     * @param signature      The maker's EIP-712 signature (65 bytes: r, s, v)
     * @param routes         Routing allocation for the swap through SwitchRouter
     * @param excessOnInput  true: filler profit = unswapped input tokens
     *                       false: filler profit = output surplus above minAmountOut
     *                       (Filler chooses; maker controls feeOnOutput in signed order)
     */
    function fillOrder(
        LimitOrder calldata order,
        bytes calldata signature,
        RouteAllocation[] calldata routes,
        bool excessOnInput
    ) external nonReentrant {
        if (operatorGateEnabled && !hasRole(OPERATOR_ROLE, msg.sender)) revert OperatorOnly();
        _verifyOrder(order, signature);

        if (order.feeOnOutput) {
            _fillFeeOnOutput(order, routes, excessOnInput);
        } else {
            _fillFeeOnInput(order, routes, excessOnInput);
        }
    }

    /**
     * @notice Direct-fill a signed limit order.
     *         The filler provides output tokens from their own liquidity and receives
     *         the maker's input tokens. No SwitchRouter routing needed.
     *
     *         The maker always receives exactly minAmountOut. Protocol fee is deducted
     *         from the input (feeOnOutput=false) or output (feeOnOutput=true).
     *         The filler receives all input tokens (minus input fee if applicable).
     *
     *         For feeOnOutput=true orders, the maker must have also approved this
     *         contract (not just the Router) for the direct pull to succeed.
     *
     * @param order          The maker's signed order parameters
     * @param signature      The maker's EIP-712 signature (65 bytes: r, s, v)
     * @param outputAmount   Amount of output token to pull from the filler.
     *                       Must be >= minAmountOut (plus fee for feeOnOutput orders).
     *                       For tax output tokens with directToMaker=false, oversend to cover the transfer tax.
     * @param directToMaker  If true and feeOnOutput=false and unwrapOutput=false,
     *                       output is sent directly from filler to the recipient
     *                       in a single transfer — saving one tax hit for tax output tokens.
     *                       Ignored when feeOnOutput=true (output needs fee deduction)
     *                       or unwrapOutput=true (output needs unwrapping).
     *                       Surplus output goes to maker (no refund to filler).
     */
    function directFillOrder(
        LimitOrder calldata order,
        bytes calldata signature,
        uint256 outputAmount,
        bool directToMaker
    ) external nonReentrant {
        if (operatorGateEnabled && !hasRole(OPERATOR_ROLE, msg.sender)) revert OperatorOnly();
        _verifyOrder(order, signature);
        _directFill(order, outputAmount, directToMaker);
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // DIRECT FILL PATH
    // ═══════════════════════════════════════════════════════════════════════════

    /**
     * @dev Direct-fill execution: operator provides output tokens, receives input tokens.
     *      Works with both feeOnOutput modes. Tax-safe via balanceOf deltas.
     *
     *      feeOnOutput=false: Fee from input. Filler provides >= minAmountOut of output.
     *      feeOnOutput=true:  Fee from output. Filler provides enough output to cover
     *                         minAmountOut + fee after tax (if any).
     *
     *      directToMaker=true (feeOnInput only, !unwrapOutput):
     *        Output goes filler → recipient directly (1 transfer instead of 2).
     *        Saves one tax hit for tax output tokens. Surplus goes to maker.
     */
    function _directFill(
        LimitOrder calldata order,
        uint256 outputAmount,
        bool directToMaker
    ) internal {
        // directToMaker only works when fee is on input and no unwrap needed
        // (feeOnOutput requires output at contract for fee deduction;
        //  unwrapOutput requires WPLS at contract for unwrapping)
        bool useDirect = directToMaker && !order.feeOnOutput && !order.unwrapOutput;

        address outToken = order.unwrapOutput ? WNATIVE : order.tokenOut;

        // ─── 1. Pull input from maker ────────────────────────────────
        // feeOnOutput=false: maker approved this contract → direct safeTransferFrom
        // feeOnOutput=true:  maker approved the Router   → use Router's pullTokens
        uint256 actualInputReceived;
        {
            uint256 bal = IERC20(order.tokenIn).balanceOf(address(this));
            if (order.feeOnOutput) {
                ISwitchRouter(SWITCH_ROUTER).pullTokens(
                    order.tokenIn, order.maker, address(this), order.amountIn
                );
            } else {
                IERC20(order.tokenIn).safeTransferFrom(order.maker, address(this), order.amountIn);
            }
            actualInputReceived = IERC20(order.tokenIn).balanceOf(address(this)) - bal;
        }

        // ─── 2. Transfer output ──────────────────────────────────────
        uint256 fillerInputAmount;

        if (useDirect) {
            // Direct-to-maker: filler → recipient in 1 transfer (saves 1 tax hit)
            uint256 recipientBal = IERC20(outToken).balanceOf(order.recipient);
            IERC20(outToken).safeTransferFrom(msg.sender, order.recipient, outputAmount);
            uint256 actualDelivered = IERC20(outToken).balanceOf(order.recipient) - recipientBal;
            if (actualDelivered < order.minAmountOut) revert InsufficientOutput();

            // Fee deducted from input
            uint256 inputFee = (actualInputReceived * fee) / FEE_DENOMINATOR;
            if (inputFee > 0) _distributeTokenFee(order.tokenIn, inputFee, order.partnerAddress);

            fillerInputAmount = actualInputReceived - inputFee;
        } else {
            // Standard path: filler → contract → fee/validation → recipient
            uint256 actualOutputReceived;
            {
                uint256 bal = IERC20(outToken).balanceOf(address(this));
                IERC20(outToken).safeTransferFrom(msg.sender, address(this), outputAmount);
                actualOutputReceived = IERC20(outToken).balanceOf(address(this)) - bal;
            }

            // ─── 3. Fee, validation, settlement ──────────────────────────
            if (order.feeOnOutput) {
                // Fee deducted from output
                uint256 outputFee = (actualOutputReceived * fee) / FEE_DENOMINATOR;
                uint256 afterFee = actualOutputReceived - outputFee;
                if (afterFee < order.minAmountOut) revert InsufficientOutput();

                if (outputFee > 0) _distributeTokenFee(outToken, outputFee, order.partnerAddress);
                _deliverOutput(order, order.minAmountOut);

                // Return surplus output to filler (if any)
                uint256 outputSurplus = afterFee - order.minAmountOut;
                if (outputSurplus > 0) IERC20(outToken).safeTransfer(msg.sender, outputSurplus);

                fillerInputAmount = actualInputReceived;
            } else {
                // Fee deducted from input
                if (actualOutputReceived < order.minAmountOut) revert InsufficientOutput();

                uint256 inputFee = (actualInputReceived * fee) / FEE_DENOMINATOR;
                if (inputFee > 0) _distributeTokenFee(order.tokenIn, inputFee, order.partnerAddress);

                _deliverOutput(order, order.minAmountOut);

                // Return surplus output to filler (if any)
                uint256 outputSurplus = actualOutputReceived - order.minAmountOut;
                if (outputSurplus > 0) IERC20(outToken).safeTransfer(msg.sender, outputSurplus);

                fillerInputAmount = actualInputReceived - inputFee;
            }
        }

        // ─── 4. Send input tokens to filler ──────────────────────────
        if (fillerInputAmount > 0) {
            IERC20(order.tokenIn).safeTransfer(msg.sender, fillerInputAmount);
        }

        _emitOrderFilled(order, order.minAmountOut, fillerInputAmount, true);
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // FEE ON INPUT PATH
    // ═══════════════════════════════════════════════════════════════════════════

    /**
     * @dev Fee-on-input execution path.
     *      Tokens are pulled from maker → this contract first.
     *      Fee is deducted from the input token.
     *
     *      excessOnInput=true:  output → recipient directly (best for tax output)
     *      excessOnInput=false: output → contract → split between maker & filler
     */
    function _fillFeeOnInput(
        LimitOrder calldata order,
        RouteAllocation[] calldata routes,
        bool excessOnInput
    ) internal {
        // ─── 1. Pull all tokens from maker ─────────────────────────────
        uint256 actualReceived;
        {
            uint256 bal = IERC20(order.tokenIn).balanceOf(address(this));
            IERC20(order.tokenIn).safeTransferFrom(order.maker, address(this), order.amountIn);
            actualReceived = IERC20(order.tokenIn).balanceOf(address(this)) - bal;
        }

        // ─── 2. Calculate & distribute input fee ───────────────────────
        uint256 feeAmount = (actualReceived * fee) / FEE_DENOMINATOR;
        if (feeAmount > 0) {
            _distributeTokenFee(order.tokenIn, feeAmount, order.partnerAddress);
        }
        uint256 maxSwap = actualReceived - feeAmount;

        // ─── 3. Validate routes ────────────────────────────────────────
        uint256 totalRouteInput;
        for (uint256 i = 0; i < routes.length; i++) {
            totalRouteInput += routes[i].amountIn;
        }
        if (totalRouteInput > maxSwap) revert RouteInputExceedsMax();

        // ─── 4. Approve router ─────────────────────────────────────────
        IERC20(order.tokenIn).safeApprove(SWITCH_ROUTER, 0);
        IERC20(order.tokenIn).safeApprove(SWITCH_ROUTER, totalRouteInput);

        // ─── 5. Execute swap ───────────────────────────────────────────
        // Output goes directly to recipient ONLY when excessOnInput AND !unwrapOutput
        bool needsSettlement = !excessOnInput || order.unwrapOutput;
        uint256 amountOut = _swapViaGoSwitch(order, routes, needsSettlement);

        if (amountOut < order.minAmountOut) revert InsufficientOutput();

        // ─── 6. Settle ─────────────────────────────────────────────────
        uint256 fillerProfit;
        if (excessOnInput) {
            // Filler takes unswapped input
            fillerProfit = maxSwap - totalRouteInput;
            if (fillerProfit > 0) {
                IERC20(order.tokenIn).safeTransfer(msg.sender, fillerProfit);
            }
            // If unwrapOutput, output is at contract — deliver to recipient
            if (order.unwrapOutput) {
                _deliverOutput(order, amountOut);
            }
            // else: output already at recipient (sent directly by router)
        } else {
            // Filler takes output surplus; return any unswapped input to maker
            uint256 leftoverInput = maxSwap - totalRouteInput;
            if (leftoverInput > 0) {
                IERC20(order.tokenIn).safeTransfer(order.maker, leftoverInput);
            }
            // Deliver minAmountOut to maker
            _deliverOutput(order, order.minAmountOut);
            // Filler gets output surplus
            fillerProfit = amountOut - order.minAmountOut;
            if (fillerProfit > 0) {
                // Filler receives output token (WPLS if unwrapOutput, not unwrapped)
                address outToken = order.unwrapOutput ? WNATIVE : order.tokenOut;
                IERC20(outToken).safeTransfer(msg.sender, fillerProfit);
            }
        }

        _emitOrderFilled(order, excessOnInput ? amountOut : order.minAmountOut, fillerProfit, excessOnInput);
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // FEE ON OUTPUT PATH
    // ═══════════════════════════════════════════════════════════════════════════

    /**
     * @dev Fee-on-output execution path.
     *      Router pulls input directly from maker via goSwitchFrom (1 transfer).
     *      Output comes to this contract for fee deduction.
     *      Best for tax input tokens (avoids double-taxing input).
     *
     *      Requires: maker has approved the SwitchRouter for tokenIn.
     *      Requires: SwitchRouter.LIMIT_ORDER_CONTRACT == address(this).
     *
     *      excessOnInput=true:  excess input pulled from maker → filler
     *      excessOnInput=false: all input routed; filler takes output surplus
     */
    function _fillFeeOnOutput(
        LimitOrder calldata order,
        RouteAllocation[] calldata routes,
        bool excessOnInput
    ) internal {
        // ─── 1. Compute route totals ───────────────────────────────────
        uint256 totalRouteInput;
        for (uint256 i = 0; i < routes.length; i++) {
            totalRouteInput += routes[i].amountIn;
        }
        if (totalRouteInput > order.amountIn) revert RouteInputExceedsMax();

        // ─── 2. Handle excess on input (if applicable) ─────────────────
        if (excessOnInput) {
            uint256 excessAmount = order.amountIn - totalRouteInput;
            if (excessAmount > 0) {
                // Pull excess from maker → filler (uses maker's approval on this contract)
                IERC20(order.tokenIn).safeTransferFrom(order.maker, msg.sender, excessAmount);
            }
        }

        // ─── 3. Execute swap via goSwitchFrom ──────────────────────────
        // Router pulls totalRouteInput from maker → pair(s) directly.
        // Output comes to this contract for fee processing.
        uint256 amountOut = _swapViaGoSwitchFrom(order, routes);

        // ─── 4. Fee on actual output ───────────────────────────────────
        uint256 feeAmount = (amountOut * fee) / FEE_DENOMINATOR;
        if (feeAmount > 0) {
            address outToken = order.unwrapOutput ? WNATIVE : order.tokenOut;
            _distributeTokenFee(outToken, feeAmount, order.partnerAddress);
        }
        uint256 afterFee = amountOut - feeAmount;

        if (afterFee < order.minAmountOut) revert InsufficientOutput();

        // ─── 5. Settle ─────────────────────────────────────────────────
        uint256 fillerProfit;
        if (excessOnInput) {
            // All afterFee goes to maker
            _deliverOutput(order, afterFee);
            fillerProfit = order.amountIn - totalRouteInput; // in tokenIn
        } else {
            // Maker gets minAmountOut, filler gets surplus
            _deliverOutput(order, order.minAmountOut);
            fillerProfit = afterFee - order.minAmountOut; // in tokenOut
            if (fillerProfit > 0) {
                address outToken = order.unwrapOutput ? WNATIVE : order.tokenOut;
                IERC20(outToken).safeTransfer(msg.sender, fillerProfit);
            }
        }

        _emitOrderFilled(order, excessOnInput ? afterFee : order.minAmountOut, fillerProfit, excessOnInput);
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // INTERNAL SWAP HELPERS
    // ═══════════════════════════════════════════════════════════════════════════

    /**
     * @dev Execute swap via goSwitch (tokens already at this contract).
     *      Used for feeOnInput path where this contract holds the input.
     */
    function _swapViaGoSwitch(
        LimitOrder calldata order,
        RouteAllocation[] calldata routes,
        bool needsSettlement
    ) internal returns (uint256 amountOut) {
        address outToken = order.unwrapOutput ? WNATIVE : order.tokenOut;
        address target = needsSettlement ? address(this) : order.recipient;
        uint256 outBefore = IERC20(outToken).balanceOf(target);

        ISwitchRouter(SWITCH_ROUTER).goSwitch(
            routes,
            target,
            order.minAmountOut,    // Router-level sanity floor
            0,                     // No router fee (we handle fees)
            false,                 // N/A
            false,                 // We handle unwrap ourselves
            address(0)             // No partner (we handle partner split)
        );

        amountOut = IERC20(outToken).balanceOf(target) - outBefore;
    }

    /**
     * @dev Execute swap via goSwitchFrom (router pulls from maker directly).
     *      Used for feeOnOutput path to minimize input token transfers.
     *      Output always comes to this contract (for fee processing).
     */
    function _swapViaGoSwitchFrom(
        LimitOrder calldata order,
        RouteAllocation[] calldata routes
    ) internal returns (uint256 amountOut) {
        address outToken = order.unwrapOutput ? WNATIVE : order.tokenOut;
        uint256 outBefore = IERC20(outToken).balanceOf(address(this));

        ISwitchRouter(SWITCH_ROUTER).goSwitchFrom(
            order.maker,
            routes,
            address(this),         // Output to this contract for fee processing
            order.minAmountOut,    // Router-level sanity floor
            false                  // We handle unwrap ourselves
        );

        amountOut = IERC20(outToken).balanceOf(address(this)) - outBefore;
    }

    /**
     * @dev Deliver output tokens to the recipient, unwrapping WPLS if needed.
     */
    function _deliverOutput(
        LimitOrder calldata order,
        uint256 amount
    ) internal {
        if (order.unwrapOutput) {
            IWETH(WNATIVE).withdraw(amount);
            (bool ok, ) = payable(order.recipient).call{value: amount}("");
            if (!ok) revert TransferFailed();
        } else {
            IERC20(order.tokenOut).safeTransfer(order.recipient, amount);
        }
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // SIGNATURE VERIFICATION
    // ═══════════════════════════════════════════════════════════════════════════

    /**
     * @dev Verify EIP-712 signature, nonce, deadline, and basic field validation.
     *      Supports both EOA (ECDSA) and contract (ERC-1271) signers.
     */
    function _verifyOrder(
        LimitOrder calldata order,
        bytes calldata signature
    ) internal {
        bytes32 structHash = keccak256(abi.encode(
            LIMIT_ORDER_TYPEHASH,
            order.maker,
            order.tokenIn,
            order.tokenOut,
            order.amountIn,
            order.minAmountOut,
            order.deadline,
            order.nonce,
            order.feeOnOutput,
            order.recipient,
            order.unwrapOutput,
            order.partnerAddress
        ));
        bytes32 digest = _hashTypedDataV4(structHash);

        // Try ECDSA first (EOA makers) — may revert for short/empty signatures
        bool ecdsaValid = false;
        if (signature.length >= 65) {
            address signer = ECDSA.recover(digest, signature);
            ecdsaValid = (signer == order.maker);
        }

        if (!ecdsaValid) {
            // Fallback: ERC-1271 for contract makers (e.g. SwitchPLSFlow)
            if (order.maker.code.length == 0) revert InvalidSignature();
            bytes4 result = IERC1271(order.maker).isValidSignature(digest, signature);
            if (result != bytes4(0x1626ba7e)) revert InvalidSignature();
        }

        if (noncesUsed[order.maker][order.nonce]) revert NonceAlreadyUsed();
        noncesUsed[order.maker][order.nonce] = true;

        if (order.deadline != 0 && block.timestamp > order.deadline) revert OrderExpired();
        if (order.amountIn == 0 || order.minAmountOut == 0) revert InvalidAmount();
        if (order.tokenIn == order.tokenOut) revert InvalidTokens();
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // CANCELLATION
    // ═══════════════════════════════════════════════════════════════════════════

    function invalidateNonce(uint256 _nonce) external {
        noncesUsed[msg.sender][_nonce] = true;
        emit NonceCancelled(msg.sender, _nonce);
    }

    function invalidateNonces(uint256[] calldata _nonces) external {
        for (uint256 i = 0; i < _nonces.length; i++) {
            noncesUsed[msg.sender][_nonces[i]] = true;
            emit NonceCancelled(msg.sender, _nonces[i]);
        }
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // VIEW FUNCTIONS
    // ═══════════════════════════════════════════════════════════════════════════

    function canFillOrder(
        LimitOrder calldata order,
        bytes calldata signature
    ) external view returns (bool) {
        bytes32 structHash = keccak256(abi.encode(
            LIMIT_ORDER_TYPEHASH,
            order.maker,
            order.tokenIn,
            order.tokenOut,
            order.amountIn,
            order.minAmountOut,
            order.deadline,
            order.nonce,
            order.feeOnOutput,
            order.recipient,
            order.unwrapOutput,
            order.partnerAddress
        ));
        bytes32 digest = _hashTypedDataV4(structHash);

        // Verify signature: ECDSA for EOA, ERC-1271 for contracts
        bool sigValid = false;
        if (signature.length >= 65) {
            address signer = ECDSA.recover(digest, signature);
            sigValid = (signer == order.maker);
        }
        if (!sigValid) {
            if (order.maker.code.length == 0) return false;
            try IERC1271(order.maker).isValidSignature(digest, signature) returns (bytes4 result) {
                if (result != bytes4(0x1626ba7e)) return false;
            } catch {
                return false;
            }
        }
        if (noncesUsed[order.maker][order.nonce]) return false;
        if (order.deadline != 0 && block.timestamp > order.deadline) return false;
        if (IERC20(order.tokenIn).balanceOf(order.maker) < order.amountIn) return false;
        // Check allowance on this contract (needed for feeOnInput, and feeOnOutput+excessOnInput)
        if (IERC20(order.tokenIn).allowance(order.maker, address(this)) < order.amountIn) {
            // For feeOnOutput without excessOnInput, maker only needs router approval
            if (!order.feeOnOutput) return false;
            if (IERC20(order.tokenIn).allowance(order.maker, SWITCH_ROUTER) < order.amountIn) return false;
        }
        return true;
    }

    function isNonceUsed(address maker, uint256 nonce) external view returns (bool) {
        return noncesUsed[maker][nonce];
    }

    function domainSeparator() external view returns (bytes32) {
        return _domainSeparatorV4();
    }

    function getFee() external view returns (uint256) {
        return fee;
    }



    // ═══════════════════════════════════════════════════════════════════════════
    // ADMIN
    // ═══════════════════════════════════════════════════════════════════════════

    function setFee(uint256 _fee) external onlyMaintainer {
        if (_fee > MAX_FEE) revert ExcessiveFee();
        fee = _fee;
        emit FeeUpdated(_fee);
    }

    function setPLSFlowContract(address _plsFlow) external onlyMaintainer {
        plsFlowContract = _plsFlow;
        emit PLSFlowContractUpdated(_plsFlow);
    }

    /// @notice Toggle the operator gate. When disabled, fillOrder is permissionless.
    function setOperatorGate(bool _enabled) external onlyMaintainer {
        operatorGateEnabled = _enabled;
        emit OperatorGateToggled(_enabled);
    }

    /// @notice Grant OPERATOR_ROLE to an address (only admin).
    function addOperator(address _operator) external {
        grantRole(OPERATOR_ROLE, _operator);
    }

    /// @notice Revoke OPERATOR_ROLE from an address (only admin).
    function removeOperator(address _operator) external {
        revokeRole(OPERATOR_ROLE, _operator);
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // INTERNALS
    // ═══════════════════════════════════════════════════════════════════════════

    function _emitOrderFilled(
        LimitOrder calldata order,
        uint256 makerAmountOut,
        uint256 fillerProfit,
        bool excessOnInput
    ) private {
        emit OrderFilled(
            order.maker,
            msg.sender,
            order.nonce,
            order.tokenIn,
            order.tokenOut,
            order.amountIn,
            makerAmountOut,
            fillerProfit,
            excessOnInput,
            order.partnerAddress
        );
    }

    function _distributeTokenFee(address _token, uint256 _feeAmount, address _partner) private {
        address feeClaimer = ISwitchRouter(SWITCH_ROUTER).FEE_CLAIMER();
        if (_partner != address(0)) {
            uint256 partnerShare = (_feeAmount * PARTNER_FEE_SHARE) / FEE_DENOMINATOR;
            uint256 protocolShare = _feeAmount - partnerShare;
            if (partnerShare > 0) IERC20(_token).safeTransfer(_partner, partnerShare);
            if (protocolShare > 0) IERC20(_token).safeTransfer(feeClaimer, protocolShare);
        } else {
            IERC20(_token).safeTransfer(feeClaimer, _feeAmount);
        }
    }

    // ═══════════════════════════════════════════════════════════════════════════
    // EMERGENCY
    // ═══════════════════════════════════════════════════════════════════════════

    function recoverTokens(address _token, uint256 _amount) external onlyMaintainer {
        IERC20(_token).safeTransfer(msg.sender, _amount);
    }

    function recoverNative(uint256 _amount) external onlyMaintainer {
        (bool ok, ) = payable(msg.sender).call{value: _amount}("");
        require(ok, "Native transfer failed");
    }

    receive() external payable {}
}
        

/

// This is a simplified version of OpenZepplin's SafeERC20 library
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "../interface/IERC20.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}
          

/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";

/**
 * @dev Contract module which extends the basic access control mechanism of Ownable
 * to include many maintainers, whom only the owner (DEFAULT_ADMIN_ROLE) may add and
 * remove.
 *
 * By default, the owner account will be the one that deploys the contract. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available this modifier:
 * `onlyMaintainer`, which can be applied to your functions to restrict their use to
 * the accounts with the role of maintainer.
 */

abstract contract Maintainable is Context, AccessControl {
    bytes32 public constant MAINTAINER_ROLE = keccak256("MAINTAINER_ROLE");

    constructor() {
        address msgSender = _msgSender();
        // members of the DEFAULT_ADMIN_ROLE alone may revoke and grant role membership
        _setupRole(DEFAULT_ADMIN_ROLE, msgSender);
        _setupRole(MAINTAINER_ROLE, msgSender);
    }

    function addMaintainer(address addedMaintainer) public virtual {
        grantRole(MAINTAINER_ROLE, addedMaintainer);
    }

    function removeMaintainer(address removedMaintainer) public virtual {
        revokeRole(MAINTAINER_ROLE, removedMaintainer);
    }

    function renounceRole(bytes32 role) public virtual {
        address msgSender = _msgSender();
        renounceRole(role, msgSender);
    }

    function transferOwnership(address newOwner) public virtual {
        address msgSender = _msgSender();
        grantRole(DEFAULT_ADMIN_ROLE, newOwner);
        renounceRole(DEFAULT_ADMIN_ROLE, msgSender);
    }

    modifier onlyMaintainer() {
        address msgSender = _msgSender();
        require(hasRole(MAINTAINER_ROLE, msgSender), "Maintainable: Caller is not a maintainer");
        _;
    }
}
          

/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IWETH is IERC20 {
    function withdraw(uint256 amount) external;

    function deposit() external payable;
}
          

/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


struct Query {
    address adapter;
    address tokenIn;
    address tokenOut;
    uint256 amountOut;
}
struct Offer {
    bytes amounts;
    bytes adapters;
    bytes path;
    uint256 gasEstimate;
}
struct FormattedOffer {
    uint256[] amounts;
    address[] adapters;
    address[] path;
    uint256 gasEstimate;
}
struct Trade {
    uint256 amountIn;
    uint256 amountOut;
    address[] path;
    address[] adapters;
}

struct HopAdapterAllocation {
    address adapter;
    uint256 amountIn;
}

struct HopAllocation {
    address tokenIn;
    address tokenOut;
    HopAdapterAllocation[] legs;
}

struct RouteAllocation {
    uint256 amountIn;
    HopAllocation[] hops;
}

interface ISwitchRouter {

    event UpdatedAdapters(address[] _newAdapters);
    event UpdatedMinFee(uint256 _oldMinFee, uint256 _newMinFee);
    event UpdatedFeeClaimer(address _oldFeeClaimer, address _newFeeClaimer);
    event Switched(address indexed _tokenIn, address indexed _tokenOut, uint256 _amountIn, uint256 _amountOut, address _partnerAddress);
    event UpdatedFeeExempt(address indexed account, bool exempt);

    // admin
    function setAdapters(address[] memory _adapters) external;
    function setFeeClaimer(address _claimer) external;
    function setMinFee(uint256 _fee) external;
    function setFeeExempt(address account, bool exempt) external;
    function setMinFeeExempt(address account, bool exempt) external;
    function setFeeExemptBatch(address[] calldata accounts, bool[] calldata flags) external;
    function adaptersCount() external view returns (uint256);
    function ADAPTERS(uint256 index) external view returns (address);
    function MIN_FEE() external view returns (uint256);
    function MIN_FEE_EXEMPT(address account) external view returns (bool);
    function FEE_CLAIMER() external view returns (address);
    function FEE_EXEMPT(address account) external view returns (bool);

    // query

    function queryAdapter(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8 _index
    ) external returns (uint256);

    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint8[] calldata _options
    ) external view returns (Query memory);

    function queryNoSplit(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (Query memory);

    function findBestPathWithGas(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps,
        uint256 _gasPrice
    ) external view returns (FormattedOffer memory);

    function findBestPath(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps
    ) external view returns (FormattedOffer memory);

    function findBestPathRange(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps,
        uint256 _trustedStart,
        uint256 _trustedCount
    ) external view returns (FormattedOffer memory);

    function findBestPathRangeWithGas(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _maxSteps,
        uint256 _gasPrice,
        uint256 _trustedStart,
        uint256 _trustedCount
    ) external view returns (FormattedOffer memory);

    function queryAdaptersRange(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut,
        uint256 _start,
        uint256 _count
    ) external view returns (Query[] memory results);

    function quoteSplit(Trade[] calldata _trades) external view returns (uint256 totalOut);

    // Unified swap function
    function goSwitch(
        RouteAllocation[] calldata _routes,
        address _to,
        uint256 _minTotalAmountOut,
        uint256 _fee,
        bool _feeOnOutput,
        bool _unwrapOutput,
        address _partnerAddress
    ) external payable;

    // Pull-from-payer swap (only callable by the limit order contract)
    function goSwitchFrom(
        address _payer,
        RouteAllocation[] calldata _routes,
        address _to,
        uint256 _minTotalAmountOut,
        bool _unwrapOutput
    ) external;

    // Pull tokens from a payer to a recipient (only callable by the limit order contract)
    function pullTokens(
        address _token,
        address _from,
        address _to,
        uint256 _amount
    ) external;

    function LIMIT_ORDER_CONTRACT() external view returns (address);
}
          

/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
    event Approval(address, address, uint256);
    event Transfer(address, address, uint256);

    function name() external view returns (string memory);

    function decimals() external view returns (uint8);

    function transferFrom(
        address,
        address,
        uint256
    ) external returns (bool);

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

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

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

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

    function nonces(address) external view returns (uint256); // Only tokens that support permit

    function permit(
        address,
        address,
        uint256,
        uint256,
        uint8,
        bytes32,
        bytes32
    ) external; // Only tokens that support permit

    function swap(address, uint256) external; // Only Avalanche bridge tokens

    function swapSupply(address) external view returns (uint256); // Only Avalanche bridge tokens

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

/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev Interface for ERC-1271: Standard Signature Validation Method for Contracts.
 *      See https://eips.ethereum.org/EIPS/eip-1271
 */
interface IERC1271 {
    /**
     * @dev Returns `0x1626ba7e` if the signature is valid for the given hash.
     */
    function isValidSignature(
        bytes32 hash,
        bytes calldata signature
    ) external view returns (bytes4);
}
          

/math/SignedMath.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}
          

/math/Math.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}
          

/introspection/IERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
          

/introspection/ERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}
          

/cryptography/EIP712.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.8;

import "./ECDSA.sol";
import "../ShortStrings.sol";
import "../../interfaces/IERC5267.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * _Available since v3.4._
 *
 * @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
 */
abstract contract EIP712 is IERC5267 {
    using ShortStrings for *;

    bytes32 private constant _TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _cachedDomainSeparator;
    uint256 private immutable _cachedChainId;
    address private immutable _cachedThis;

    bytes32 private immutable _hashedName;
    bytes32 private immutable _hashedVersion;

    ShortString private immutable _name;
    ShortString private immutable _version;
    string private _nameFallback;
    string private _versionFallback;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        _name = name.toShortStringWithFallback(_nameFallback);
        _version = version.toShortStringWithFallback(_versionFallback);
        _hashedName = keccak256(bytes(name));
        _hashedVersion = keccak256(bytes(version));

        _cachedChainId = block.chainid;
        _cachedDomainSeparator = _buildDomainSeparator();
        _cachedThis = address(this);
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
            return _cachedDomainSeparator;
        } else {
            return _buildDomainSeparator();
        }
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {EIP-5267}.
     *
     * _Available since v4.9._
     */
    function eip712Domain()
        public
        view
        virtual
        override
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _name.toStringWithFallback(_nameFallback),
            _version.toStringWithFallback(_versionFallback),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }
}
          

/cryptography/ECDSA.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}
          

/Strings.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}
          

/StorageSlot.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
 * _Available since v4.9 for `string`, `bytes`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}
          

/ShortStrings.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol)

pragma solidity ^0.8.8;

import "./StorageSlot.sol";

// | string  | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA   |
// | length  | 0x                                                              BB |
type ShortString is bytes32;

/**
 * @dev This library provides functions to convert short memory strings
 * into a `ShortString` type that can be used as an immutable variable.
 *
 * Strings of arbitrary length can be optimized using this library if
 * they are short enough (up to 31 bytes) by packing them with their
 * length (1 byte) in a single EVM word (32 bytes). Additionally, a
 * fallback mechanism can be used for every other case.
 *
 * Usage example:
 *
 * ```solidity
 * contract Named {
 *     using ShortStrings for *;
 *
 *     ShortString private immutable _name;
 *     string private _nameFallback;
 *
 *     constructor(string memory contractName) {
 *         _name = contractName.toShortStringWithFallback(_nameFallback);
 *     }
 *
 *     function name() external view returns (string memory) {
 *         return _name.toStringWithFallback(_nameFallback);
 *     }
 * }
 * ```
 */
library ShortStrings {
    // Used as an identifier for strings longer than 31 bytes.
    bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;

    error StringTooLong(string str);
    error InvalidShortString();

    /**
     * @dev Encode a string of at most 31 chars into a `ShortString`.
     *
     * This will trigger a `StringTooLong` error is the input string is too long.
     */
    function toShortString(string memory str) internal pure returns (ShortString) {
        bytes memory bstr = bytes(str);
        if (bstr.length > 31) {
            revert StringTooLong(str);
        }
        return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
    }

    /**
     * @dev Decode a `ShortString` back to a "normal" string.
     */
    function toString(ShortString sstr) internal pure returns (string memory) {
        uint256 len = byteLength(sstr);
        // using `new string(len)` would work locally but is not memory safe.
        string memory str = new string(32);
        /// @solidity memory-safe-assembly
        assembly {
            mstore(str, len)
            mstore(add(str, 0x20), sstr)
        }
        return str;
    }

    /**
     * @dev Return the length of a `ShortString`.
     */
    function byteLength(ShortString sstr) internal pure returns (uint256) {
        uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
        if (result > 31) {
            revert InvalidShortString();
        }
        return result;
    }

    /**
     * @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
     */
    function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
        if (bytes(value).length < 32) {
            return toShortString(value);
        } else {
            StorageSlot.getStringSlot(store).value = value;
            return ShortString.wrap(_FALLBACK_SENTINEL);
        }
    }

    /**
     * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     */
    function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return toString(value);
        } else {
            return store;
        }
    }

    /**
     * @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
     *
     * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
     * actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
     */
    function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
        if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
            return byteLength(value);
        } else {
            return bytes(store).length;
        }
    }
}
          

/Context.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
          

/ReentrancyGuard.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}
          

/IERC5267.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.0;

interface IERC5267 {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}
          

/IAccessControl.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}
          

/AccessControl.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}
          

Compiler Settings

{"remappings":[":@openzeppelin/contracts/=dependencies/openzeppelin-contracts/contracts/",":ds-test/=dependencies/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",":erc4626-tests/=dependencies/openzeppelin-contracts/lib/erc4626-tests/",":forge-std/=dependencies/forge-std/src/",":openzeppelin-contracts/=dependencies/openzeppelin-contracts/",":openzeppelin/=dependencies/openzeppelin-contracts/contracts/"],"optimizer":{"runs":999,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"shanghai","compilationTarget":{"src/SwitchLimitOrder.sol":"SwitchLimitOrder"}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_switchRouter","internalType":"address"},{"type":"address","name":"_wnative","internalType":"address"},{"type":"uint256","name":"_fee","internalType":"uint256"}]},{"type":"error","name":"ExcessiveFee","inputs":[]},{"type":"error","name":"InsufficientOutput","inputs":[]},{"type":"error","name":"InvalidAmount","inputs":[]},{"type":"error","name":"InvalidShortString","inputs":[]},{"type":"error","name":"InvalidSignature","inputs":[]},{"type":"error","name":"InvalidTokens","inputs":[]},{"type":"error","name":"NonceAlreadyUsed","inputs":[]},{"type":"error","name":"OperatorOnly","inputs":[]},{"type":"error","name":"OrderExpired","inputs":[]},{"type":"error","name":"RouteInputExceedsMax","inputs":[]},{"type":"error","name":"StringTooLong","inputs":[{"type":"string","name":"str","internalType":"string"}]},{"type":"error","name":"TransferFailed","inputs":[]},{"type":"event","name":"EIP712DomainChanged","inputs":[],"anonymous":false},{"type":"event","name":"FeeUpdated","inputs":[{"type":"uint256","name":"newFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NonceCancelled","inputs":[{"type":"address","name":"maker","internalType":"address","indexed":true},{"type":"uint256","name":"nonce","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"OperatorGateToggled","inputs":[{"type":"bool","name":"enabled","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"OrderFilled","inputs":[{"type":"address","name":"maker","internalType":"address","indexed":true},{"type":"address","name":"filler","internalType":"address","indexed":true},{"type":"uint256","name":"nonce","internalType":"uint256","indexed":true},{"type":"address","name":"tokenIn","internalType":"address","indexed":false},{"type":"address","name":"tokenOut","internalType":"address","indexed":false},{"type":"uint256","name":"amountIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"makerAmountOut","internalType":"uint256","indexed":false},{"type":"uint256","name":"fillerProfit","internalType":"uint256","indexed":false},{"type":"bool","name":"excessOnInput","internalType":"bool","indexed":false},{"type":"address","name":"partnerAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"OrderPlaced","inputs":[{"type":"address","name":"maker","internalType":"address","indexed":true},{"type":"uint256","name":"nonce","internalType":"uint256","indexed":true},{"type":"address","name":"tokenIn","internalType":"address","indexed":false},{"type":"address","name":"tokenOut","internalType":"address","indexed":false},{"type":"uint256","name":"amountIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"minAmountOut","internalType":"uint256","indexed":false},{"type":"uint256","name":"deadline","internalType":"uint256","indexed":false},{"type":"bool","name":"feeOnOutput","internalType":"bool","indexed":false},{"type":"address","name":"recipient","internalType":"address","indexed":false},{"type":"bool","name":"unwrapOutput","internalType":"bool","indexed":false},{"type":"address","name":"partnerAddress","internalType":"address","indexed":false},{"type":"bytes","name":"signature","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"PLSFlowContractUpdated","inputs":[{"type":"address","name":"newPLSFlowContract","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FEE_DENOMINATOR","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"LIMIT_ORDER_TYPEHASH","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"MAINTAINER_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"OPERATOR_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PARTNER_FEE_SHARE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"SWITCH_ROUTER","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WNATIVE","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addMaintainer","inputs":[{"type":"address","name":"addedMaintainer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addOperator","inputs":[{"type":"address","name":"_operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"canFillOrder","inputs":[{"type":"tuple","name":"order","internalType":"struct SwitchLimitOrder.LimitOrder","components":[{"type":"address","name":"maker","internalType":"address"},{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"minAmountOut","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"bool","name":"feeOnOutput","internalType":"bool"},{"type":"address","name":"recipient","internalType":"address"},{"type":"bool","name":"unwrapOutput","internalType":"bool"},{"type":"address","name":"partnerAddress","internalType":"address"}]},{"type":"bytes","name":"signature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"directFillOrder","inputs":[{"type":"tuple","name":"order","internalType":"struct SwitchLimitOrder.LimitOrder","components":[{"type":"address","name":"maker","internalType":"address"},{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"minAmountOut","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"bool","name":"feeOnOutput","internalType":"bool"},{"type":"address","name":"recipient","internalType":"address"},{"type":"bool","name":"unwrapOutput","internalType":"bool"},{"type":"address","name":"partnerAddress","internalType":"address"}]},{"type":"bytes","name":"signature","internalType":"bytes"},{"type":"uint256","name":"outputAmount","internalType":"uint256"},{"type":"bool","name":"directToMaker","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"domainSeparator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes1","name":"fields","internalType":"bytes1"},{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"version","internalType":"string"},{"type":"uint256","name":"chainId","internalType":"uint256"},{"type":"address","name":"verifyingContract","internalType":"address"},{"type":"bytes32","name":"salt","internalType":"bytes32"},{"type":"uint256[]","name":"extensions","internalType":"uint256[]"}],"name":"eip712Domain","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"fillOrder","inputs":[{"type":"tuple","name":"order","internalType":"struct SwitchLimitOrder.LimitOrder","components":[{"type":"address","name":"maker","internalType":"address"},{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"minAmountOut","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"bool","name":"feeOnOutput","internalType":"bool"},{"type":"address","name":"recipient","internalType":"address"},{"type":"bool","name":"unwrapOutput","internalType":"bool"},{"type":"address","name":"partnerAddress","internalType":"address"}]},{"type":"bytes","name":"signature","internalType":"bytes"},{"type":"tuple[]","name":"routes","internalType":"struct RouteAllocation[]","components":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"tuple[]","name":"hops","internalType":"struct HopAllocation[]","components":[{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"tuple[]","name":"legs","internalType":"struct HopAdapterAllocation[]","components":[{"type":"address","name":"adapter","internalType":"address"},{"type":"uint256","name":"amountIn","internalType":"uint256"}]}]}]},{"type":"bool","name":"excessOnInput","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getFee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"invalidateNonce","inputs":[{"type":"uint256","name":"_nonce","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"invalidateNonces","inputs":[{"type":"uint256[]","name":"_nonces","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isNonceUsed","inputs":[{"type":"address","name":"maker","internalType":"address"},{"type":"uint256","name":"nonce","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"noncesUsed","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"operatorGateEnabled","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"placeOrder","inputs":[{"type":"tuple","name":"order","internalType":"struct SwitchLimitOrder.LimitOrder","components":[{"type":"address","name":"maker","internalType":"address"},{"type":"address","name":"tokenIn","internalType":"address"},{"type":"address","name":"tokenOut","internalType":"address"},{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"minAmountOut","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint256","name":"nonce","internalType":"uint256"},{"type":"bool","name":"feeOnOutput","internalType":"bool"},{"type":"address","name":"recipient","internalType":"address"},{"type":"bool","name":"unwrapOutput","internalType":"bool"},{"type":"address","name":"partnerAddress","internalType":"address"}]},{"type":"bytes","name":"signature","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"plsFlowContract","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"recoverNative","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"recoverTokens","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeMaintainer","inputs":[{"type":"address","name":"removedMaintainer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeOperator","inputs":[{"type":"address","name":"_operator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFee","inputs":[{"type":"uint256","name":"_fee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setOperatorGate","inputs":[{"type":"bool","name":"_enabled","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPLSFlowContract","inputs":[{"type":"address","name":"_plsFlow","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x6101a06040526005805460ff60a01b1916600160a01b17905534801562000024575f80fd5b5060405162004e9c38038062004e9c8339810160408190526200004791620003ae565b6040518060400160405280601081526020016f29bbb4ba31b42634b6b4ba27b93232b960811b815250604051806040016040528060018152602001601960f91b8152505f6200009b6200026660201b60201c565b9050620000a95f826200026a565b620000d57f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95826200026a565b5060018055620000e78260026200027a565b61012052620000f88160036200027a565b61014052815160208084019190912060e052815190820120610100524660a0526200018560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b038316620001db5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b2103937baba32b960911b60448201526064015b60405180910390fd5b6001600160a01b038216620002255760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420574e415449564560881b6044820152606401620001d2565b60648111156200024857604051630a5df69160e21b815260040160405180910390fd5b6001600160a01b0392831661016052911661018052600455620005c5565b3390565b620002768282620002b2565b5050565b5f6020835110156200029957620002918362000350565b9050620002ac565b81620002a684826200048c565b5060ff90505b92915050565b5f828152602081815260408083206001600160a01b038516845290915290205460ff1662000276575f828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200030c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f80829050601f815111156200037d578260405163305a27a960e01b8152600401620001d2919062000554565b80516200038a82620005a1565b179392505050565b80516001600160a01b0381168114620003a9575f80fd5b919050565b5f805f60608486031215620003c1575f80fd5b620003cc8462000392565b9250620003dc6020850162000392565b9150604084015190509250925092565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200041557607f821691505b6020821081036200043457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000487575f81815260208120601f850160051c81016020861015620004625750805b601f850160051c820191505b8181101562000483578281556001016200046e565b5050505b505050565b81516001600160401b03811115620004a857620004a8620003ec565b620004c081620004b9845462000400565b846200043a565b602080601f831160018114620004f6575f8415620004de5750858301515b5f19600386901b1c1916600185901b17855562000483565b5f85815260208120601f198616915b82811015620005265788860151825594840194600190910190840162000505565b50858210156200054457878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f6020808352835180828501525f5b81811015620005815785810183015185820160400152820162000563565b505f604082860101526040601f19601f8301168501019250505092915050565b8051602080830151919081101562000434575f1960209190910360031b1b16919050565b60805160a05160c05160e051610100516101205161014051610160516101805161480f6200068d5f395f818161061201528181611fcf0152818161284c0152818161293101528181612d2a0152818161326e015281816134c001526137d701525f8181610810015281816118550152818161208d01528181612b8401528181612bc9015281816131220152818161355701526138b801525f610d9f01525f610d7401525f612ecf01525f612ea701525f612e0201525f612e2c01525f612e56015261480f5ff3fe608060405260043610610294575f3560e01c8063a8b5aaf411610165578063d547741f116100c6578063f36cbd351161007c578063f698da2511610062578063f698da25146107b8578063f8742254146107cc578063fc4a2bca146107ff575f80fd5b8063f36cbd3514610770578063f5b541a614610785575f80fd5b8063d8baf7cf116100ac578063d8baf7cf14610712578063db22af0c14610731578063f2fde38b14610751575f80fd5b8063d547741f146106de578063d73792a9146106fd575f80fd5b8063b70e36f01161011b578063c2f254d411610101578063c2f254d414610667578063cab7e8eb14610686578063ced72f87146106ca575f80fd5b8063b70e36f014610634578063bc063e1a14610653575f80fd5b8063aede36931161014b578063aede3693146105c3578063b365e098146105e2578063b381cf4014610601575f80fd5b8063a8b5aaf414610585578063ac8a584a146105a4575f80fd5b806369fe0e2d1161020f5780638bb9c5bf116101c55780639870d7fe116101ab5780639870d7fe146105345780639d13a2cd14610553578063a217fddf14610572575f80fd5b80638bb9c5bf146104d357806391d14854146104f2575f80fd5b80636e8d6e78116101f55780636e8d6e781461045457806381e026c51461048d57806384b0196e146104ac575f80fd5b806369fe0e2d146104165780636b453c1f14610435575f80fd5b80632f2ff15d1161026457806336568abe1161024a57806336568abe1461038d578063448ed6ee146103ac57806354dd5f74146103e3575f80fd5b80632f2ff15d1461034f5780633493c0c81461036e575f80fd5b806301ffc9a71461029f578063069c9fae146102d3578063248a9ca3146102f45780632eb48a8014610330575f80fd5b3661029b57005b5f80fd5b3480156102aa575f80fd5b506102be6102b9366004613e51565b610832565b60405190151581526020015b60405180910390f35b3480156102de575f80fd5b506102f26102ed366004613e80565b61089a565b005b3480156102ff575f80fd5b5061032261030e366004613eaa565b5f9081526020819052604090206001015490565b6040519081526020016102ca565b34801561033b575f80fd5b506102f261034a366004613f02565b610946565b34801561035a575f80fd5b506102f2610369366004613f41565b6109fe565b348015610379575f80fd5b506102f2610388366004613f6f565b610a22565b348015610398575f80fd5b506102f26103a7366004613f41565b610b1e565b3480156103b7575f80fd5b506005546103cb906001600160a01b031681565b6040516001600160a01b0390911681526020016102ca565b3480156103ee575f80fd5b506103227fccb76b500ea7c6e283a0d8452ef3953b5ef22b66ec9fc9cfcf16c278cc0c621081565b348015610421575f80fd5b506102f2610430366004613eaa565b610baa565b348015610440575f80fd5b506102f261044f366004613f6f565b610ca8565b34801561045f575f80fd5b506102be61046e366004613e80565b600660209081525f928352604080842090915290825290205460ff1681565b348015610498575f80fd5b506102f26104a7366004613fec565b610cd5565b3480156104b7575f80fd5b506104c0610d67565b6040516102ca97969594939291906140ab565b3480156104de575f80fd5b506102f26104ed366004613eaa565b610e0a565b3480156104fd575f80fd5b506102be61050c366004613f41565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561053f575f80fd5b506102f261054e366004613f6f565b610e15565b34801561055e575f80fd5b506102f261056d36600461415b565b610e3f565b34801561057d575f80fd5b506103225f81565b348015610590575f80fd5b506102f261059f3660046141ed565b610efa565b3480156105af575f80fd5b506102f26105be366004613f6f565b611109565b3480156105ce575f80fd5b506102f26105dd366004613eaa565b611133565b3480156105ed575f80fd5b506102f26105fc36600461423f565b611256565b34801561060c575f80fd5b506103cb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561063f575f80fd5b506102f261064e366004613eaa565b61134c565b34801561065e575f80fd5b50610322606481565b348015610672575f80fd5b506102be6106813660046141ed565b61139b565b348015610691575f80fd5b506102be6106a0366004613e80565b6001600160a01b03919091165f908152600660209081526040808320938352929052205460ff1690565b3480156106d5575f80fd5b50600454610322565b3480156106e9575f80fd5b506102f26106f8366004613f41565b6118de565b348015610708575f80fd5b5061032261271081565b34801561071d575f80fd5b506102f261072c366004613f6f565b611902565b34801561073c575f80fd5b506005546102be90600160a01b900460ff1681565b34801561075c575f80fd5b506102f261076b366004613f6f565b61192c565b34801561077b575f80fd5b5061032261138881565b348015610790575f80fd5b506103227f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b3480156107c3575f80fd5b50610322611941565b3480156107d7575f80fd5b506103227f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab9581565b34801561080a575f80fd5b506103cb7f000000000000000000000000000000000000000000000000000000000000000081565b5f6001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061089457507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff1661092d5760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b60648201526084015b60405180910390fd5b6109416001600160a01b038416338461194f565b505050565b5f5b8181101561094157335f9081526006602052604081206001918585858181106109735761097361425a565b9050602002013581526020019081526020015f205f6101000a81548160ff0219169083151502179055508282828181106109af576109af61425a565b90506020020135336001600160a01b03167f26ccf9904b9b2fb069d347553978928fd2fc65efb2638dcbeb8d142e974479f060405160405180910390a3806109f681614282565b915050610948565b5f82815260208190526040902060010154610a18816119e0565b61094183836119ea565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff16610ab05760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556040519081527f6923bc73460eec0d50ec94a48ac150d47260f89cf943d94c025ed27f3a6cffe9906020015b60405180910390a15050565b6001600160a01b0381163314610b9c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610924565b610ba68282611a86565b5050565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff16610c385760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b6064821115610c73576040517f2977da4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048290556040518281527f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c7690602001610b12565b610cd27f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95826109fe565b50565b610cdd611b03565b600554600160a01b900460ff168015610d245750335f9081527fee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f602052604090205460ff16155b15610d415760405162572f1f60e91b815260040160405180910390fd5b610d4c858585611b5c565b610d57858383611f68565b610d6060018055565b5050505050565b5f60608082808083610d9a7f0000000000000000000000000000000000000000000000000000000000000000600261268e565b610dc57f0000000000000000000000000000000000000000000000000000000000000000600361268e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b33610ba68282610b1e565b610cd27f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929826109fe565b610e47611b03565b600554600160a01b900460ff168015610e8e5750335f9081527fee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f602052604090205460ff16155b15610eab5760405162572f1f60e91b815260040160405180910390fd5b610eb6868686611b5c565b610ec7610100870160e0880161423f565b15610edd57610ed886848484612737565b610ee9565b610ee986848484612990565b610ef260018055565b505050505050565b6005546001600160a01b03163314610f545760405162461bcd60e51b815260206004820152600c60248201527f4f6e6c7920504c53466c6f7700000000000000000000000000000000000000006044820152606401610924565b60608301351580610f6757506080830135155b15610f855760405163162908e360e11b815260040160405180910390fd5b610f956060840160408501613f6f565b6001600160a01b0316610fae6040850160208601613f6f565b6001600160a01b031603610fd5576040516333910aef60e11b815260040160405180910390fd5b60065f610fe56020860186613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c0870135825290925290205460ff161561102f57604051623f613760e71b815260040160405180910390fd5b60c08301356110416020850185613f6f565b6001600160a01b03167f8c4ad7ba07e9663cc8538baa98e0186bf0ce2f6d036f32de3d9591d7e77fb1cd61107b6040870160208801613f6f565b61108b6060880160408901613f6f565b6060880135608089013560a08a01356110ab6101008c0160e08d0161423f565b6110bd6101208d016101008e01613f6f565b6110cf6101408e016101208f0161423f565b8d6101400160208101906110e39190613f6f565b8d8d6040516110fc9b9a999897969594939291906142d6565b60405180910390a3505050565b610cd27f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929826118de565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff166111c15760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b6040515f90339084908381818185875af1925050503d805f8114611200576040519150601f19603f3d011682016040523d82523d5f602084013e611205565b606091505b50509050806109415760405162461bcd60e51b815260206004820152601660248201527f4e6174697665207472616e73666572206661696c6564000000000000000000006044820152606401610924565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff166112e45760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b60058054831515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517fc97fad0dfb17dfe134a2d04c51583e05eaf958c56d1f99e41dc6ec7cee03cdd490610b1290841515815260200190565b335f818152600660209081526040808320858452909152808220805460ff19166001179055518392917f26ccf9904b9b2fb069d347553978928fd2fc65efb2638dcbeb8d142e974479f091a350565b5f807fccb76b500ea7c6e283a0d8452ef3953b5ef22b66ec9fc9cfcf16c278cc0c62106113cb6020870187613f6f565b6113db6040880160208901613f6f565b6113eb6060890160408a01613f6f565b606089013560808a013560a08b013560c08c01356114106101008e0160e08f0161423f565b8d6101000160208101906114249190613f6f565b8e610120016020810190611438919061423f565b8f61014001602081019061144c9190613f6f565b60408051602081019d909d526001600160a01b039b8c16908d0152988a1660608c015296891660808b015260a08a019590955260c089019390935260e0880191909152610100870152151561012086015283166101408501521515610160840152166101808201526101a0016040516020818303038152906040528051906020012090505f6114da82612d8d565b90505f6041851061154c575f6115258388888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250612dd492505050565b90506115346020890189613f6f565b6001600160a01b0316816001600160a01b0316149150505b806116235761155e6020880188613f6f565b6001600160a01b03163b5f03611579575f93505050506118d7565b6115866020880188613f6f565b6001600160a01b0316631626ba7e8388886040518463ffffffff1660e01b81526004016115b593929190614349565b602060405180830381865afa9250505080156115ee575060408051601f3d908101601f191682019092526115eb9181019061436b565b60015b6115fd575f93505050506118d7565b6001600160e01b03198116630b135d3f60e11b14611621575f9450505050506118d7565b505b60065f61163360208a018a613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c08b0135825290925290205460ff1615611670575f93505050506118d7565b60a08701351580159061168657508660a0013542115b15611696575f93505050506118d7565b60608701356116ab6040890160208a01613f6f565b6001600160a01b03166370a082316116c660208b018b613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611708573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061172c9190614386565b101561173d575f93505050506118d7565b60608701356117526040890160208a01613f6f565b6001600160a01b031663dd62ed3e61176d60208b018b613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa1580156117b5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117d99190614386565b10156118cf576117f0610100880160e0890161423f565b6117ff575f93505050506118d7565b60608701356118146040890160208a01613f6f565b6001600160a01b031663dd62ed3e61182f60208b018b613f6f565b60405160e083901b6001600160e01b03191681526001600160a01b0391821660048201527f00000000000000000000000000000000000000000000000000000000000000009091166024820152604401602060405180830381865afa15801561189a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118be9190614386565b10156118cf575f93505050506118d7565b600193505050505b9392505050565b5f828152602081905260409020600101546118f8816119e0565b6109418383611a86565b610cd27f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95826118de565b336119375f836109fe565b610ba65f82610b1e565b5f61194a612df6565b905090565b6040516001600160a01b0383166024820152604481018290526109419084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152612f1f565b610cd2813361305c565b5f828152602081815260408083206001600160a01b038516845290915290205460ff16610ba6575f828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611a423390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f828152602081815260408083206001600160a01b038516845290915290205460ff1615610ba6575f828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600260015403611b555760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610924565b6002600155565b5f7fccb76b500ea7c6e283a0d8452ef3953b5ef22b66ec9fc9cfcf16c278cc0c6210611b8b6020860186613f6f565b611b9b6040870160208801613f6f565b611bab6060880160408901613f6f565b6060880135608089013560a08a013560c08b0135611bd06101008d0160e08e0161423f565b611be26101208e016101008f01613f6f565b8d610120016020810190611bf6919061423f565b8e610140016020810190611c0a9190613f6f565b60408051602081019d909d526001600160a01b039b8c16908d0152988a1660608c015296891660808b015260a08a019590955260c089019390935260e0880191909152610100870152151561012086015283166101408501521515610160840152166101808201526101a0016040516020818303038152906040528051906020012090505f611c9882612d8d565b90505f60418410611d0a575f611ce38387878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250612dd492505050565b9050611cf26020880188613f6f565b6001600160a01b0316816001600160a01b0316149150505b80611df657611d1c6020870187613f6f565b6001600160a01b03163b5f03611d4557604051638baa579f60e01b815260040160405180910390fd5b5f611d536020880188613f6f565b6001600160a01b0316631626ba7e8488886040518463ffffffff1660e01b8152600401611d8293929190614349565b602060405180830381865afa158015611d9d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dc1919061436b565b90506001600160e01b03198116630b135d3f60e11b14611df457604051638baa579f60e01b815260040160405180910390fd5b505b60065f611e066020890189613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c08a0135825290925290205460ff1615611e5057604051623f613760e71b815260040160405180910390fd5b600160065f611e6260208a018a613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c08b013582529092529020805460ff191691151591909117905560a086013515801590611eb057508560a0013542115b15611ee7576040517fc56873ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608601351580611efa57506080860135155b15611f185760405163162908e360e11b815260040160405180910390fd5b611f286060870160408801613f6f565b6001600160a01b0316611f416040880160208901613f6f565b6001600160a01b031603610ef2576040516333910aef60e11b815260040160405180910390fd5b5f818015611f845750611f82610100850160e0860161423f565b155b8015611f9f5750611f9d6101408501610120860161423f565b155b90505f611fb46101408601610120870161423f565b611fcd57611fc86060860160408701613f6f565b611fef565b7f00000000000000000000000000000000000000000000000000000000000000005b90505f806120036040880160208901613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015612047573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061206b9190614386565b905061207e610100880160e0890161423f565b1561213f576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016636aa209a66120c260408a0160208b01613f6f565b6120cf60208b018b613f6f565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015230604482015260608a013560648201526084015f604051808303815f87803b158015612124575f80fd5b505af1158015612136573d5f803e3d5ffd5b50505050612176565b61217661214f6020890189613f6f565b3060608a013561216560408c0160208d01613f6f565b6001600160a01b03169291906130ce565b806121876040890160208a01613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156121cb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121ef9190614386565b6121f9919061439d565b9150505f83156123d2575f6001600160a01b0384166370a082316122256101208b016101008c01613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612267573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228b9190614386565b90506122b5336122a36101208b016101008c01613f6f565b6001600160a01b03871691908a6130ce565b5f816001600160a01b0386166370a082316122d86101208d016101008e01613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561231a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233e9190614386565b612348919061439d565b9050886080013581101561236f5760405163bb2875c360e01b815260040160405180910390fd5b5f6127106004548661238191906143b0565b61238b91906143c7565b905080156123be576123be6123a660408c0160208d01613f6f565b826123b96101608e016101408f01613f6f565b61311f565b6123c8818661439d565b9350505050612649565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612418573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061243c9190614386565b90506124536001600160a01b03861633308b6130ce565b6040516370a0823160e01b815230600482015281906001600160a01b038716906370a0823190602401602060405180830381865afa158015612497573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124bb9190614386565b6124c5919061439d565b91506124da9050610100890160e08a0161423f565b15612590575f612710600454836124f191906143b0565b6124fb91906143c7565b90505f612508828461439d565b9050896080013581101561252f5760405163bb2875c360e01b815260040160405180910390fd5b811561254c5761254c86836123b96101608e016101408f01613f6f565b61255a8a8b60800135613228565b5f61256960808c01358361439d565b90508015612585576125856001600160a01b038816338361194f565b859450505050612647565b87608001358110156125b55760405163bb2875c360e01b815260040160405180910390fd5b5f612710600454856125c791906143b0565b6125d191906143c7565b905080156125ff576125ff6125ec60408b0160208c01613f6f565b826123b96101608d016101408e01613f6f565b61260d898a60800135613228565b5f61261c60808b01358461439d565b90508015612638576126386001600160a01b038716338361194f565b612642828661439d565b935050505b505b801561267457612674338261266460408b0160208c01613f6f565b6001600160a01b0316919061194f565b61268587886080013583600161338f565b50505050505050565b606060ff83146126a8576126a183613454565b9050610894565b8180546126b4906143e6565b80601f01602080910402602001604051908101604052809291908181526020018280546126e0906143e6565b801561272b5780601f106127025761010080835404028352916020019161272b565b820191905f5260205f20905b81548152906001019060200180831161270e57829003601f168201915b50505050509050610894565b5f805b83811015612785578484828181106127545761275461425a565b90506020028101906127669190614418565b612771903583614436565b91508061277d81614282565b91505061273a565b5084606001358111156127ab5760405163b6972a8760e01b815260040160405180910390fd5b81156127ec575f6127c082606088013561439d565b905080156127ea576127ea6127d86020880188613f6f565b338361216560408b0160208c01613f6f565b505b5f6127f8868686613491565b90505f6127106004548361280c91906143b0565b61281691906143c7565b90508015612887575f61283161014089016101208a0161423f565b61284a576128456060890160408a01613f6f565b61286c565b7f00000000000000000000000000000000000000000000000000000000000000005b905061288581836123b96101608c016101408d01613f6f565b505b5f612892828461439d565b905087608001358110156128b95760405163bb2875c360e01b815260040160405180910390fd5b5f85156128df576128ca8983613228565b6128d88560608b013561439d565b9050612969565b6128ed898a60800135613228565b6128fb60808a01358361439d565b90508015612969575f6129166101408b016101208c0161423f565b61292f5761292a60608b0160408c01613f6f565b612951565b7f00000000000000000000000000000000000000000000000000000000000000005b90506129676001600160a01b038216338461194f565b505b612985898761297c578a6080013561297e565b835b838961338f565b505050505050505050565b5f806129a26040870160208801613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156129e6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a0a9190614386565b9050612a32612a1c6020880188613f6f565b30606089013561216560408b0160208c01613f6f565b80612a436040880160208901613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015612a87573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612aab9190614386565b612ab5919061439d565b9150505f61271060045483612aca91906143b0565b612ad491906143c7565b90508015612b0257612b02612aef6040880160208901613f6f565b826123b96101608a016101408b01613f6f565b5f612b0d828461439d565b90505f805b86811015612b5d57878782818110612b2c57612b2c61425a565b9050602002810190612b3e9190614418565b612b49903583614436565b915080612b5581614282565b915050612b12565b5081811115612b7f5760405163b6972a8760e01b815260040160405180910390fd5b612bc47f00000000000000000000000000000000000000000000000000000000000000005f612bb460408c0160208d01613f6f565b6001600160a01b0316919061365c565b612bf97f000000000000000000000000000000000000000000000000000000000000000082612bb460408c0160208d01613f6f565b5f851580612c145750612c146101408a016101208b0161423f565b90505f612c238a8a8a856137a8565b90508960800135811015612c4a5760405163bb2875c360e01b815260040160405180910390fd5b5f8715612ca157612c5b848661439d565b90508015612c7b57612c7b33828d60200160208101906126649190613f6f565b612c8d6101408c016101208d0161423f565b15612c9c57612c9c8b83613228565b612d64565b5f612cac858761439d565b90508015612cd857612cd8612cc460208e018e613f6f565b828e60200160208101906126649190613f6f565b612ce68c8d60800135613228565b612cf460808d01358461439d565b91508115612d62575f612d0f6101408e016101208f0161423f565b612d2857612d2360608e0160408f01613f6f565b612d4a565b7f00000000000000000000000000000000000000000000000000000000000000005b9050612d606001600160a01b038216338561194f565b505b505b612d808b89612d77578c60800135612d79565b835b838b61338f565b5050505050505050505050565b5f610894612d99612df6565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f805f612de185856139ac565b91509150612dee816139ee565b509392505050565b5f306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612e4e57507f000000000000000000000000000000000000000000000000000000000000000046145b15612e7857507f000000000000000000000000000000000000000000000000000000000000000090565b61194a604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f80836001600160a01b031683604051612f399190614449565b5f604051808303815f865af19150503d805f8114612f72576040519150601f19603f3d011682016040523d82523d5f602084013e612f77565b606091505b509150915081612fc95760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646044820152606401610924565b8051156130565780806020019051810190612fe4919061445a565b6130565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610924565b50505050565b5f828152602081815260408083206001600160a01b038516845290915290205460ff16610ba65761308c81613b52565b613097836020613b64565b6040516020016130a8929190614475565b60408051601f198184030181529082905262461bcd60e51b8252610924916004016144f5565b6040516001600160a01b03808516602483015283166044820152606481018290526130569085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611994565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031662b99e366040518163ffffffff1660e01b8152600401602060405180830381865afa15801561317b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061319f9190614507565b90506001600160a01b03821615613214575f6127106131c0611388866143b0565b6131ca91906143c7565b90505f6131d7828661439d565b905081156131f3576131f36001600160a01b038716858461194f565b801561320d5761320d6001600160a01b038716848361194f565b5050613056565b6130566001600160a01b038516828561194f565b61323a6101408301610120840161423f565b15613369576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156132b7575f80fd5b505af11580156132c9573d5f803e3d5ffd5b505f92506132e291505061012084016101008501613f6f565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f8114613329576040519150601f19603f3d011682016040523d82523d5f602084013e61332e565b606091505b5050905080610941576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba661337e61012084016101008501613f6f565b826126646060860160408701613f6f565b60c0840135336133a26020870187613f6f565b6001600160a01b03167fb1e4619d84b25246b24265e0b9213bf6f31036c9dc01072bc5d997f4375e4db06133dc6040890160208a01613f6f565b6133ec60608a0160408b01613f6f565b89606001358989898d6101400160208101906134089190613f6f565b604080516001600160a01b039889168152968816602088015286019490945260608501929092526080840152151560a083015290911660c082015260e00160405180910390a450505050565b60605f61346083613d3f565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f806134a56101408601610120870161423f565b6134be576134b96060860160408701613f6f565b6134e0565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa158015613527573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061354b9190614386565b90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166395dbb6376135896020890189613f6f565b8787308b608001355f6040518763ffffffff1660e01b81526004016135b396959493929190614719565b5f604051808303815f87803b1580156135ca575f80fd5b505af11580156135dc573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201528392506001600160a01b03851691506370a0823190602401602060405180830381865afa158015613624573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136489190614386565b613652919061439d565b9695505050505050565b8015806136ed57506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156136c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136eb9190614386565b155b61375f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610924565b6040516001600160a01b0383166024820152604481018290526109419084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611994565b5f806137bc6101408701610120880161423f565b6137d5576137d06060870160408801613f6f565b6137f7565b7f00000000000000000000000000000000000000000000000000000000000000005b90505f836138165761381161012088016101008901613f6f565b613818565b305b6040516370a0823160e01b81526001600160a01b0380831660048301529192505f918416906370a0823190602401602060405180830381865afa158015613861573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906138859190614386565b6040517f4d1701790000000000000000000000000000000000000000000000000000000081529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690634d170179906138ff908a908a90879060808f0135905f9081908190819060040161475b565b5f604051808303815f87803b158015613916575f80fd5b505af1158015613928573d5f803e3d5ffd5b50506040516370a0823160e01b81526001600160a01b038581166004830152849350861691506370a0823190602401602060405180830381865afa158015613972573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139969190614386565b6139a0919061439d565b98975050505050505050565b5f8082516041036139e0576020830151604084015160608501515f1a6139d487828585613d7f565b945094505050506139e7565b505f905060025b9250929050565b5f816004811115613a0157613a016147b0565b03613a095750565b6001816004811115613a1d57613a1d6147b0565b03613a6a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610924565b6002816004811115613a7e57613a7e6147b0565b03613acb5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610924565b6003816004811115613adf57613adf6147b0565b03610cd25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610924565b60606108946001600160a01b03831660145b60605f613b728360026143b0565b613b7d906002614436565b67ffffffffffffffff811115613b9557613b9561429a565b6040519080825280601f01601f191660200182016040528015613bbf576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f81518110613bf557613bf561425a565b60200101906001600160f81b03191690815f1a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613c3f57613c3f61425a565b60200101906001600160f81b03191690815f1a9053505f613c618460026143b0565b613c6c906001614436565b90505b6001811115613cf0577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613cad57613cad61425a565b1a60f81b828281518110613cc357613cc361425a565b60200101906001600160f81b03191690815f1a90535060049490941c93613ce9816147c4565b9050613c6f565b5083156118d75760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610924565b5f60ff8216601f811115610894576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613db457505f90506003613e33565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613e05573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116613e2d575f60019250925050613e33565b91505f90505b94509492505050565b6001600160e01b031981168114610cd2575f80fd5b5f60208284031215613e61575f80fd5b81356118d781613e3c565b6001600160a01b0381168114610cd2575f80fd5b5f8060408385031215613e91575f80fd5b8235613e9c81613e6c565b946020939093013593505050565b5f60208284031215613eba575f80fd5b5035919050565b5f8083601f840112613ed1575f80fd5b50813567ffffffffffffffff811115613ee8575f80fd5b6020830191508360208260051b85010111156139e7575f80fd5b5f8060208385031215613f13575f80fd5b823567ffffffffffffffff811115613f29575f80fd5b613f3585828601613ec1565b90969095509350505050565b5f8060408385031215613f52575f80fd5b823591506020830135613f6481613e6c565b809150509250929050565b5f60208284031215613f7f575f80fd5b81356118d781613e6c565b5f6101608284031215613f9b575f80fd5b50919050565b5f8083601f840112613fb1575f80fd5b50813567ffffffffffffffff811115613fc8575f80fd5b6020830191508360208285010111156139e7575f80fd5b8015158114610cd2575f80fd5b5f805f805f6101c08688031215614001575f80fd5b61400b8787613f8a565b945061016086013567ffffffffffffffff811115614027575f80fd5b61403388828901613fa1565b90955093505061018086013591506101a086013561405081613fdf565b809150509295509295909350565b5f5b83811015614078578181015183820152602001614060565b50505f910152565b5f815180845261409781602086016020860161405e565b601f01601f19169290920160200192915050565b7fff00000000000000000000000000000000000000000000000000000000000000881681525f602060e0818401526140e660e084018a614080565b83810360408501526140f8818a614080565b606085018990526001600160a01b038816608086015260a0850187905284810360c086015285518082528387019250908301905f5b818110156141495783518352928401929184019160010161412d565b50909c9b505050505050505050505050565b5f805f805f806101c08789031215614171575f80fd5b61417b8888613f8a565b955061016087013567ffffffffffffffff80821115614198575f80fd5b6141a48a838b01613fa1565b90975095506101808901359150808211156141bd575f80fd5b506141ca89828a01613ec1565b9094509250506101a08701356141df81613fdf565b809150509295509295509295565b5f805f6101808486031215614200575f80fd5b61420a8585613f8a565b925061016084013567ffffffffffffffff811115614226575f80fd5b61423286828701613fa1565b9497909650939450505050565b5f6020828403121561424f575f80fd5b81356118d781613fdf565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f600182016142935761429361426e565b5060010190565b634e487b7160e01b5f52604160045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f6101406001600160a01b03808f168452808e1660208501528c60408501528b60608501528a608085015289151560a085015280891660c085015287151560e0850152808716610100850152508061012084015261433781840185876142ae565b9e9d5050505050505050505050505050565b838152604060208201525f6143626040830184866142ae565b95945050505050565b5f6020828403121561437b575f80fd5b81516118d781613e3c565b5f60208284031215614396575f80fd5b5051919050565b818103818111156108945761089461426e565b80820281158282048414176108945761089461426e565b5f826143e157634e487b7160e01b5f52601260045260245ffd5b500490565b600181811c908216806143fa57607f821691505b602082108103613f9b57634e487b7160e01b5f52602260045260245ffd5b5f8235603e1983360301811261442c575f80fd5b9190910192915050565b808201808211156108945761089461426e565b5f825161442c81846020870161405e565b5f6020828403121561446a575f80fd5b81516118d781613fdf565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f83516144ac81601785016020880161405e565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516144e981602884016020880161405e565b01602801949350505050565b602081525f6118d76020830184614080565b5f60208284031215614517575f80fd5b81516118d781613e6c565b8183525f60208085019450825f5b8581101561456857813561454381613e6c565b6001600160a01b03168752818301358388015260409687019690910190600101614530565b509495945050505050565b8183525f602084018094508360051b8101835f5b8681101561470d578383038852603e1980873603018335126145a7575f80fd5b8683350180358552601e19813603016020820135126145c4575f80fd5b602081013501803567ffffffffffffffff808211156145e1575f80fd5b8160051b36036020840113156145f5575f80fd5b604060208801526040870182815260608801905060608360051b890101602085015f607e19873603015b868210156146ea57605f198c85030185528083351261463c575f80fd5b8783350161464d6020820135613e6c565b6001600160a01b0380602083013516865261466b6040830135613e6c565b60408201351660208601526060810135368290038b01811261468b575f80fd5b602082820101358881111561469e575f80fd5b8060061b360360408484010113156146b4575f80fd5b606060408801526146ce6060880182604086860101614522565b965050505060208301925060208501945060018201915061461f565b505050809850505050505050602082019150602088019750600181019050614587565b50909695505050505050565b5f6001600160a01b03808916835260a0602084015261473c60a08401888a614573565b9516604083015250606081019290925215156080909101529392505050565b60e081525f61476e60e083018a8c614573565b6001600160a01b03988916602084015260408301979097525060608101949094529115156080840152151560a083015290921660c09092019190915292915050565b634e487b7160e01b5f52602160045260245ffd5b5f816147d2576147d261426e565b505f19019056fea264697066735822122050f7e0901a7d1c144ff9a4ac5bfac72fe13d16802ec33fbd33181fe891e54e4e64736f6c6343000814003300000000000000000000000099999d19ec98f936934e029e63d1c0a127a15207000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a27000000000000000000000000000000000000000000000000000000000000001e

Deployed ByteCode

0x608060405260043610610294575f3560e01c8063a8b5aaf411610165578063d547741f116100c6578063f36cbd351161007c578063f698da2511610062578063f698da25146107b8578063f8742254146107cc578063fc4a2bca146107ff575f80fd5b8063f36cbd3514610770578063f5b541a614610785575f80fd5b8063d8baf7cf116100ac578063d8baf7cf14610712578063db22af0c14610731578063f2fde38b14610751575f80fd5b8063d547741f146106de578063d73792a9146106fd575f80fd5b8063b70e36f01161011b578063c2f254d411610101578063c2f254d414610667578063cab7e8eb14610686578063ced72f87146106ca575f80fd5b8063b70e36f014610634578063bc063e1a14610653575f80fd5b8063aede36931161014b578063aede3693146105c3578063b365e098146105e2578063b381cf4014610601575f80fd5b8063a8b5aaf414610585578063ac8a584a146105a4575f80fd5b806369fe0e2d1161020f5780638bb9c5bf116101c55780639870d7fe116101ab5780639870d7fe146105345780639d13a2cd14610553578063a217fddf14610572575f80fd5b80638bb9c5bf146104d357806391d14854146104f2575f80fd5b80636e8d6e78116101f55780636e8d6e781461045457806381e026c51461048d57806384b0196e146104ac575f80fd5b806369fe0e2d146104165780636b453c1f14610435575f80fd5b80632f2ff15d1161026457806336568abe1161024a57806336568abe1461038d578063448ed6ee146103ac57806354dd5f74146103e3575f80fd5b80632f2ff15d1461034f5780633493c0c81461036e575f80fd5b806301ffc9a71461029f578063069c9fae146102d3578063248a9ca3146102f45780632eb48a8014610330575f80fd5b3661029b57005b5f80fd5b3480156102aa575f80fd5b506102be6102b9366004613e51565b610832565b60405190151581526020015b60405180910390f35b3480156102de575f80fd5b506102f26102ed366004613e80565b61089a565b005b3480156102ff575f80fd5b5061032261030e366004613eaa565b5f9081526020819052604090206001015490565b6040519081526020016102ca565b34801561033b575f80fd5b506102f261034a366004613f02565b610946565b34801561035a575f80fd5b506102f2610369366004613f41565b6109fe565b348015610379575f80fd5b506102f2610388366004613f6f565b610a22565b348015610398575f80fd5b506102f26103a7366004613f41565b610b1e565b3480156103b7575f80fd5b506005546103cb906001600160a01b031681565b6040516001600160a01b0390911681526020016102ca565b3480156103ee575f80fd5b506103227fccb76b500ea7c6e283a0d8452ef3953b5ef22b66ec9fc9cfcf16c278cc0c621081565b348015610421575f80fd5b506102f2610430366004613eaa565b610baa565b348015610440575f80fd5b506102f261044f366004613f6f565b610ca8565b34801561045f575f80fd5b506102be61046e366004613e80565b600660209081525f928352604080842090915290825290205460ff1681565b348015610498575f80fd5b506102f26104a7366004613fec565b610cd5565b3480156104b7575f80fd5b506104c0610d67565b6040516102ca97969594939291906140ab565b3480156104de575f80fd5b506102f26104ed366004613eaa565b610e0a565b3480156104fd575f80fd5b506102be61050c366004613f41565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561053f575f80fd5b506102f261054e366004613f6f565b610e15565b34801561055e575f80fd5b506102f261056d36600461415b565b610e3f565b34801561057d575f80fd5b506103225f81565b348015610590575f80fd5b506102f261059f3660046141ed565b610efa565b3480156105af575f80fd5b506102f26105be366004613f6f565b611109565b3480156105ce575f80fd5b506102f26105dd366004613eaa565b611133565b3480156105ed575f80fd5b506102f26105fc36600461423f565b611256565b34801561060c575f80fd5b506103cb7f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a2781565b34801561063f575f80fd5b506102f261064e366004613eaa565b61134c565b34801561065e575f80fd5b50610322606481565b348015610672575f80fd5b506102be6106813660046141ed565b61139b565b348015610691575f80fd5b506102be6106a0366004613e80565b6001600160a01b03919091165f908152600660209081526040808320938352929052205460ff1690565b3480156106d5575f80fd5b50600454610322565b3480156106e9575f80fd5b506102f26106f8366004613f41565b6118de565b348015610708575f80fd5b5061032261271081565b34801561071d575f80fd5b506102f261072c366004613f6f565b611902565b34801561073c575f80fd5b506005546102be90600160a01b900460ff1681565b34801561075c575f80fd5b506102f261076b366004613f6f565b61192c565b34801561077b575f80fd5b5061032261138881565b348015610790575f80fd5b506103227f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b3480156107c3575f80fd5b50610322611941565b3480156107d7575f80fd5b506103227f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab9581565b34801561080a575f80fd5b506103cb7f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a1520781565b5f6001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061089457507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff1661092d5760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b60648201526084015b60405180910390fd5b6109416001600160a01b038416338461194f565b505050565b5f5b8181101561094157335f9081526006602052604081206001918585858181106109735761097361425a565b9050602002013581526020019081526020015f205f6101000a81548160ff0219169083151502179055508282828181106109af576109af61425a565b90506020020135336001600160a01b03167f26ccf9904b9b2fb069d347553978928fd2fc65efb2638dcbeb8d142e974479f060405160405180910390a3806109f681614282565b915050610948565b5f82815260208190526040902060010154610a18816119e0565b61094183836119ea565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff16610ab05760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091556040519081527f6923bc73460eec0d50ec94a48ac150d47260f89cf943d94c025ed27f3a6cffe9906020015b60405180910390a15050565b6001600160a01b0381163314610b9c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610924565b610ba68282611a86565b5050565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff16610c385760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b6064821115610c73576040517f2977da4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60048290556040518281527f8c4d35e54a3f2ef1134138fd8ea3daee6a3c89e10d2665996babdf70261e2c7690602001610b12565b610cd27f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95826109fe565b50565b610cdd611b03565b600554600160a01b900460ff168015610d245750335f9081527fee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f602052604090205460ff16155b15610d415760405162572f1f60e91b815260040160405180910390fd5b610d4c858585611b5c565b610d57858383611f68565b610d6060018055565b5050505050565b5f60608082808083610d9a7f5377697463684c696d69744f7264657200000000000000000000000000000010600261268e565b610dc57f3200000000000000000000000000000000000000000000000000000000000001600361268e565b604080515f808252602082019092527f0f000000000000000000000000000000000000000000000000000000000000009b939a50919850469750309650945092509050565b33610ba68282610b1e565b610cd27f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929826109fe565b610e47611b03565b600554600160a01b900460ff168015610e8e5750335f9081527fee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f602052604090205460ff16155b15610eab5760405162572f1f60e91b815260040160405180910390fd5b610eb6868686611b5c565b610ec7610100870160e0880161423f565b15610edd57610ed886848484612737565b610ee9565b610ee986848484612990565b610ef260018055565b505050505050565b6005546001600160a01b03163314610f545760405162461bcd60e51b815260206004820152600c60248201527f4f6e6c7920504c53466c6f7700000000000000000000000000000000000000006044820152606401610924565b60608301351580610f6757506080830135155b15610f855760405163162908e360e11b815260040160405180910390fd5b610f956060840160408501613f6f565b6001600160a01b0316610fae6040850160208601613f6f565b6001600160a01b031603610fd5576040516333910aef60e11b815260040160405180910390fd5b60065f610fe56020860186613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c0870135825290925290205460ff161561102f57604051623f613760e71b815260040160405180910390fd5b60c08301356110416020850185613f6f565b6001600160a01b03167f8c4ad7ba07e9663cc8538baa98e0186bf0ce2f6d036f32de3d9591d7e77fb1cd61107b6040870160208801613f6f565b61108b6060880160408901613f6f565b6060880135608089013560a08a01356110ab6101008c0160e08d0161423f565b6110bd6101208d016101008e01613f6f565b6110cf6101408e016101208f0161423f565b8d6101400160208101906110e39190613f6f565b8d8d6040516110fc9b9a999897969594939291906142d6565b60405180910390a3505050565b610cd27f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929826118de565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff166111c15760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b6040515f90339084908381818185875af1925050503d805f8114611200576040519150601f19603f3d011682016040523d82523d5f602084013e611205565b606091505b50509050806109415760405162461bcd60e51b815260206004820152601660248201527f4e6174697665207472616e73666572206661696c6564000000000000000000006044820152606401610924565b335f8181527fa54247010af6b3693b80aceddfad12e077c5de3571e6243fada502635f0d7d39602052604090205460ff166112e45760405162461bcd60e51b815260206004820152602860248201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160448201526734b73a30b4b732b960c11b6064820152608401610924565b60058054831515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040517fc97fad0dfb17dfe134a2d04c51583e05eaf958c56d1f99e41dc6ec7cee03cdd490610b1290841515815260200190565b335f818152600660209081526040808320858452909152808220805460ff19166001179055518392917f26ccf9904b9b2fb069d347553978928fd2fc65efb2638dcbeb8d142e974479f091a350565b5f807fccb76b500ea7c6e283a0d8452ef3953b5ef22b66ec9fc9cfcf16c278cc0c62106113cb6020870187613f6f565b6113db6040880160208901613f6f565b6113eb6060890160408a01613f6f565b606089013560808a013560a08b013560c08c01356114106101008e0160e08f0161423f565b8d6101000160208101906114249190613f6f565b8e610120016020810190611438919061423f565b8f61014001602081019061144c9190613f6f565b60408051602081019d909d526001600160a01b039b8c16908d0152988a1660608c015296891660808b015260a08a019590955260c089019390935260e0880191909152610100870152151561012086015283166101408501521515610160840152166101808201526101a0016040516020818303038152906040528051906020012090505f6114da82612d8d565b90505f6041851061154c575f6115258388888080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250612dd492505050565b90506115346020890189613f6f565b6001600160a01b0316816001600160a01b0316149150505b806116235761155e6020880188613f6f565b6001600160a01b03163b5f03611579575f93505050506118d7565b6115866020880188613f6f565b6001600160a01b0316631626ba7e8388886040518463ffffffff1660e01b81526004016115b593929190614349565b602060405180830381865afa9250505080156115ee575060408051601f3d908101601f191682019092526115eb9181019061436b565b60015b6115fd575f93505050506118d7565b6001600160e01b03198116630b135d3f60e11b14611621575f9450505050506118d7565b505b60065f61163360208a018a613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c08b0135825290925290205460ff1615611670575f93505050506118d7565b60a08701351580159061168657508660a0013542115b15611696575f93505050506118d7565b60608701356116ab6040890160208a01613f6f565b6001600160a01b03166370a082316116c660208b018b613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611708573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061172c9190614386565b101561173d575f93505050506118d7565b60608701356117526040890160208a01613f6f565b6001600160a01b031663dd62ed3e61176d60208b018b613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa1580156117b5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117d99190614386565b10156118cf576117f0610100880160e0890161423f565b6117ff575f93505050506118d7565b60608701356118146040890160208a01613f6f565b6001600160a01b031663dd62ed3e61182f60208b018b613f6f565b60405160e083901b6001600160e01b03191681526001600160a01b0391821660048201527f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a152079091166024820152604401602060405180830381865afa15801561189a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118be9190614386565b10156118cf575f93505050506118d7565b600193505050505b9392505050565b5f828152602081905260409020600101546118f8816119e0565b6109418383611a86565b610cd27f339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95826118de565b336119375f836109fe565b610ba65f82610b1e565b5f61194a612df6565b905090565b6040516001600160a01b0383166024820152604481018290526109419084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b031990931692909217909152612f1f565b610cd2813361305c565b5f828152602081815260408083206001600160a01b038516845290915290205460ff16610ba6575f828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611a423390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b5f828152602081815260408083206001600160a01b038516845290915290205460ff1615610ba6575f828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600260015403611b555760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610924565b6002600155565b5f7fccb76b500ea7c6e283a0d8452ef3953b5ef22b66ec9fc9cfcf16c278cc0c6210611b8b6020860186613f6f565b611b9b6040870160208801613f6f565b611bab6060880160408901613f6f565b6060880135608089013560a08a013560c08b0135611bd06101008d0160e08e0161423f565b611be26101208e016101008f01613f6f565b8d610120016020810190611bf6919061423f565b8e610140016020810190611c0a9190613f6f565b60408051602081019d909d526001600160a01b039b8c16908d0152988a1660608c015296891660808b015260a08a019590955260c089019390935260e0880191909152610100870152151561012086015283166101408501521515610160840152166101808201526101a0016040516020818303038152906040528051906020012090505f611c9882612d8d565b90505f60418410611d0a575f611ce38387878080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250612dd492505050565b9050611cf26020880188613f6f565b6001600160a01b0316816001600160a01b0316149150505b80611df657611d1c6020870187613f6f565b6001600160a01b03163b5f03611d4557604051638baa579f60e01b815260040160405180910390fd5b5f611d536020880188613f6f565b6001600160a01b0316631626ba7e8488886040518463ffffffff1660e01b8152600401611d8293929190614349565b602060405180830381865afa158015611d9d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611dc1919061436b565b90506001600160e01b03198116630b135d3f60e11b14611df457604051638baa579f60e01b815260040160405180910390fd5b505b60065f611e066020890189613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c08a0135825290925290205460ff1615611e5057604051623f613760e71b815260040160405180910390fd5b600160065f611e6260208a018a613f6f565b6001600160a01b0316815260208082019290925260409081015f90812060c08b013582529092529020805460ff191691151591909117905560a086013515801590611eb057508560a0013542115b15611ee7576040517fc56873ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608601351580611efa57506080860135155b15611f185760405163162908e360e11b815260040160405180910390fd5b611f286060870160408801613f6f565b6001600160a01b0316611f416040880160208901613f6f565b6001600160a01b031603610ef2576040516333910aef60e11b815260040160405180910390fd5b5f818015611f845750611f82610100850160e0860161423f565b155b8015611f9f5750611f9d6101408501610120860161423f565b155b90505f611fb46101408601610120870161423f565b611fcd57611fc86060860160408701613f6f565b611fef565b7f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a275b90505f806120036040880160208901613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015612047573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061206b9190614386565b905061207e610100880160e0890161423f565b1561213f576001600160a01b037f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a1520716636aa209a66120c260408a0160208b01613f6f565b6120cf60208b018b613f6f565b6040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015230604482015260608a013560648201526084015f604051808303815f87803b158015612124575f80fd5b505af1158015612136573d5f803e3d5ffd5b50505050612176565b61217661214f6020890189613f6f565b3060608a013561216560408c0160208d01613f6f565b6001600160a01b03169291906130ce565b806121876040890160208a01613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156121cb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121ef9190614386565b6121f9919061439d565b9150505f83156123d2575f6001600160a01b0384166370a082316122256101208b016101008c01613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015612267573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061228b9190614386565b90506122b5336122a36101208b016101008c01613f6f565b6001600160a01b03871691908a6130ce565b5f816001600160a01b0386166370a082316122d86101208d016101008e01613f6f565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa15801561231a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061233e9190614386565b612348919061439d565b9050886080013581101561236f5760405163bb2875c360e01b815260040160405180910390fd5b5f6127106004548661238191906143b0565b61238b91906143c7565b905080156123be576123be6123a660408c0160208d01613f6f565b826123b96101608e016101408f01613f6f565b61311f565b6123c8818661439d565b9350505050612649565b6040516370a0823160e01b81523060048201525f9081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612418573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061243c9190614386565b90506124536001600160a01b03861633308b6130ce565b6040516370a0823160e01b815230600482015281906001600160a01b038716906370a0823190602401602060405180830381865afa158015612497573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906124bb9190614386565b6124c5919061439d565b91506124da9050610100890160e08a0161423f565b15612590575f612710600454836124f191906143b0565b6124fb91906143c7565b90505f612508828461439d565b9050896080013581101561252f5760405163bb2875c360e01b815260040160405180910390fd5b811561254c5761254c86836123b96101608e016101408f01613f6f565b61255a8a8b60800135613228565b5f61256960808c01358361439d565b90508015612585576125856001600160a01b038816338361194f565b859450505050612647565b87608001358110156125b55760405163bb2875c360e01b815260040160405180910390fd5b5f612710600454856125c791906143b0565b6125d191906143c7565b905080156125ff576125ff6125ec60408b0160208c01613f6f565b826123b96101608d016101408e01613f6f565b61260d898a60800135613228565b5f61261c60808b01358461439d565b90508015612638576126386001600160a01b038716338361194f565b612642828661439d565b935050505b505b801561267457612674338261266460408b0160208c01613f6f565b6001600160a01b0316919061194f565b61268587886080013583600161338f565b50505050505050565b606060ff83146126a8576126a183613454565b9050610894565b8180546126b4906143e6565b80601f01602080910402602001604051908101604052809291908181526020018280546126e0906143e6565b801561272b5780601f106127025761010080835404028352916020019161272b565b820191905f5260205f20905b81548152906001019060200180831161270e57829003601f168201915b50505050509050610894565b5f805b83811015612785578484828181106127545761275461425a565b90506020028101906127669190614418565b612771903583614436565b91508061277d81614282565b91505061273a565b5084606001358111156127ab5760405163b6972a8760e01b815260040160405180910390fd5b81156127ec575f6127c082606088013561439d565b905080156127ea576127ea6127d86020880188613f6f565b338361216560408b0160208c01613f6f565b505b5f6127f8868686613491565b90505f6127106004548361280c91906143b0565b61281691906143c7565b90508015612887575f61283161014089016101208a0161423f565b61284a576128456060890160408a01613f6f565b61286c565b7f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a275b905061288581836123b96101608c016101408d01613f6f565b505b5f612892828461439d565b905087608001358110156128b95760405163bb2875c360e01b815260040160405180910390fd5b5f85156128df576128ca8983613228565b6128d88560608b013561439d565b9050612969565b6128ed898a60800135613228565b6128fb60808a01358361439d565b90508015612969575f6129166101408b016101208c0161423f565b61292f5761292a60608b0160408c01613f6f565b612951565b7f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a275b90506129676001600160a01b038216338461194f565b505b612985898761297c578a6080013561297e565b835b838961338f565b505050505050505050565b5f806129a26040870160208801613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa1580156129e6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612a0a9190614386565b9050612a32612a1c6020880188613f6f565b30606089013561216560408b0160208c01613f6f565b80612a436040880160208901613f6f565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015612a87573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612aab9190614386565b612ab5919061439d565b9150505f61271060045483612aca91906143b0565b612ad491906143c7565b90508015612b0257612b02612aef6040880160208901613f6f565b826123b96101608a016101408b01613f6f565b5f612b0d828461439d565b90505f805b86811015612b5d57878782818110612b2c57612b2c61425a565b9050602002810190612b3e9190614418565b612b49903583614436565b915080612b5581614282565b915050612b12565b5081811115612b7f5760405163b6972a8760e01b815260040160405180910390fd5b612bc47f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a152075f612bb460408c0160208d01613f6f565b6001600160a01b0316919061365c565b612bf97f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a1520782612bb460408c0160208d01613f6f565b5f851580612c145750612c146101408a016101208b0161423f565b90505f612c238a8a8a856137a8565b90508960800135811015612c4a5760405163bb2875c360e01b815260040160405180910390fd5b5f8715612ca157612c5b848661439d565b90508015612c7b57612c7b33828d60200160208101906126649190613f6f565b612c8d6101408c016101208d0161423f565b15612c9c57612c9c8b83613228565b612d64565b5f612cac858761439d565b90508015612cd857612cd8612cc460208e018e613f6f565b828e60200160208101906126649190613f6f565b612ce68c8d60800135613228565b612cf460808d01358461439d565b91508115612d62575f612d0f6101408e016101208f0161423f565b612d2857612d2360608e0160408f01613f6f565b612d4a565b7f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a275b9050612d606001600160a01b038216338561194f565b505b505b612d808b89612d77578c60800135612d79565b835b838b61338f565b5050505050505050505050565b5f610894612d99612df6565b836040517f19010000000000000000000000000000000000000000000000000000000000008152600281019290925260228201526042902090565b5f805f612de185856139ac565b91509150612dee816139ee565b509392505050565b5f306001600160a01b037f00000000000000000000000079925587be77c25b292c0eca6fedd3a3f07916f916148015612e4e57507f000000000000000000000000000000000000000000000000000000000000017146145b15612e7857507f2d065ceb108e6c2017760dbddefc525eb80ef062da45e717c8b000118f34ce3e90565b61194a604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fe62cbe700c929b45302bc06029a85badee409414151f470b59ef18975112456b918101919091527fad7c5bef027816a800da1736444fb58a807ef4c9603b7848673f7e3a68eb14a560608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b5f80836001600160a01b031683604051612f399190614449565b5f604051808303815f865af19150503d805f8114612f72576040519150601f19603f3d011682016040523d82523d5f602084013e612f77565b606091505b509150915081612fc95760405162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65646044820152606401610924565b8051156130565780806020019051810190612fe4919061445a565b6130565760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610924565b50505050565b5f828152602081815260408083206001600160a01b038516845290915290205460ff16610ba65761308c81613b52565b613097836020613b64565b6040516020016130a8929190614475565b60408051601f198184030181529082905262461bcd60e51b8252610924916004016144f5565b6040516001600160a01b03808516602483015283166044820152606481018290526130569085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611994565b5f7f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a152076001600160a01b031662b99e366040518163ffffffff1660e01b8152600401602060405180830381865afa15801561317b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061319f9190614507565b90506001600160a01b03821615613214575f6127106131c0611388866143b0565b6131ca91906143c7565b90505f6131d7828661439d565b905081156131f3576131f36001600160a01b038716858461194f565b801561320d5761320d6001600160a01b038716848361194f565b5050613056565b6130566001600160a01b038516828561194f565b61323a6101408301610120840161423f565b15613369576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a276001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156132b7575f80fd5b505af11580156132c9573d5f803e3d5ffd5b505f92506132e291505061012084016101008501613f6f565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f8114613329576040519150601f19603f3d011682016040523d82523d5f602084013e61332e565b606091505b5050905080610941576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ba661337e61012084016101008501613f6f565b826126646060860160408701613f6f565b60c0840135336133a26020870187613f6f565b6001600160a01b03167fb1e4619d84b25246b24265e0b9213bf6f31036c9dc01072bc5d997f4375e4db06133dc6040890160208a01613f6f565b6133ec60608a0160408b01613f6f565b89606001358989898d6101400160208101906134089190613f6f565b604080516001600160a01b039889168152968816602088015286019490945260608501929092526080840152151560a083015290911660c082015260e00160405180910390a450505050565b60605f61346083613d3f565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f806134a56101408601610120870161423f565b6134be576134b96060860160408701613f6f565b6134e0565b7f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a275b6040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa158015613527573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061354b9190614386565b90506001600160a01b037f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a15207166395dbb6376135896020890189613f6f565b8787308b608001355f6040518763ffffffff1660e01b81526004016135b396959493929190614719565b5f604051808303815f87803b1580156135ca575f80fd5b505af11580156135dc573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201528392506001600160a01b03851691506370a0823190602401602060405180830381865afa158015613624573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136489190614386565b613652919061439d565b9695505050505050565b8015806136ed57506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156136c7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906136eb9190614386565b155b61375f5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610924565b6040516001600160a01b0383166024820152604481018290526109419084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401611994565b5f806137bc6101408701610120880161423f565b6137d5576137d06060870160408801613f6f565b6137f7565b7f000000000000000000000000a1077a294dde1b09bb078844df40758a5d0f9a275b90505f836138165761381161012088016101008901613f6f565b613818565b305b6040516370a0823160e01b81526001600160a01b0380831660048301529192505f918416906370a0823190602401602060405180830381865afa158015613861573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906138859190614386565b6040517f4d1701790000000000000000000000000000000000000000000000000000000081529091506001600160a01b037f00000000000000000000000099999d19ec98f936934e029e63d1c0a127a152071690634d170179906138ff908a908a90879060808f0135905f9081908190819060040161475b565b5f604051808303815f87803b158015613916575f80fd5b505af1158015613928573d5f803e3d5ffd5b50506040516370a0823160e01b81526001600160a01b038581166004830152849350861691506370a0823190602401602060405180830381865afa158015613972573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139969190614386565b6139a0919061439d565b98975050505050505050565b5f8082516041036139e0576020830151604084015160608501515f1a6139d487828585613d7f565b945094505050506139e7565b505f905060025b9250929050565b5f816004811115613a0157613a016147b0565b03613a095750565b6001816004811115613a1d57613a1d6147b0565b03613a6a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610924565b6002816004811115613a7e57613a7e6147b0565b03613acb5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610924565b6003816004811115613adf57613adf6147b0565b03610cd25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610924565b60606108946001600160a01b03831660145b60605f613b728360026143b0565b613b7d906002614436565b67ffffffffffffffff811115613b9557613b9561429a565b6040519080825280601f01601f191660200182016040528015613bbf576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000815f81518110613bf557613bf561425a565b60200101906001600160f81b03191690815f1a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613c3f57613c3f61425a565b60200101906001600160f81b03191690815f1a9053505f613c618460026143b0565b613c6c906001614436565b90505b6001811115613cf0577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613cad57613cad61425a565b1a60f81b828281518110613cc357613cc361425a565b60200101906001600160f81b03191690815f1a90535060049490941c93613ce9816147c4565b9050613c6f565b5083156118d75760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610924565b5f60ff8216601f811115610894576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613db457505f90506003613e33565b604080515f8082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613e05573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116613e2d575f60019250925050613e33565b91505f90505b94509492505050565b6001600160e01b031981168114610cd2575f80fd5b5f60208284031215613e61575f80fd5b81356118d781613e3c565b6001600160a01b0381168114610cd2575f80fd5b5f8060408385031215613e91575f80fd5b8235613e9c81613e6c565b946020939093013593505050565b5f60208284031215613eba575f80fd5b5035919050565b5f8083601f840112613ed1575f80fd5b50813567ffffffffffffffff811115613ee8575f80fd5b6020830191508360208260051b85010111156139e7575f80fd5b5f8060208385031215613f13575f80fd5b823567ffffffffffffffff811115613f29575f80fd5b613f3585828601613ec1565b90969095509350505050565b5f8060408385031215613f52575f80fd5b823591506020830135613f6481613e6c565b809150509250929050565b5f60208284031215613f7f575f80fd5b81356118d781613e6c565b5f6101608284031215613f9b575f80fd5b50919050565b5f8083601f840112613fb1575f80fd5b50813567ffffffffffffffff811115613fc8575f80fd5b6020830191508360208285010111156139e7575f80fd5b8015158114610cd2575f80fd5b5f805f805f6101c08688031215614001575f80fd5b61400b8787613f8a565b945061016086013567ffffffffffffffff811115614027575f80fd5b61403388828901613fa1565b90955093505061018086013591506101a086013561405081613fdf565b809150509295509295909350565b5f5b83811015614078578181015183820152602001614060565b50505f910152565b5f815180845261409781602086016020860161405e565b601f01601f19169290920160200192915050565b7fff00000000000000000000000000000000000000000000000000000000000000881681525f602060e0818401526140e660e084018a614080565b83810360408501526140f8818a614080565b606085018990526001600160a01b038816608086015260a0850187905284810360c086015285518082528387019250908301905f5b818110156141495783518352928401929184019160010161412d565b50909c9b505050505050505050505050565b5f805f805f806101c08789031215614171575f80fd5b61417b8888613f8a565b955061016087013567ffffffffffffffff80821115614198575f80fd5b6141a48a838b01613fa1565b90975095506101808901359150808211156141bd575f80fd5b506141ca89828a01613ec1565b9094509250506101a08701356141df81613fdf565b809150509295509295509295565b5f805f6101808486031215614200575f80fd5b61420a8585613f8a565b925061016084013567ffffffffffffffff811115614226575f80fd5b61423286828701613fa1565b9497909650939450505050565b5f6020828403121561424f575f80fd5b81356118d781613fdf565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f600182016142935761429361426e565b5060010190565b634e487b7160e01b5f52604160045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b5f6101406001600160a01b03808f168452808e1660208501528c60408501528b60608501528a608085015289151560a085015280891660c085015287151560e0850152808716610100850152508061012084015261433781840185876142ae565b9e9d5050505050505050505050505050565b838152604060208201525f6143626040830184866142ae565b95945050505050565b5f6020828403121561437b575f80fd5b81516118d781613e3c565b5f60208284031215614396575f80fd5b5051919050565b818103818111156108945761089461426e565b80820281158282048414176108945761089461426e565b5f826143e157634e487b7160e01b5f52601260045260245ffd5b500490565b600181811c908216806143fa57607f821691505b602082108103613f9b57634e487b7160e01b5f52602260045260245ffd5b5f8235603e1983360301811261442c575f80fd5b9190910192915050565b808201808211156108945761089461426e565b5f825161442c81846020870161405e565b5f6020828403121561446a575f80fd5b81516118d781613fdf565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081525f83516144ac81601785016020880161405e565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516144e981602884016020880161405e565b01602801949350505050565b602081525f6118d76020830184614080565b5f60208284031215614517575f80fd5b81516118d781613e6c565b8183525f60208085019450825f5b8581101561456857813561454381613e6c565b6001600160a01b03168752818301358388015260409687019690910190600101614530565b509495945050505050565b8183525f602084018094508360051b8101835f5b8681101561470d578383038852603e1980873603018335126145a7575f80fd5b8683350180358552601e19813603016020820135126145c4575f80fd5b602081013501803567ffffffffffffffff808211156145e1575f80fd5b8160051b36036020840113156145f5575f80fd5b604060208801526040870182815260608801905060608360051b890101602085015f607e19873603015b868210156146ea57605f198c85030185528083351261463c575f80fd5b8783350161464d6020820135613e6c565b6001600160a01b0380602083013516865261466b6040830135613e6c565b60408201351660208601526060810135368290038b01811261468b575f80fd5b602082820101358881111561469e575f80fd5b8060061b360360408484010113156146b4575f80fd5b606060408801526146ce6060880182604086860101614522565b965050505060208301925060208501945060018201915061461f565b505050809850505050505050602082019150602088019750600181019050614587565b50909695505050505050565b5f6001600160a01b03808916835260a0602084015261473c60a08401888a614573565b9516604083015250606081019290925215156080909101529392505050565b60e081525f61476e60e083018a8c614573565b6001600160a01b03988916602084015260408301979097525060608101949094529115156080840152151560a083015290921660c09092019190915292915050565b634e487b7160e01b5f52602160045260245ffd5b5f816147d2576147d261426e565b505f19019056fea264697066735822122050f7e0901a7d1c144ff9a4ac5bfac72fe13d16802ec33fbd33181fe891e54e4e64736f6c63430008140033