ETH Price: $1,925.92 (-4.74%)
 

Overview

Max Total Supply

6,150,000 cdxUSD

Holders

1,272

Transfers

-
145 ( -14.20%)

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
CdxUSD

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 150 runs

Other Settings:
paris EvmVersion, BSL 1.1 license
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.22;

import {OFTExtended} from "./OFTExtended.sol";
import {ICdxUSD} from "contracts/interfaces/ICdxUSD.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

/**
 * @title CdxUSD Contract
 * @author Cod3x - Beirao
 * Reference: https://github.com/aave/gho-core/blob/main/src/contracts/gho/GhoToken.sol
 */
contract CdxUSD is ICdxUSD, OFTExtended {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(address => Facilitator) internal facilitators;
    EnumerableSet.AddressSet internal facilitatorsList;

    string internal _name_;
    string internal _symbol_;

    constructor(
        string memory _name,
        string memory _symbol,
        address _lzEndpoint,
        address _delegate,
        address _treasury,
        address _guardian
    ) OFTExtended(_name, _symbol, _lzEndpoint, _delegate, _treasury, _guardian) {
        _name_ = _name;
        _symbol_ = _symbol;
    }

    /**
     * @notice Mints the requested amount of tokens to the account address.
     * @dev Only facilitators with enough bucket capacity available can mint.
     * @dev The bucket level is increased upon minting.
     * @param _account The address receiving the GHO tokens
     * @param _amount The amount to mint
     */
    function mint(address _account, uint256 _amount) external {
        if (_amount == 0) revert CdxUSD__INVALID_MINT_AMOUNT();
        Facilitator storage f = facilitators[msg.sender];

        uint256 currentBucketLevel_ = f.bucketLevel;
        uint256 newBucketLevel_ = currentBucketLevel_ + _amount;
        if (f.bucketCapacity < newBucketLevel_) {
            revert CdxUSD__FACILITATOR_BUCKET_CAPACITY_EXCEEDED();
        }
        f.bucketLevel = uint128(newBucketLevel_);

        _mint(_account, _amount);

        emit FacilitatorBucketLevelUpdated(msg.sender, currentBucketLevel_, newBucketLevel_);
    }

    /**
     * @notice Burns the requested amount of tokens from the account address.
     * @dev Only active facilitators (bucket level > 0) can burn.
     * @dev The bucket level is decreased upon burning.
     * @param _amount The amount to burn
     */
    function burn(uint256 _amount) external {
        if (_amount == 0) revert CdxUSD__INVALID_BURN_AMOUNT();

        Facilitator storage f = facilitators[msg.sender];
        uint256 currentBucketLevel_ = f.bucketLevel;
        uint256 newBucketLevel_ = currentBucketLevel_ - _amount;
        f.bucketLevel = uint128(newBucketLevel_);

        _burn(msg.sender, _amount);

        emit FacilitatorBucketLevelUpdated(msg.sender, currentBucketLevel_, newBucketLevel_);
    }

    /**
     * @notice Add the facilitator passed with the parameters to the facilitators list.
     * @dev Only accounts with `FACILITATOR_MANAGER_ROLE` role can call this function
     * @param _facilitatorAddress The address of the facilitator to add
     * @param _facilitatorLabel A human readable identifier for the facilitator
     * @param _bucketCapacity The upward limit of GHO can be minted by the facilitator
     */
    function addFacilitator(
        address _facilitatorAddress,
        string calldata _facilitatorLabel,
        uint128 _bucketCapacity
    ) external onlyOwner {
        Facilitator storage facilitator = facilitators[_facilitatorAddress];

        if (bytes(facilitator.label).length != 0) revert CdxUSD__FACILITATOR_ALREADY_EXISTS();
        if (bytes(_facilitatorLabel).length == 0) revert CdxUSD__INVALID_LABEL();

        facilitator.label = _facilitatorLabel;
        facilitator.bucketCapacity = _bucketCapacity;

        facilitatorsList.add(_facilitatorAddress);

        emit FacilitatorAdded(
            _facilitatorAddress, keccak256(abi.encodePacked(_facilitatorLabel)), _bucketCapacity
        );
    }

    /**
     * @notice Remove the facilitator from the facilitators list.
     * @dev Only accounts with `FACILITATOR_MANAGER_ROLE` role can call this function
     * @param _facilitatorAddress The address of the facilitator to remove
     */
    function removeFacilitator(address _facilitatorAddress) external onlyOwner {
        if (bytes(facilitators[_facilitatorAddress].label).length == 0) {
            revert CdxUSD__FACILITATOR_DOES_NOT_EXIST();
        }
        if (facilitators[_facilitatorAddress].bucketLevel != 0) {
            revert CdxUSD__FACILITATOR_BUCKET_LEVEL_NOT_ZERO();
        }

        delete facilitators[_facilitatorAddress];
        facilitatorsList.remove(_facilitatorAddress);

        emit FacilitatorRemoved(_facilitatorAddress);
    }

    /**
     * @notice Set the bucket capacity of the facilitator.
     * @dev Only accounts with `BUCKET_MANAGER_ROLE` role can call this function
     * @param _facilitator The address of the facilitator
     * @param _newCapacity The new capacity of the bucket
     */
    function setFacilitatorBucketCapacity(address _facilitator, uint128 _newCapacity)
        external
        onlyOwner
    {
        if (bytes(facilitators[_facilitator].label).length == 0) {
            revert CdxUSD__FACILITATOR_DOES_NOT_EXIST();
        }

        uint256 oldCapacity_ = facilitators[_facilitator].bucketCapacity;
        facilitators[_facilitator].bucketCapacity = _newCapacity;

        emit FacilitatorBucketCapacityUpdated(_facilitator, oldCapacity_, _newCapacity);
    }

    /**
     * Setter to update the name of the ERC20.
     * @param _name The new name.
     */
    function setName(string memory _name) external onlyOwner {
        _name_ = _name;
    }

    /**
     * Setter to update the symbol of the ERC20.
     * @param _symbol The new name.
     */
    function setSymbol(string memory _symbol) external onlyOwner {
        _symbol_ = _symbol;
    }

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

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

    /**
     * @notice Returns the facilitator data
     * @param _facilitator The address of the facilitator
     * @return The facilitator configuration
     */
    function getFacilitator(address _facilitator) external view returns (Facilitator memory) {
        return facilitators[_facilitator];
    }

    /**
     * @notice Returns the bucket configuration of the facilitator
     * @param _facilitator The address of the facilitator
     * @return The capacity of the facilitator's bucket
     * @return The level of the facilitator's bucket
     */
    function getFacilitatorBucket(address _facilitator) external view returns (uint256, uint256) {
        return (facilitators[_facilitator].bucketCapacity, facilitators[_facilitator].bucketLevel);
    }

    /**
     * @notice Returns the list of the addresses of the active facilitator
     * @return The list of the facilitators addresses
     */
    function getFacilitatorsList() external view returns (address[] memory) {
        return facilitatorsList.values();
    }
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.22;

import {IOFTExtended} from "contracts/interfaces/IOFTExtended.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
import {OFTCore} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFTCore.sol";

/**
 * @title OFTExtended Contract
 * @author Cod3x - Beirao
 * @dev OFT token that extends the functionality of the OFTCore contract by adding some features:
 *          - Possibility to pause bridge transactions
 *          - Limit bridging rate
 *          - Hourly limit rate
 *          - Possibility to enable fees
 */
abstract contract OFTExtended is IOFTExtended, OFTCore, ERC20, ERC20Permit {
    uint256 internal constant BPS = 10000;

    /// --- Bridge Config ---
    /// @notice Mapping giving the config for a specific EID.
    mapping(uint32 => int256) internal eidToMinBalanceLimit;
    /// @notice Global max amount of assets that can be bridged per hour.
    uint256 public hourlyLimit;
    /// @notice Fee charged for bridging out of the hosting chain in BPS.
    uint256 public fee;

    /// --- Bridge Utilization ---
    /// @notice Mapping giving the balance for a specific EID.
    // Track the balance between the hosting network and a specific chain:
    // balanceUtilization < 0 => more token sent than received
    // balanceUtilization > 0 => more token received than sent
    mapping(uint32 => int256) internal eidToBalanceUtilization;
    /// @notice Max amount of assets that can be bridged per hour.
    uint256 public slidingHourlyLimitUtilization;
    /// @notice Variable used for hourly limit calculation.
    uint256 public lastUsedTimestamp;

    /// --- Vars ---
    /// @notice Pause any bridging operation.
    bool public lzPause;
    /// @notice Guardian address that can toggle pause.
    address public guardian;
    /// @notice treasury address that receives fees.
    address public treasury;

    modifier onlyGuardian() {
        if (msg.sender != guardian) {
            revert OFTExtended__ONLY_ADMINS();
        }
        _;
    }

    /**
     * @dev Constructor for the OFT contract.
     * @param _name The name of the OFT.
     * @param _symbol The symbol of the OFT.
     * @param _lzEndpoint The LayerZero endpoint address.
     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
     */
    constructor(
        string memory _name,
        string memory _symbol,
        address _lzEndpoint,
        address _delegate,
        address _treasury,
        address _guardian
    )
        ERC20("", "") // `name()` and `symbol()` are overridden in CdxUSD.sol.
        ERC20Permit(_name)
        OFTCore(decimals(), _lzEndpoint, _delegate)
        Ownable(_delegate)
    {
        treasury = _treasury;
        guardian = _guardian;

        emit SetTreasury(_treasury);
        emit SetGuardian(_guardian);
    }

    // ======================= Getters ================================

    function getBalanceLimit(uint32 _dstEid) external view returns (int256) {
        return eidToMinBalanceLimit[_dstEid];
    }

    function getBalanceUtilization(uint32 _dstEid) external view returns (int256) {
        return eidToBalanceUtilization[_dstEid];
    }

    // ======================= Admin Functions ================================

    /**
     * @notice Admin function for modifying the `minBalanceLimit` of a specific network bridge.
     * @dev To pause a specific eid you can set `minBalanceLimit` to 0.
     * @param _eid network to be modified.
     * @param _minBalanceLimit authorized max negative balance. (always < 0)
     */
    function setBalanceLimit(uint32 _eid, int256 _minBalanceLimit) external onlyOwner {
        // `_minBalanceLimit` represent the imbalance limitation. Since we are only limiting the outflow
        // `_minBalanceLimit` must always be negative.
        if (_minBalanceLimit > 0) revert OFTExtended__LIMIT_MUST_BE_NEGATIVE();

        eidToMinBalanceLimit[_eid] = _minBalanceLimit;

        emit SetBalanceLimit(_eid, _minBalanceLimit);
    }
    /**
     *  @notice Admin function for modifying the `hourlyLimit`.
     * @dev set `hourlyLimit` to type(uint256).max will give infinite bridging capacity and skip the check.
     * @param _hourlyLimit authorized max hourly volume.
     */

    function setHourlyLimit(uint256 _hourlyLimit) external onlyOwner {
        if (hourlyLimit != _hourlyLimit) {
            _updateHourlyLimit(0);
        }

        hourlyLimit = _hourlyLimit;

        emit SetHourlyLimit(_hourlyLimit);
    }
    /**
     *  @notice Admin function for modifying the `fee`.
     *  @param _fee fee charged on bridging transactions. (in BPS)
     */

    function setFee(uint256 _fee) external onlyOwner {
        if (_fee > BPS / 10) revert OFTExtended__FEE_TOO_HIGH();
        fee = _fee;

        emit SetFee(_fee);
    }

    /**
     * @notice set treasury address.
     * @dev this address will receive fees.
     * @param _treasury treasury address.
     */
    function setTreasury(address _treasury) external onlyOwner {
        treasury = _treasury;
        emit SetTreasury(_treasury);
    }

    /**
     * @notice set guardian address.
     * @param _guardian guardian address.
     */
    function setGuardian(address _guardian) external onlyOwner {
        guardian = _guardian;
        emit SetGuardian(_guardian);
    }

    /**
     * @notice Pause on the `send()` function.
     * @dev restricted to guardian.
     */
    function pauseBridge() external onlyGuardian {
        lzPause = true;
        emit ToggleBridgePause(true);
    }

    /**
     * @notice Unpause on the `send()` function.
     * @dev restricted to owner.
     */
    function unpauseBridge() external onlyOwner {
        lzPause = false;
        emit ToggleBridgePause(false);
    }

    // ======================= LayerZero override Functions ================================

    /**
     * @dev Retrieves the address of the underlying ERC20 implementation.
     * @return The address of the OFT token.
     *
     * @dev In the case of OFT, address(this) and erc20 are the same contract.
     */
    function token() public view returns (address) {
        return address(this);
    }

    /**
     * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.
     * @return requiresApproval Needs approval of the underlying token implementation.
     *
     * @dev In the case of OFT where the contract IS the token, approval is NOT required.
     */
    function approvalRequired() external pure virtual returns (bool) {
        return false;
    }

    /**
     * @dev Burns tokens from the sender's specified balance.
     * @param _from The address to debit the tokens from.
     * @param _amountLD The amount of tokens to send in local decimals.
     * @param _minAmountLD The minimum amount to send in local decimals.
     * @param _dstEid The destination chain ID.
     * @return amountSentLD_ The amount sent in local decimals.
     * @return amountReceivedLD_ The amount received in local decimals on the remote.
     */
    function _debit(address _from, uint256 _amountLD, uint256 _minAmountLD, uint32 _dstEid)
        internal
        virtual
        override
        returns (uint256 amountSentLD_, uint256 amountReceivedLD_)
    {
        // Pause check
        if (lzPause) revert OFTExtended__BRIDGING_PAUSED();

        (amountSentLD_, amountReceivedLD_) = _debitView(_amountLD, _minAmountLD, _dstEid);

        // Send fee to treasury
        uint256 feeAmt_ = amountSentLD_ - amountReceivedLD_;
        if (feeAmt_ != 0) {
            _transfer(_from, treasury, feeAmt_);
        }

        // Balance check
        {
            int256 balanceUpdate_ = eidToBalanceUtilization[_dstEid] - int256(amountReceivedLD_);
            if (balanceUpdate_ < eidToMinBalanceLimit[_dstEid]) {
                revert OFTExtended__BRIDGING_LIMIT_REACHED(_dstEid);
            }
            eidToBalanceUtilization[_dstEid] = balanceUpdate_;
        }

        // Hourly limit check
        uint256 hourlyLimit_ = hourlyLimit;
        if (hourlyLimit_ != type(uint256).max) {
            _updateHourlyLimit(amountReceivedLD_);

            if (slidingHourlyLimitUtilization > hourlyLimit_) {
                revert OFTExtended__BRIDGING_HOURLY_LIMIT_REACHED(_dstEid);
            }
        }

        _burn(_from, amountReceivedLD_);
    }

    /**
     * @dev Internal function to mock the amount mutation from a OFT debit() operation.
     * @param _amountLD The amount to send in local decimals.
     * @param _minAmountLD The minimum amount to send in local decimals.
     * @param _dstEid Destination chain endpoint ID.
     * @return amountSentLD_ The amount sent, in local decimals.
     * @return amountReceivedLD_ The amount to be received on the remote chain, in local decimals.
     *
     * @dev Fees would be calculated and deducted from the amount to be received on the remote.
     */
    function _debitView(uint256 _amountLD, uint256 _minAmountLD, uint32 _dstEid)
        internal
        view
        override
        returns (uint256 amountSentLD_, uint256 amountReceivedLD_)
    {
        amountSentLD_ = _removeDust(_amountLD);

        // Fee calculation
        uint256 fee_ = fee;
        if (fee_ != 0 && treasury != address(0)) {
            amountReceivedLD_ = _removeDust(amountSentLD_ - (amountSentLD_ * fee_ / BPS));
        } else {
            amountReceivedLD_ = amountSentLD_;
        }

        // Check for slippage.
        if (amountReceivedLD_ < _minAmountLD) {
            revert SlippageExceeded(amountReceivedLD_, _minAmountLD);
        }
    }

    /**
     * @dev Credits tokens to the specified address.
     * @param _to The address to credit the tokens to.
     * @param _amountLD The amount of tokens to credit in local decimals.
     * @dev _srcEid The source chain ID.
     * @return amountReceivedLD_ The amount of tokens ACTUALLY received in local decimals.
     */
    function _credit(address _to, uint256 _amountLD, uint32 _srcEid)
        internal
        virtual
        override
        returns (uint256 amountReceivedLD_)
    {
        // Balance update
        eidToBalanceUtilization[_srcEid] += int256(_amountLD);

        // @dev In the case of NON-default OFT, the _amountLD MIGHT not be == amountReceivedLD.
        _mint(_to, _amountLD);
        return _amountLD;
    }

    /**
     * @dev Update the hourly limit.
     * @param _amount The amount of tokens sent crosschain.
     */
    function _updateHourlyLimit(uint256 _amount) internal {
        uint256 timeElapsed_ = block.timestamp - lastUsedTimestamp;

        uint256 slidingUtilizationDecrease_ = timeElapsed_ * hourlyLimit / 1 hours;

        // Update the sliding utilization, making sure it doesn't become negative
        uint256 slidingHourlyLimitUtilization_ = slidingHourlyLimitUtilization;

        slidingHourlyLimitUtilization = slidingHourlyLimitUtilization_
            - min(slidingUtilizationDecrease_, slidingHourlyLimitUtilization_) + _amount;

        lastUsedTimestamp = block.timestamp;
    }

    // ================================== Helpers ===================================

    function min(uint256 _a, uint256 _b) internal pure returns (uint256) {
        return _a < _b ? _a : _b;
    }
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {IOFTExtended} from "./IOFTExtended.sol";

interface ICdxUSD is IOFTExtended {
    // ======================= Errors ================================

    error CdxUSD__INVALID_MINT_AMOUNT();
    error CdxUSD__INVALID_BURN_AMOUNT();
    error CdxUSD__FACILITATOR_BUCKET_CAPACITY_EXCEEDED();
    error CdxUSD__FACILITATOR_ALREADY_EXISTS();
    error CdxUSD__INVALID_LABEL();
    error CdxUSD__FACILITATOR_DOES_NOT_EXIST();
    error CdxUSD__FACILITATOR_BUCKET_LEVEL_NOT_ZERO();

    // ================================== Events ===================================

    event FacilitatorAdded(
        address indexed facilitatorAddress, bytes32 indexed label, uint256 bucketCapacity
    );
    event FacilitatorRemoved(address indexed facilitatorAddress);
    event FacilitatorBucketCapacityUpdated(
        address indexed facilitatorAddress, uint256 oldCapacity, uint256 newCapacity
    );
    event FacilitatorBucketLevelUpdated(
        address indexed facilitatorAddress, uint256 oldLevel, uint256 newLevel
    );

    // ======================= Structs ================================

    struct Facilitator {
        uint128 bucketCapacity;
        uint128 bucketLevel;
        string label;
    }

    // ======================= Interfaces ================================

    function mint(address account, uint256 amount) external;

    function burn(uint256 amount) external;

    function addFacilitator(
        address facilitatorAddress,
        string calldata facilitatorLabel,
        uint128 bucketCapacity
    ) external;

    function removeFacilitator(address facilitatorAddress) external;

    function setFacilitatorBucketCapacity(address facilitator, uint128 newCapacity) external;

    function getFacilitator(address facilitator) external view returns (Facilitator memory);

    function getFacilitatorBucket(address facilitator) external view returns (uint256, uint256);

    function getFacilitatorsList() external view returns (address[] memory);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._positions[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the tracked position for the deleted slot
            delete set._positions[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._positions[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;

import {IOFT} from "@layerzerolabs/lz-evm-oapp-v2/contracts/oft/OFTCore.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol";

interface IOFTExtended is IOFT, IERC20 /*, IERC20Permit */ {
    // ======================= Errors ================================

    error OFTExtended__ONLY_ADMINS();
    error OFTExtended__BRIDGING_LIMIT_REACHED(uint32 _eid);
    error OFTExtended__BRIDGING_HOURLY_LIMIT_REACHED(uint32 _eid);
    error OFTExtended__BRIDGING_PAUSED();
    error OFTExtended__LIMIT_MUST_BE_NEGATIVE();
    error OFTExtended__FEE_TOO_HIGH();

    // ================================== Events ===================================

    event SetBalanceLimit(uint32 indexed _eid, int256 _minBalanceLimit);
    event SetFee(uint256 _fee);
    event SetHourlyLimit(uint256 _hourlyLimit);
    event SetTreasury(address _newTreasury);
    event SetGuardian(address _newGuardian);
    event ToggleBridgePause(bool _pause);

    // ======================= Interfaces ================================

    function setBalanceLimit(uint32 _eid, int256 _minBalanceLimit) external;

    function setHourlyLimit(uint256 _hourlyLimit) external;

    function setFee(uint256 _fee) external;

    function setTreasury(address _treasury) external;

    function setGuardian(address _guardian) external;

    function pauseBridge() external;

    function unpauseBridge() external;

    function getBalanceLimit(uint32 _dstEid) external view returns (int256);

    function getBalanceUtilization(uint32 _dstEid) external view returns (int256);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)

pragma solidity ^0.8.20;

import {IERC20Permit} from "./IERC20Permit.sol";
import {ERC20} from "../ERC20.sol";
import {ECDSA} from "../../../utils/cryptography/ECDSA.sol";
import {EIP712} from "../../../utils/cryptography/EIP712.sol";
import {Nonces} from "../../../utils/Nonces.sol";

/**
 * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
    bytes32 private constant PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /**
     * @dev Permit deadline has expired.
     */
    error ERC2612ExpiredSignature(uint256 deadline);

    /**
     * @dev Mismatched signature.
     */
    error ERC2612InvalidSigner(address signer, address owner);

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {}

    /**
     * @inheritdoc IERC20Permit
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        if (block.timestamp > deadline) {
            revert ERC2612ExpiredSignature(deadline);
        }

        bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        if (signer != owner) {
            revert ERC2612InvalidSigner(signer, owner);
        }

        _approve(owner, spender, value);
    }

    /**
     * @inheritdoc IERC20Permit
     */
    function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) {
        return super.nonces(owner);
    }

    /**
     * @inheritdoc IERC20Permit
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {
        return _domainSeparatorV4();
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { OApp, Origin } from "../oapp/OApp.sol";
import { OAppOptionsType3 } from "../oapp/libs/OAppOptionsType3.sol";
import { IOAppMsgInspector } from "../oapp/interfaces/IOAppMsgInspector.sol";

import { OAppPreCrimeSimulator } from "../precrime/OAppPreCrimeSimulator.sol";

import { IOFT, SendParam, OFTLimit, OFTReceipt, OFTFeeDetail, MessagingReceipt, MessagingFee } from "./interfaces/IOFT.sol";
import { OFTMsgCodec } from "./libs/OFTMsgCodec.sol";
import { OFTComposeMsgCodec } from "./libs/OFTComposeMsgCodec.sol";

/**
 * @title OFTCore
 * @dev Abstract contract for the OftChain (OFT) token.
 */
abstract contract OFTCore is IOFT, OApp, OAppPreCrimeSimulator, OAppOptionsType3 {
    using OFTMsgCodec for bytes;
    using OFTMsgCodec for bytes32;

    // @notice Provides a conversion rate when swapping between denominations of SD and LD
    //      - shareDecimals == SD == shared Decimals
    //      - localDecimals == LD == local decimals
    // @dev Considers that tokens have different decimal amounts on various chains.
    // @dev eg.
    //  For a token
    //      - locally with 4 decimals --> 1.2345 => uint(12345)
    //      - remotely with 2 decimals --> 1.23 => uint(123)
    //      - The conversion rate would be 10 ** (4 - 2) = 100
    //  @dev If you want to send 1.2345 -> (uint 12345), you CANNOT represent that value on the remote,
    //  you can only display 1.23 -> uint(123).
    //  @dev To preserve the dust that would otherwise be lost on that conversion,
    //  we need to unify a denomination that can be represented on ALL chains inside of the OFT mesh
    uint256 public immutable decimalConversionRate;

    // @notice Msg types that are used to identify the various OFT operations.
    // @dev This can be extended in child contracts for non-default oft operations
    // @dev These values are used in things like combineOptions() in OAppOptionsType3.sol.
    uint16 public constant SEND = 1;
    uint16 public constant SEND_AND_CALL = 2;

    // Address of an optional contract to inspect both 'message' and 'options'
    address public msgInspector;
    event MsgInspectorSet(address inspector);

    /**
     * @dev Constructor.
     * @param _localDecimals The decimals of the token on the local chain (this chain).
     * @param _endpoint The address of the LayerZero endpoint.
     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
     */
    constructor(uint8 _localDecimals, address _endpoint, address _delegate) OApp(_endpoint, _delegate) {
        if (_localDecimals < sharedDecimals()) revert InvalidLocalDecimals();
        decimalConversionRate = 10 ** (_localDecimals - sharedDecimals());
    }

    /**
     * @notice Retrieves interfaceID and the version of the OFT.
     * @return interfaceId The interface ID.
     * @return version The version.
     *
     * @dev interfaceId: This specific interface ID is '0x02e49c2c'.
     * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.
     * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.
     * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)
     */
    function oftVersion() external pure virtual returns (bytes4 interfaceId, uint64 version) {
        return (type(IOFT).interfaceId, 1);
    }

    /**
     * @dev Retrieves the shared decimals of the OFT.
     * @return The shared decimals of the OFT.
     *
     * @dev Sets an implicit cap on the amount of tokens, over uint64.max() will need some sort of outbound cap / totalSupply cap
     * Lowest common decimal denominator between chains.
     * Defaults to 6 decimal places to provide up to 18,446,744,073,709.551615 units (max uint64).
     * For tokens exceeding this totalSupply(), they will need to override the sharedDecimals function with something smaller.
     * ie. 4 sharedDecimals would be 1,844,674,407,370,955.1615
     */
    function sharedDecimals() public view virtual returns (uint8) {
        return 6;
    }

    /**
     * @dev Sets the message inspector address for the OFT.
     * @param _msgInspector The address of the message inspector.
     *
     * @dev This is an optional contract that can be used to inspect both 'message' and 'options'.
     * @dev Set it to address(0) to disable it, or set it to a contract address to enable it.
     */
    function setMsgInspector(address _msgInspector) public virtual onlyOwner {
        msgInspector = _msgInspector;
        emit MsgInspectorSet(_msgInspector);
    }

    /**
     * @notice Provides a quote for OFT-related operations.
     * @param _sendParam The parameters for the send operation.
     * @return oftLimit The OFT limit information.
     * @return oftFeeDetails The details of OFT fees.
     * @return oftReceipt The OFT receipt information.
     */
    function quoteOFT(
        SendParam calldata _sendParam
    )
        external
        view
        virtual
        returns (OFTLimit memory oftLimit, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory oftReceipt)
    {
        uint256 minAmountLD = 0; // Unused in the default implementation.
        uint256 maxAmountLD = type(uint64).max; // Unused in the default implementation.
        oftLimit = OFTLimit(minAmountLD, maxAmountLD);

        // Unused in the default implementation; reserved for future complex fee details.
        oftFeeDetails = new OFTFeeDetail[](0);

        // @dev This is the same as the send() operation, but without the actual send.
        // - amountSentLD is the amount in local decimals that would be sent from the sender.
        // - amountReceivedLD is the amount in local decimals that will be credited to the recipient on the remote OFT instance.
        // @dev The amountSentLD MIGHT not equal the amount the user actually receives. HOWEVER, the default does.
        (uint256 amountSentLD, uint256 amountReceivedLD) = _debitView(
            _sendParam.amountLD,
            _sendParam.minAmountLD,
            _sendParam.dstEid
        );
        oftReceipt = OFTReceipt(amountSentLD, amountReceivedLD);
    }

    /**
     * @notice Provides a quote for the send() operation.
     * @param _sendParam The parameters for the send() operation.
     * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.
     * @return msgFee The calculated LayerZero messaging fee from the send() operation.
     *
     * @dev MessagingFee: LayerZero msg fee
     *  - nativeFee: The native fee.
     *  - lzTokenFee: The lzToken fee.
     */
    function quoteSend(
        SendParam calldata _sendParam,
        bool _payInLzToken
    ) external view virtual returns (MessagingFee memory msgFee) {
        // @dev mock the amount to receive, this is the same operation used in the send().
        // The quote is as similar as possible to the actual send() operation.
        (, uint256 amountReceivedLD) = _debitView(_sendParam.amountLD, _sendParam.minAmountLD, _sendParam.dstEid);

        // @dev Builds the options and OFT message to quote in the endpoint.
        (bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam, amountReceivedLD);

        // @dev Calculates the LayerZero fee for the send() operation.
        return _quote(_sendParam.dstEid, message, options, _payInLzToken);
    }

    /**
     * @dev Executes the send operation.
     * @param _sendParam The parameters for the send operation.
     * @param _fee The calculated fee for the send() operation.
     *      - nativeFee: The native fee.
     *      - lzTokenFee: The lzToken fee.
     * @param _refundAddress The address to receive any excess funds.
     * @return msgReceipt The receipt for the send operation.
     * @return oftReceipt The OFT receipt information.
     *
     * @dev MessagingReceipt: LayerZero msg receipt
     *  - guid: The unique identifier for the sent message.
     *  - nonce: The nonce of the sent message.
     *  - fee: The LayerZero fee incurred for the message.
     */
    function send(
        SendParam calldata _sendParam,
        MessagingFee calldata _fee,
        address _refundAddress
    ) external payable virtual returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt) {
        // @dev Applies the token transfers regarding this send() operation.
        // - amountSentLD is the amount in local decimals that was ACTUALLY sent/debited from the sender.
        // - amountReceivedLD is the amount in local decimals that will be received/credited to the recipient on the remote OFT instance.
        (uint256 amountSentLD, uint256 amountReceivedLD) = _debit(
            msg.sender,
            _sendParam.amountLD,
            _sendParam.minAmountLD,
            _sendParam.dstEid
        );

        // @dev Builds the options and OFT message to quote in the endpoint.
        (bytes memory message, bytes memory options) = _buildMsgAndOptions(_sendParam, amountReceivedLD);

        // @dev Sends the message to the LayerZero endpoint and returns the LayerZero msg receipt.
        msgReceipt = _lzSend(_sendParam.dstEid, message, options, _fee, _refundAddress);
        // @dev Formulate the OFT receipt.
        oftReceipt = OFTReceipt(amountSentLD, amountReceivedLD);

        emit OFTSent(msgReceipt.guid, _sendParam.dstEid, msg.sender, amountSentLD, amountReceivedLD);
    }

    /**
     * @dev Internal function to build the message and options.
     * @param _sendParam The parameters for the send() operation.
     * @param _amountLD The amount in local decimals.
     * @return message The encoded message.
     * @return options The encoded options.
     */
    function _buildMsgAndOptions(
        SendParam calldata _sendParam,
        uint256 _amountLD
    ) internal view virtual returns (bytes memory message, bytes memory options) {
        bool hasCompose;
        // @dev This generated message has the msg.sender encoded into the payload so the remote knows who the caller is.
        (message, hasCompose) = OFTMsgCodec.encode(
            _sendParam.to,
            _toSD(_amountLD),
            // @dev Must be include a non empty bytes if you want to compose, EVEN if you dont need it on the remote.
            // EVEN if you dont require an arbitrary payload to be sent... eg. '0x01'
            _sendParam.composeMsg
        );
        // @dev Change the msg type depending if its composed or not.
        uint16 msgType = hasCompose ? SEND_AND_CALL : SEND;
        // @dev Combine the callers _extraOptions with the enforced options via the OAppOptionsType3.
        options = combineOptions(_sendParam.dstEid, msgType, _sendParam.extraOptions);

        // @dev Optionally inspect the message and options depending if the OApp owner has set a msg inspector.
        // @dev If it fails inspection, needs to revert in the implementation. ie. does not rely on return boolean
        if (msgInspector != address(0)) IOAppMsgInspector(msgInspector).inspect(message, options);
    }

    /**
     * @dev Internal function to handle the receive on the LayerZero endpoint.
     * @param _origin The origin information.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address from the src chain.
     *  - nonce: The nonce of the LayerZero message.
     * @param _guid The unique identifier for the received LayerZero message.
     * @param _message The encoded message.
     * @dev _executor The address of the executor.
     * @dev _extraData Additional data.
     */
    function _lzReceive(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address /*_executor*/, // @dev unused in the default implementation.
        bytes calldata /*_extraData*/ // @dev unused in the default implementation.
    ) internal virtual override {
        // @dev The src sending chain doesnt know the address length on this chain (potentially non-evm)
        // Thus everything is bytes32() encoded in flight.
        address toAddress = _message.sendTo().bytes32ToAddress();
        // @dev Credit the amountLD to the recipient and return the ACTUAL amount the recipient received in local decimals
        uint256 amountReceivedLD = _credit(toAddress, _toLD(_message.amountSD()), _origin.srcEid);

        if (_message.isComposed()) {
            // @dev Proprietary composeMsg format for the OFT.
            bytes memory composeMsg = OFTComposeMsgCodec.encode(
                _origin.nonce,
                _origin.srcEid,
                amountReceivedLD,
                _message.composeMsg()
            );

            // @dev Stores the lzCompose payload that will be executed in a separate tx.
            // Standardizes functionality for executing arbitrary contract invocation on some non-evm chains.
            // @dev The off-chain executor will listen and process the msg based on the src-chain-callers compose options passed.
            // @dev The index is used when a OApp needs to compose multiple msgs on lzReceive.
            // For default OFT implementation there is only 1 compose msg per lzReceive, thus its always 0.
            endpoint.sendCompose(toAddress, _guid, 0 /* the index of the composed message*/, composeMsg);
        }

        emit OFTReceived(_guid, _origin.srcEid, toAddress, amountReceivedLD);
    }

    /**
     * @dev Internal function to handle the OAppPreCrimeSimulator simulated receive.
     * @param _origin The origin information.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address from the src chain.
     *  - nonce: The nonce of the LayerZero message.
     * @param _guid The unique identifier for the received LayerZero message.
     * @param _message The LayerZero message.
     * @param _executor The address of the off-chain executor.
     * @param _extraData Arbitrary data passed by the msg executor.
     *
     * @dev Enables the preCrime simulator to mock sending lzReceive() messages,
     * routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver.
     */
    function _lzReceiveSimulate(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) internal virtual override {
        _lzReceive(_origin, _guid, _message, _executor, _extraData);
    }

    /**
     * @dev Check if the peer is considered 'trusted' by the OApp.
     * @param _eid The endpoint ID to check.
     * @param _peer The peer to check.
     * @return Whether the peer passed is considered 'trusted' by the OApp.
     *
     * @dev Enables OAppPreCrimeSimulator to check whether a potential Inbound Packet is from a trusted source.
     */
    function isPeer(uint32 _eid, bytes32 _peer) public view virtual override returns (bool) {
        return peers[_eid] == _peer;
    }

    /**
     * @dev Internal function to remove dust from the given local decimal amount.
     * @param _amountLD The amount in local decimals.
     * @return amountLD The amount after removing dust.
     *
     * @dev Prevents the loss of dust when moving amounts between chains with different decimals.
     * @dev eg. uint(123) with a conversion rate of 100 becomes uint(100).
     */
    function _removeDust(uint256 _amountLD) internal view virtual returns (uint256 amountLD) {
        return (_amountLD / decimalConversionRate) * decimalConversionRate;
    }

    /**
     * @dev Internal function to convert an amount from shared decimals into local decimals.
     * @param _amountSD The amount in shared decimals.
     * @return amountLD The amount in local decimals.
     */
    function _toLD(uint64 _amountSD) internal view virtual returns (uint256 amountLD) {
        return _amountSD * decimalConversionRate;
    }

    /**
     * @dev Internal function to convert an amount from local decimals into shared decimals.
     * @param _amountLD The amount in local decimals.
     * @return amountSD The amount in shared decimals.
     */
    function _toSD(uint256 _amountLD) internal view virtual returns (uint64 amountSD) {
        return uint64(_amountLD / decimalConversionRate);
    }

    /**
     * @dev Internal function to mock the amount mutation from a OFT debit() operation.
     * @param _amountLD The amount to send in local decimals.
     * @param _minAmountLD The minimum amount to send in local decimals.
     * @dev _dstEid The destination endpoint ID.
     * @return amountSentLD The amount sent, in local decimals.
     * @return amountReceivedLD The amount to be received on the remote chain, in local decimals.
     *
     * @dev This is where things like fees would be calculated and deducted from the amount to be received on the remote.
     */
    function _debitView(
        uint256 _amountLD,
        uint256 _minAmountLD,
        uint32 /*_dstEid*/
    ) internal view virtual returns (uint256 amountSentLD, uint256 amountReceivedLD) {
        // @dev Remove the dust so nothing is lost on the conversion between chains with different decimals for the token.
        amountSentLD = _removeDust(_amountLD);
        // @dev The amount to send is the same as amount received in the default implementation.
        amountReceivedLD = amountSentLD;

        // @dev Check for slippage.
        if (amountReceivedLD < _minAmountLD) {
            revert SlippageExceeded(amountReceivedLD, _minAmountLD);
        }
    }

    /**
     * @dev Internal function to perform a debit operation.
     * @param _from The address to debit.
     * @param _amountLD The amount to send in local decimals.
     * @param _minAmountLD The minimum amount to send in local decimals.
     * @param _dstEid The destination endpoint ID.
     * @return amountSentLD The amount sent in local decimals.
     * @return amountReceivedLD The amount received in local decimals on the remote.
     *
     * @dev Defined here but are intended to be overriden depending on the OFT implementation.
     * @dev Depending on OFT implementation the _amountLD could differ from the amountReceivedLD.
     */
    function _debit(
        address _from,
        uint256 _amountLD,
        uint256 _minAmountLD,
        uint32 _dstEid
    ) internal virtual returns (uint256 amountSentLD, uint256 amountReceivedLD);

    /**
     * @dev Internal function to perform a credit operation.
     * @param _to The address to credit.
     * @param _amountLD The amount to credit in local decimals.
     * @param _srcEid The source endpoint ID.
     * @return amountReceivedLD The amount ACTUALLY received in local decimals.
     *
     * @dev Defined here but are intended to be overriden depending on the OFT implementation.
     * @dev Depending on OFT implementation the _amountLD could differ from the amountReceivedLD.
     */
    function _credit(
        address _to,
        uint256 _amountLD,
        uint32 _srcEid
    ) internal virtual returns (uint256 amountReceivedLD);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.20;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

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

pragma solidity ^0.8.20;

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

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile 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 {MessageHashUtils-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]
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
        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, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        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]
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            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.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError, bytes32) {
        // 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, s);
        }

        // 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, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @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, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

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

pragma solidity ^0.8.20;

import {MessageHashUtils} from "./MessageHashUtils.sol";
import {ShortStrings, ShortString} from "../ShortStrings.sol";
import {IERC5267} from "../../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 scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose
 * encoding is very generic and therefore its 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 order to
 * produce the hash of their typed data 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.
 *
 * @custom:oz-upgrades-unsafe-allow state-variable-immutable
 */
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 MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {IERC-5267}.
     */
    function eip712Domain()
        public
        view
        virtual
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        return (
            hex"0f", // 01111
            _EIP712Name(),
            _EIP712Version(),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }

    /**
     * @dev The name parameter for the EIP712 domain.
     *
     * NOTE: By default this function reads _name which is an immutable value.
     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
     */
    // solhint-disable-next-line func-name-mixedcase
    function _EIP712Name() internal view returns (string memory) {
        return _name.toStringWithFallback(_nameFallback);
    }

    /**
     * @dev The version parameter for the EIP712 domain.
     *
     * NOTE: By default this function reads _version which is an immutable value.
     * It only reads from storage if necessary (in case the value is too large to fit in a ShortString).
     */
    // solhint-disable-next-line func-name-mixedcase
    function _EIP712Version() internal view returns (string memory) {
        return _version.toStringWithFallback(_versionFallback);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)
pragma solidity ^0.8.20;

/**
 * @dev Provides tracking nonces for addresses. Nonces will only increment.
 */
abstract contract Nonces {
    /**
     * @dev The nonce used for an `account` is not the expected current nonce.
     */
    error InvalidAccountNonce(address account, uint256 currentNonce);

    mapping(address account => uint256) private _nonces;

    /**
     * @dev Returns the next unused nonce for an address.
     */
    function nonces(address owner) public view virtual returns (uint256) {
        return _nonces[owner];
    }

    /**
     * @dev Consumes a nonce.
     *
     * Returns the current value and increments nonce.
     */
    function _useNonce(address owner) internal virtual returns (uint256) {
        // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be
        // decremented or reset. This guarantees that the nonce never overflows.
        unchecked {
            // It is important to do x++ and not ++x here.
            return _nonces[owner]++;
        }
    }

    /**
     * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.
     */
    function _useCheckedNonce(address owner, uint256 nonce) internal virtual {
        uint256 current = _useNonce(owner);
        if (nonce != current) {
            revert InvalidAccountNonce(owner, current);
        }
    }
}

File 18 of 53 : OApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

// @dev Import the 'MessagingFee' and 'MessagingReceipt' so it's exposed to OApp implementers
// solhint-disable-next-line no-unused-import
import { OAppSender, MessagingFee, MessagingReceipt } from "./OAppSender.sol";
// @dev Import the 'Origin' so it's exposed to OApp implementers
// solhint-disable-next-line no-unused-import
import { OAppReceiver, Origin } from "./OAppReceiver.sol";
import { OAppCore } from "./OAppCore.sol";

/**
 * @title OApp
 * @dev Abstract contract serving as the base for OApp implementation, combining OAppSender and OAppReceiver functionality.
 */
abstract contract OApp is OAppSender, OAppReceiver {
    /**
     * @dev Constructor to initialize the OApp with the provided endpoint and owner.
     * @param _endpoint The address of the LOCAL LayerZero endpoint.
     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
     */
    constructor(address _endpoint, address _delegate) OAppCore(_endpoint, _delegate) {}

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol implementation.
     * @return receiverVersion The version of the OAppReceiver.sol implementation.
     */
    function oAppVersion()
        public
        pure
        virtual
        override(OAppSender, OAppReceiver)
        returns (uint64 senderVersion, uint64 receiverVersion)
    {
        return (SENDER_VERSION, RECEIVER_VERSION);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppOptionsType3, EnforcedOptionParam } from "../interfaces/IOAppOptionsType3.sol";

/**
 * @title OAppOptionsType3
 * @dev Abstract contract implementing the IOAppOptionsType3 interface with type 3 options.
 */
abstract contract OAppOptionsType3 is IOAppOptionsType3, Ownable {
    uint16 internal constant OPTION_TYPE_3 = 3;

    // @dev The "msgType" should be defined in the child contract.
    mapping(uint32 eid => mapping(uint16 msgType => bytes enforcedOption)) public enforcedOptions;

    /**
     * @dev Sets the enforced options for specific endpoint and message type combinations.
     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
     *
     * @dev Only the owner/admin of the OApp can call this function.
     * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.
     * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.
     * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay
     * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
     */
    function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) public virtual onlyOwner {
        _setEnforcedOptions(_enforcedOptions);
    }

    /**
     * @dev Sets the enforced options for specific endpoint and message type combinations.
     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
     *
     * @dev Provides a way for the OApp to enforce things like paying for PreCrime, AND/OR minimum dst lzReceive gas amounts etc.
     * @dev These enforced options can vary as the potential options/execution on the remote may differ as per the msgType.
     * eg. Amount of lzReceive() gas necessary to deliver a lzCompose() message adds overhead you dont want to pay
     * if you are only making a standard LayerZero message ie. lzReceive() WITHOUT sendCompose().
     */
    function _setEnforcedOptions(EnforcedOptionParam[] memory _enforcedOptions) internal virtual {
        for (uint256 i = 0; i < _enforcedOptions.length; i++) {
            // @dev Enforced options are only available for optionType 3, as type 1 and 2 dont support combining.
            _assertOptionsType3(_enforcedOptions[i].options);
            enforcedOptions[_enforcedOptions[i].eid][_enforcedOptions[i].msgType] = _enforcedOptions[i].options;
        }

        emit EnforcedOptionSet(_enforcedOptions);
    }

    /**
     * @notice Combines options for a given endpoint and message type.
     * @param _eid The endpoint ID.
     * @param _msgType The OAPP message type.
     * @param _extraOptions Additional options passed by the caller.
     * @return options The combination of caller specified options AND enforced options.
     *
     * @dev If there is an enforced lzReceive option:
     * - {gasLimit: 200k, msg.value: 1 ether} AND a caller supplies a lzReceive option: {gasLimit: 100k, msg.value: 0.5 ether}
     * - The resulting options will be {gasLimit: 300k, msg.value: 1.5 ether} when the message is executed on the remote lzReceive() function.
     * @dev This presence of duplicated options is handled off-chain in the verifier/executor.
     */
    function combineOptions(
        uint32 _eid,
        uint16 _msgType,
        bytes calldata _extraOptions
    ) public view virtual returns (bytes memory) {
        bytes memory enforced = enforcedOptions[_eid][_msgType];

        // No enforced options, pass whatever the caller supplied, even if it's empty or legacy type 1/2 options.
        if (enforced.length == 0) return _extraOptions;

        // No caller options, return enforced
        if (_extraOptions.length == 0) return enforced;

        // @dev If caller provided _extraOptions, must be type 3 as its the ONLY type that can be combined.
        if (_extraOptions.length >= 2) {
            _assertOptionsType3(_extraOptions);
            // @dev Remove the first 2 bytes containing the type from the _extraOptions and combine with enforced.
            return bytes.concat(enforced, _extraOptions[2:]);
        }

        // No valid set of options was found.
        revert InvalidOptions(_extraOptions);
    }

    /**
     * @dev Internal function to assert that options are of type 3.
     * @param _options The options to be checked.
     */
    function _assertOptionsType3(bytes memory _options) internal pure virtual {
        uint16 optionsType;
        assembly {
            optionsType := mload(add(_options, 2))
        }
        if (optionsType != OPTION_TYPE_3) revert InvalidOptions(_options);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

/**
 * @title IOAppMsgInspector
 * @dev Interface for the OApp Message Inspector, allowing examination of message and options contents.
 */
interface IOAppMsgInspector {
    // Custom error message for inspection failure
    error InspectionFailed(bytes message, bytes options);

    /**
     * @notice Allows the inspector to examine LayerZero message contents and optionally throw a revert if invalid.
     * @param _message The message payload to be inspected.
     * @param _options Additional options or parameters for inspection.
     * @return valid A boolean indicating whether the inspection passed (true) or failed (false).
     *
     * @dev Optionally done as a revert, OR use the boolean provided to handle the failure.
     */
    function inspect(bytes calldata _message, bytes calldata _options) external view returns (bool valid);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IPreCrime } from "./interfaces/IPreCrime.sol";
import { IOAppPreCrimeSimulator, InboundPacket, Origin } from "./interfaces/IOAppPreCrimeSimulator.sol";

/**
 * @title OAppPreCrimeSimulator
 * @dev Abstract contract serving as the base for preCrime simulation functionality in an OApp.
 */
abstract contract OAppPreCrimeSimulator is IOAppPreCrimeSimulator, Ownable {
    // The address of the preCrime implementation.
    address public preCrime;

    /**
     * @dev Retrieves the address of the OApp contract.
     * @return The address of the OApp contract.
     *
     * @dev The simulator contract is the base contract for the OApp by default.
     * @dev If the simulator is a separate contract, override this function.
     */
    function oApp() external view virtual returns (address) {
        return address(this);
    }

    /**
     * @dev Sets the preCrime contract address.
     * @param _preCrime The address of the preCrime contract.
     */
    function setPreCrime(address _preCrime) public virtual onlyOwner {
        preCrime = _preCrime;
        emit PreCrimeSet(_preCrime);
    }

    /**
     * @dev Interface for pre-crime simulations. Always reverts at the end with the simulation results.
     * @param _packets An array of InboundPacket objects representing received packets to be delivered.
     *
     * @dev WARNING: MUST revert at the end with the simulation results.
     * @dev Gives the preCrime implementation the ability to mock sending packets to the lzReceive function,
     * WITHOUT actually executing them.
     */
    function lzReceiveAndRevert(InboundPacket[] calldata _packets) public payable virtual {
        for (uint256 i = 0; i < _packets.length; i++) {
            InboundPacket calldata packet = _packets[i];

            // Ignore packets that are not from trusted peers.
            if (!isPeer(packet.origin.srcEid, packet.origin.sender)) continue;

            // @dev Because a verifier is calling this function, it doesnt have access to executor params:
            //  - address _executor
            //  - bytes calldata _extraData
            // preCrime will NOT work for OApps that rely on these two parameters inside of their _lzReceive().
            // They are instead stubbed to default values, address(0) and bytes("")
            // @dev Calling this.lzReceiveSimulate removes ability for assembly return 0 callstack exit,
            // which would cause the revert to be ignored.
            this.lzReceiveSimulate{ value: packet.value }(
                packet.origin,
                packet.guid,
                packet.message,
                packet.executor,
                packet.extraData
            );
        }

        // @dev Revert with the simulation results. msg.sender must implement IPreCrime.buildSimulationResult().
        revert SimulationResult(IPreCrime(msg.sender).buildSimulationResult());
    }

    /**
     * @dev Is effectively an internal function because msg.sender must be address(this).
     * Allows resetting the call stack for 'internal' calls.
     * @param _origin The origin information containing the source endpoint and sender address.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address on the src chain.
     *  - nonce: The nonce of the message.
     * @param _guid The unique identifier of the packet.
     * @param _message The message payload of the packet.
     * @param _executor The executor address for the packet.
     * @param _extraData Additional data for the packet.
     */
    function lzReceiveSimulate(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) external payable virtual {
        // @dev Ensure ONLY can be called 'internally'.
        if (msg.sender != address(this)) revert OnlySelf();
        _lzReceiveSimulate(_origin, _guid, _message, _executor, _extraData);
    }

    /**
     * @dev Internal function to handle the OAppPreCrimeSimulator simulated receive.
     * @param _origin The origin information.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address from the src chain.
     *  - nonce: The nonce of the LayerZero message.
     * @param _guid The GUID of the LayerZero message.
     * @param _message The LayerZero message.
     * @param _executor The address of the off-chain executor.
     * @param _extraData Arbitrary data passed by the msg executor.
     *
     * @dev Enables the preCrime simulator to mock sending lzReceive() messages,
     * routes the msg down from the OAppPreCrimeSimulator, and back up to the OAppReceiver.
     */
    function _lzReceiveSimulate(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) internal virtual;

    /**
     * @dev checks if the specified peer is considered 'trusted' by the OApp.
     * @param _eid The endpoint Id to check.
     * @param _peer The peer to check.
     * @return Whether the peer passed is considered 'trusted' by the OApp.
     */
    function isPeer(uint32 _eid, bytes32 _peer) public view virtual returns (bool);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { MessagingReceipt, MessagingFee } from "../../oapp/OAppSender.sol";

/**
 * @dev Struct representing token parameters for the OFT send() operation.
 */
struct SendParam {
    uint32 dstEid; // Destination endpoint ID.
    bytes32 to; // Recipient address.
    uint256 amountLD; // Amount to send in local decimals.
    uint256 minAmountLD; // Minimum amount to send in local decimals.
    bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.
    bytes composeMsg; // The composed message for the send() operation.
    bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.
}

/**
 * @dev Struct representing OFT limit information.
 * @dev These amounts can change dynamically and are up the the specific oft implementation.
 */
struct OFTLimit {
    uint256 minAmountLD; // Minimum amount in local decimals that can be sent to the recipient.
    uint256 maxAmountLD; // Maximum amount in local decimals that can be sent to the recipient.
}

/**
 * @dev Struct representing OFT receipt information.
 */
struct OFTReceipt {
    uint256 amountSentLD; // Amount of tokens ACTUALLY debited from the sender in local decimals.
    // @dev In non-default implementations, the amountReceivedLD COULD differ from this value.
    uint256 amountReceivedLD; // Amount of tokens to be received on the remote side.
}

/**
 * @dev Struct representing OFT fee details.
 * @dev Future proof mechanism to provide a standardized way to communicate fees to things like a UI.
 */
struct OFTFeeDetail {
    int256 feeAmountLD; // Amount of the fee in local decimals.
    string description; // Description of the fee.
}

/**
 * @title IOFT
 * @dev Interface for the OftChain (OFT) token.
 * @dev Does not inherit ERC20 to accommodate usage by OFTAdapter as well.
 * @dev This specific interface ID is '0x02e49c2c'.
 */
interface IOFT {
    // Custom error messages
    error InvalidLocalDecimals();
    error SlippageExceeded(uint256 amountLD, uint256 minAmountLD);

    // Events
    event OFTSent(
        bytes32 indexed guid, // GUID of the OFT message.
        uint32 dstEid, // Destination Endpoint ID.
        address indexed fromAddress, // Address of the sender on the src chain.
        uint256 amountSentLD, // Amount of tokens sent in local decimals.
        uint256 amountReceivedLD // Amount of tokens received in local decimals.
    );
    event OFTReceived(
        bytes32 indexed guid, // GUID of the OFT message.
        uint32 srcEid, // Source Endpoint ID.
        address indexed toAddress, // Address of the recipient on the dst chain.
        uint256 amountReceivedLD // Amount of tokens received in local decimals.
    );

    /**
     * @notice Retrieves interfaceID and the version of the OFT.
     * @return interfaceId The interface ID.
     * @return version The version.
     *
     * @dev interfaceId: This specific interface ID is '0x02e49c2c'.
     * @dev version: Indicates a cross-chain compatible msg encoding with other OFTs.
     * @dev If a new feature is added to the OFT cross-chain msg encoding, the version will be incremented.
     * ie. localOFT version(x,1) CAN send messages to remoteOFT version(x,1)
     */
    function oftVersion() external view returns (bytes4 interfaceId, uint64 version);

    /**
     * @notice Retrieves the address of the token associated with the OFT.
     * @return token The address of the ERC20 token implementation.
     */
    function token() external view returns (address);

    /**
     * @notice Indicates whether the OFT contract requires approval of the 'token()' to send.
     * @return requiresApproval Needs approval of the underlying token implementation.
     *
     * @dev Allows things like wallet implementers to determine integration requirements,
     * without understanding the underlying token implementation.
     */
    function approvalRequired() external view returns (bool);

    /**
     * @notice Retrieves the shared decimals of the OFT.
     * @return sharedDecimals The shared decimals of the OFT.
     */
    function sharedDecimals() external view returns (uint8);

    /**
     * @notice Provides a quote for OFT-related operations.
     * @param _sendParam The parameters for the send operation.
     * @return limit The OFT limit information.
     * @return oftFeeDetails The details of OFT fees.
     * @return receipt The OFT receipt information.
     */
    function quoteOFT(
        SendParam calldata _sendParam
    ) external view returns (OFTLimit memory, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory);

    /**
     * @notice Provides a quote for the send() operation.
     * @param _sendParam The parameters for the send() operation.
     * @param _payInLzToken Flag indicating whether the caller is paying in the LZ token.
     * @return fee The calculated LayerZero messaging fee from the send() operation.
     *
     * @dev MessagingFee: LayerZero msg fee
     *  - nativeFee: The native fee.
     *  - lzTokenFee: The lzToken fee.
     */
    function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory);

    /**
     * @notice Executes the send() operation.
     * @param _sendParam The parameters for the send operation.
     * @param _fee The fee information supplied by the caller.
     *      - nativeFee: The native fee.
     *      - lzTokenFee: The lzToken fee.
     * @param _refundAddress The address to receive any excess funds from fees etc. on the src.
     * @return receipt The LayerZero messaging receipt from the send() operation.
     * @return oftReceipt The OFT receipt information.
     *
     * @dev MessagingReceipt: LayerZero msg receipt
     *  - guid: The unique identifier for the sent message.
     *  - nonce: The nonce of the sent message.
     *  - fee: The LayerZero fee incurred for the message.
     */
    function send(
        SendParam calldata _sendParam,
        MessagingFee calldata _fee,
        address _refundAddress
    ) external payable returns (MessagingReceipt memory, OFTReceipt memory);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

library OFTMsgCodec {
    // Offset constants for encoding and decoding OFT messages
    uint8 private constant SEND_TO_OFFSET = 32;
    uint8 private constant SEND_AMOUNT_SD_OFFSET = 40;

    /**
     * @dev Encodes an OFT LayerZero message.
     * @param _sendTo The recipient address.
     * @param _amountShared The amount in shared decimals.
     * @param _composeMsg The composed message.
     * @return _msg The encoded message.
     * @return hasCompose A boolean indicating whether the message has a composed payload.
     */
    function encode(
        bytes32 _sendTo,
        uint64 _amountShared,
        bytes memory _composeMsg
    ) internal view returns (bytes memory _msg, bool hasCompose) {
        hasCompose = _composeMsg.length > 0;
        // @dev Remote chains will want to know the composed function caller ie. msg.sender on the src.
        _msg = hasCompose
            ? abi.encodePacked(_sendTo, _amountShared, addressToBytes32(msg.sender), _composeMsg)
            : abi.encodePacked(_sendTo, _amountShared);
    }

    /**
     * @dev Checks if the OFT message is composed.
     * @param _msg The OFT message.
     * @return A boolean indicating whether the message is composed.
     */
    function isComposed(bytes calldata _msg) internal pure returns (bool) {
        return _msg.length > SEND_AMOUNT_SD_OFFSET;
    }

    /**
     * @dev Retrieves the recipient address from the OFT message.
     * @param _msg The OFT message.
     * @return The recipient address.
     */
    function sendTo(bytes calldata _msg) internal pure returns (bytes32) {
        return bytes32(_msg[:SEND_TO_OFFSET]);
    }

    /**
     * @dev Retrieves the amount in shared decimals from the OFT message.
     * @param _msg The OFT message.
     * @return The amount in shared decimals.
     */
    function amountSD(bytes calldata _msg) internal pure returns (uint64) {
        return uint64(bytes8(_msg[SEND_TO_OFFSET:SEND_AMOUNT_SD_OFFSET]));
    }

    /**
     * @dev Retrieves the composed message from the OFT message.
     * @param _msg The OFT message.
     * @return The composed message.
     */
    function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {
        return _msg[SEND_AMOUNT_SD_OFFSET:];
    }

    /**
     * @dev Converts an address to bytes32.
     * @param _addr The address to convert.
     * @return The bytes32 representation of the address.
     */
    function addressToBytes32(address _addr) internal pure returns (bytes32) {
        return bytes32(uint256(uint160(_addr)));
    }

    /**
     * @dev Converts bytes32 to an address.
     * @param _b The bytes32 value to convert.
     * @return The address representation of bytes32.
     */
    function bytes32ToAddress(bytes32 _b) internal pure returns (address) {
        return address(uint160(uint256(_b)));
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

library OFTComposeMsgCodec {
    // Offset constants for decoding composed messages
    uint8 private constant NONCE_OFFSET = 8;
    uint8 private constant SRC_EID_OFFSET = 12;
    uint8 private constant AMOUNT_LD_OFFSET = 44;
    uint8 private constant COMPOSE_FROM_OFFSET = 76;

    /**
     * @dev Encodes a OFT composed message.
     * @param _nonce The nonce value.
     * @param _srcEid The source endpoint ID.
     * @param _amountLD The amount in local decimals.
     * @param _composeMsg The composed message.
     * @return _msg The encoded Composed message.
     */
    function encode(
        uint64 _nonce,
        uint32 _srcEid,
        uint256 _amountLD,
        bytes memory _composeMsg // 0x[composeFrom][composeMsg]
    ) internal pure returns (bytes memory _msg) {
        _msg = abi.encodePacked(_nonce, _srcEid, _amountLD, _composeMsg);
    }

    /**
     * @dev Retrieves the nonce from the composed message.
     * @param _msg The message.
     * @return The nonce value.
     */
    function nonce(bytes calldata _msg) internal pure returns (uint64) {
        return uint64(bytes8(_msg[:NONCE_OFFSET]));
    }

    /**
     * @dev Retrieves the source endpoint ID from the composed message.
     * @param _msg The message.
     * @return The source endpoint ID.
     */
    function srcEid(bytes calldata _msg) internal pure returns (uint32) {
        return uint32(bytes4(_msg[NONCE_OFFSET:SRC_EID_OFFSET]));
    }

    /**
     * @dev Retrieves the amount in local decimals from the composed message.
     * @param _msg The message.
     * @return The amount in local decimals.
     */
    function amountLD(bytes calldata _msg) internal pure returns (uint256) {
        return uint256(bytes32(_msg[SRC_EID_OFFSET:AMOUNT_LD_OFFSET]));
    }

    /**
     * @dev Retrieves the composeFrom value from the composed message.
     * @param _msg The message.
     * @return The composeFrom value.
     */
    function composeFrom(bytes calldata _msg) internal pure returns (bytes32) {
        return bytes32(_msg[AMOUNT_LD_OFFSET:COMPOSE_FROM_OFFSET]);
    }

    /**
     * @dev Retrieves the composed message.
     * @param _msg The message.
     * @return The composed message.
     */
    function composeMsg(bytes calldata _msg) internal pure returns (bytes memory) {
        return _msg[COMPOSE_FROM_OFFSET:];
    }

    /**
     * @dev Converts an address to bytes32.
     * @param _addr The address to convert.
     * @return The bytes32 representation of the address.
     */
    function addressToBytes32(address _addr) internal pure returns (bytes32) {
        return bytes32(uint256(uint160(_addr)));
    }

    /**
     * @dev Converts bytes32 to an address.
     * @param _b The bytes32 value to convert.
     * @return The address representation of bytes32.
     */
    function bytes32ToAddress(bytes32 _b) internal pure returns (address) {
        return address(uint160(uint256(_b)));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)

pragma solidity ^0.8.20;

import {Strings} from "../Strings.sol";

/**
 * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.
 *
 * The library provides methods for generating a hash of a message that conforms to the
 * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]
 * specifications.
 */
library MessageHashUtils {
    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing a bytes32 `messageHash` with
     * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with
     * keccak256, although any bytes32 value can be safely used because the final digest will
     * be re-hashed.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash
            mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix
            digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)
        }
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x45` (`personal_sign` messages).
     *
     * The digest is calculated by prefixing an arbitrary `message` with
     * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the
     * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method.
     *
     * See {ECDSA-recover}.
     */
    function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {
        return
            keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-191 signed data with version
     * `0x00` (data with intended validator).
     *
     * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended
     * `validator` address. Then hashing the result.
     *
     * See {ECDSA-recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked(hex"19_00", validator, data));
    }

    /**
     * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`).
     *
     * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with
     * `\x19\x01` and hashing the result. It corresponds to the hash signed by the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.
     *
     * See {ECDSA-recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, hex"19_01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            digest := keccak256(ptr, 0x42)
        }
    }
}

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

pragma solidity ^0.8.20;

import {StorageSlot} from "./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;
        }
    }
}

File 27 of 53 : IERC5267.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.20;

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { SafeERC20, IERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { MessagingParams, MessagingFee, MessagingReceipt } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
import { OAppCore } from "./OAppCore.sol";

/**
 * @title OAppSender
 * @dev Abstract contract implementing the OAppSender functionality for sending messages to a LayerZero endpoint.
 */
abstract contract OAppSender is OAppCore {
    using SafeERC20 for IERC20;

    // Custom error messages
    error NotEnoughNative(uint256 msgValue);
    error LzTokenUnavailable();

    // @dev The version of the OAppSender implementation.
    // @dev Version is bumped when changes are made to this contract.
    uint64 internal constant SENDER_VERSION = 1;

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol contract.
     * @return receiverVersion The version of the OAppReceiver.sol contract.
     *
     * @dev Providing 0 as the default for OAppReceiver version. Indicates that the OAppReceiver is not implemented.
     * ie. this is a SEND only OApp.
     * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions
     */
    function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {
        return (SENDER_VERSION, 0);
    }

    /**
     * @dev Internal function to interact with the LayerZero EndpointV2.quote() for fee calculation.
     * @param _dstEid The destination endpoint ID.
     * @param _message The message payload.
     * @param _options Additional options for the message.
     * @param _payInLzToken Flag indicating whether to pay the fee in LZ tokens.
     * @return fee The calculated MessagingFee for the message.
     *      - nativeFee: The native fee for the message.
     *      - lzTokenFee: The LZ token fee for the message.
     */
    function _quote(
        uint32 _dstEid,
        bytes memory _message,
        bytes memory _options,
        bool _payInLzToken
    ) internal view virtual returns (MessagingFee memory fee) {
        return
            endpoint.quote(
                MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _payInLzToken),
                address(this)
            );
    }

    /**
     * @dev Internal function to interact with the LayerZero EndpointV2.send() for sending a message.
     * @param _dstEid The destination endpoint ID.
     * @param _message The message payload.
     * @param _options Additional options for the message.
     * @param _fee The calculated LayerZero fee for the message.
     *      - nativeFee: The native fee.
     *      - lzTokenFee: The lzToken fee.
     * @param _refundAddress The address to receive any excess fee values sent to the endpoint.
     * @return receipt The receipt for the sent message.
     *      - guid: The unique identifier for the sent message.
     *      - nonce: The nonce of the sent message.
     *      - fee: The LayerZero fee incurred for the message.
     */
    function _lzSend(
        uint32 _dstEid,
        bytes memory _message,
        bytes memory _options,
        MessagingFee memory _fee,
        address _refundAddress
    ) internal virtual returns (MessagingReceipt memory receipt) {
        // @dev Push corresponding fees to the endpoint, any excess is sent back to the _refundAddress from the endpoint.
        uint256 messageValue = _payNative(_fee.nativeFee);
        if (_fee.lzTokenFee > 0) _payLzToken(_fee.lzTokenFee);

        return
            // solhint-disable-next-line check-send-result
            endpoint.send{ value: messageValue }(
                MessagingParams(_dstEid, _getPeerOrRevert(_dstEid), _message, _options, _fee.lzTokenFee > 0),
                _refundAddress
            );
    }

    /**
     * @dev Internal function to pay the native fee associated with the message.
     * @param _nativeFee The native fee to be paid.
     * @return nativeFee The amount of native currency paid.
     *
     * @dev If the OApp needs to initiate MULTIPLE LayerZero messages in a single transaction,
     * this will need to be overridden because msg.value would contain multiple lzFees.
     * @dev Should be overridden in the event the LayerZero endpoint requires a different native currency.
     * @dev Some EVMs use an ERC20 as a method for paying transactions/gasFees.
     * @dev The endpoint is EITHER/OR, ie. it will NOT support both types of native payment at a time.
     */
    function _payNative(uint256 _nativeFee) internal virtual returns (uint256 nativeFee) {
        if (msg.value != _nativeFee) revert NotEnoughNative(msg.value);
        return _nativeFee;
    }

    /**
     * @dev Internal function to pay the LZ token fee associated with the message.
     * @param _lzTokenFee The LZ token fee to be paid.
     *
     * @dev If the caller is trying to pay in the specified lzToken, then the lzTokenFee is passed to the endpoint.
     * @dev Any excess sent, is passed back to the specified _refundAddress in the _lzSend().
     */
    function _payLzToken(uint256 _lzTokenFee) internal virtual {
        // @dev Cannot cache the token because it is not immutable in the endpoint.
        address lzToken = endpoint.lzToken();
        if (lzToken == address(0)) revert LzTokenUnavailable();

        // Pay LZ token fee by sending tokens to the endpoint.
        IERC20(lzToken).safeTransferFrom(msg.sender, address(endpoint), _lzTokenFee);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { IOAppReceiver, Origin } from "./interfaces/IOAppReceiver.sol";
import { OAppCore } from "./OAppCore.sol";

/**
 * @title OAppReceiver
 * @dev Abstract contract implementing the ILayerZeroReceiver interface and extending OAppCore for OApp receivers.
 */
abstract contract OAppReceiver is IOAppReceiver, OAppCore {
    // Custom error message for when the caller is not the registered endpoint/
    error OnlyEndpoint(address addr);

    // @dev The version of the OAppReceiver implementation.
    // @dev Version is bumped when changes are made to this contract.
    uint64 internal constant RECEIVER_VERSION = 2;

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol contract.
     * @return receiverVersion The version of the OAppReceiver.sol contract.
     *
     * @dev Providing 0 as the default for OAppSender version. Indicates that the OAppSender is not implemented.
     * ie. this is a RECEIVE only OApp.
     * @dev If the OApp uses both OAppSender and OAppReceiver, then this needs to be override returning the correct versions.
     */
    function oAppVersion() public view virtual returns (uint64 senderVersion, uint64 receiverVersion) {
        return (0, RECEIVER_VERSION);
    }

    /**
     * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.
     * @dev _origin The origin information containing the source endpoint and sender address.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address on the src chain.
     *  - nonce: The nonce of the message.
     * @dev _message The lzReceive payload.
     * @param _sender The sender address.
     * @return isSender Is a valid sender.
     *
     * @dev Applications can optionally choose to implement separate composeMsg senders that are NOT the bridging layer.
     * @dev The default sender IS the OAppReceiver implementer.
     */
    function isComposeMsgSender(
        Origin calldata /*_origin*/,
        bytes calldata /*_message*/,
        address _sender
    ) public view virtual returns (bool) {
        return _sender == address(this);
    }

    /**
     * @notice Checks if the path initialization is allowed based on the provided origin.
     * @param origin The origin information containing the source endpoint and sender address.
     * @return Whether the path has been initialized.
     *
     * @dev This indicates to the endpoint that the OApp has enabled msgs for this particular path to be received.
     * @dev This defaults to assuming if a peer has been set, its initialized.
     * Can be overridden by the OApp if there is other logic to determine this.
     */
    function allowInitializePath(Origin calldata origin) public view virtual returns (bool) {
        return peers[origin.srcEid] == origin.sender;
    }

    /**
     * @notice Retrieves the next nonce for a given source endpoint and sender address.
     * @dev _srcEid The source endpoint ID.
     * @dev _sender The sender address.
     * @return nonce The next nonce.
     *
     * @dev The path nonce starts from 1. If 0 is returned it means that there is NO nonce ordered enforcement.
     * @dev Is required by the off-chain executor to determine the OApp expects msg execution is ordered.
     * @dev This is also enforced by the OApp.
     * @dev By default this is NOT enabled. ie. nextNonce is hardcoded to return 0.
     */
    function nextNonce(uint32 /*_srcEid*/, bytes32 /*_sender*/) public view virtual returns (uint64 nonce) {
        return 0;
    }

    /**
     * @dev Entry point for receiving messages or packets from the endpoint.
     * @param _origin The origin information containing the source endpoint and sender address.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address on the src chain.
     *  - nonce: The nonce of the message.
     * @param _guid The unique identifier for the received LayerZero message.
     * @param _message The payload of the received message.
     * @param _executor The address of the executor for the received message.
     * @param _extraData Additional arbitrary data provided by the corresponding executor.
     *
     * @dev Entry point for receiving msg/packet from the LayerZero endpoint.
     */
    function lzReceive(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) public payable virtual {
        // Ensures that only the endpoint can attempt to lzReceive() messages to this OApp.
        if (address(endpoint) != msg.sender) revert OnlyEndpoint(msg.sender);

        // Ensure that the sender matches the expected peer for the source endpoint.
        if (_getPeerOrRevert(_origin.srcEid) != _origin.sender) revert OnlyPeer(_origin.srcEid, _origin.sender);

        // Call the internal OApp implementation of lzReceive.
        _lzReceive(_origin, _guid, _message, _executor, _extraData);
    }

    /**
     * @dev Internal function to implement lzReceive logic without needing to copy the basic parameter validation.
     */
    function _lzReceive(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) internal virtual;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { IOAppCore, ILayerZeroEndpointV2 } from "./interfaces/IOAppCore.sol";

/**
 * @title OAppCore
 * @dev Abstract contract implementing the IOAppCore interface with basic OApp configurations.
 */
abstract contract OAppCore is IOAppCore, Ownable {
    // The LayerZero endpoint associated with the given OApp
    ILayerZeroEndpointV2 public immutable endpoint;

    // Mapping to store peers associated with corresponding endpoints
    mapping(uint32 eid => bytes32 peer) public peers;

    /**
     * @dev Constructor to initialize the OAppCore with the provided endpoint and delegate.
     * @param _endpoint The address of the LOCAL Layer Zero endpoint.
     * @param _delegate The delegate capable of making OApp configurations inside of the endpoint.
     *
     * @dev The delegate typically should be set as the owner of the contract.
     */
    constructor(address _endpoint, address _delegate) {
        endpoint = ILayerZeroEndpointV2(_endpoint);

        if (_delegate == address(0)) revert InvalidDelegate();
        endpoint.setDelegate(_delegate);
    }

    /**
     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @param _peer The address of the peer to be associated with the corresponding endpoint.
     *
     * @dev Only the owner/admin of the OApp can call this function.
     * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.
     * @dev Set this to bytes32(0) to remove the peer address.
     * @dev Peer is a bytes32 to accommodate non-evm chains.
     */
    function setPeer(uint32 _eid, bytes32 _peer) public virtual onlyOwner {
        _setPeer(_eid, _peer);
    }

    /**
     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @param _peer The address of the peer to be associated with the corresponding endpoint.
     *
     * @dev Indicates that the peer is trusted to send LayerZero messages to this OApp.
     * @dev Set this to bytes32(0) to remove the peer address.
     * @dev Peer is a bytes32 to accommodate non-evm chains.
     */
    function _setPeer(uint32 _eid, bytes32 _peer) internal virtual {
        peers[_eid] = _peer;
        emit PeerSet(_eid, _peer);
    }

    /**
     * @notice Internal function to get the peer address associated with a specific endpoint; reverts if NOT set.
     * ie. the peer is set to bytes32(0).
     * @param _eid The endpoint ID.
     * @return peer The address of the peer associated with the specified endpoint.
     */
    function _getPeerOrRevert(uint32 _eid) internal view virtual returns (bytes32) {
        bytes32 peer = peers[_eid];
        if (peer == bytes32(0)) revert NoPeer(_eid);
        return peer;
    }

    /**
     * @notice Sets the delegate address for the OApp.
     * @param _delegate The address of the delegate to be set.
     *
     * @dev Only the owner/admin of the OApp can call this function.
     * @dev Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.
     */
    function setDelegate(address _delegate) public onlyOwner {
        endpoint.setDelegate(_delegate);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

/**
 * @dev Struct representing enforced option parameters.
 */
struct EnforcedOptionParam {
    uint32 eid; // Endpoint ID
    uint16 msgType; // Message Type
    bytes options; // Additional options
}

/**
 * @title IOAppOptionsType3
 * @dev Interface for the OApp with Type 3 Options, allowing the setting and combining of enforced options.
 */
interface IOAppOptionsType3 {
    // Custom error message for invalid options
    error InvalidOptions(bytes options);

    // Event emitted when enforced options are set
    event EnforcedOptionSet(EnforcedOptionParam[] _enforcedOptions);

    /**
     * @notice Sets enforced options for specific endpoint and message type combinations.
     * @param _enforcedOptions An array of EnforcedOptionParam structures specifying enforced options.
     */
    function setEnforcedOptions(EnforcedOptionParam[] calldata _enforcedOptions) external;

    /**
     * @notice Combines options for a given endpoint and message type.
     * @param _eid The endpoint ID.
     * @param _msgType The OApp message type.
     * @param _extraOptions Additional options passed by the caller.
     * @return options The combination of caller specified options AND enforced options.
     */
    function combineOptions(
        uint32 _eid,
        uint16 _msgType,
        bytes calldata _extraOptions
    ) external view returns (bytes memory options);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;
struct PreCrimePeer {
    uint32 eid;
    bytes32 preCrime;
    bytes32 oApp;
}

// TODO not done yet
interface IPreCrime {
    error OnlyOffChain();

    // for simulate()
    error PacketOversize(uint256 max, uint256 actual);
    error PacketUnsorted();
    error SimulationFailed(bytes reason);

    // for preCrime()
    error SimulationResultNotFound(uint32 eid);
    error InvalidSimulationResult(uint32 eid, bytes reason);
    error CrimeFound(bytes crime);

    function getConfig(bytes[] calldata _packets, uint256[] calldata _packetMsgValues) external returns (bytes memory);

    function simulate(
        bytes[] calldata _packets,
        uint256[] calldata _packetMsgValues
    ) external payable returns (bytes memory);

    function buildSimulationResult() external view returns (bytes memory);

    function preCrime(
        bytes[] calldata _packets,
        uint256[] calldata _packetMsgValues,
        bytes[] calldata _simulations
    ) external;

    function version() external view returns (uint64 major, uint8 minor);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

// @dev Import the Origin so it's exposed to OAppPreCrimeSimulator implementers.
// solhint-disable-next-line no-unused-import
import { InboundPacket, Origin } from "../libs/Packet.sol";

/**
 * @title IOAppPreCrimeSimulator Interface
 * @dev Interface for the preCrime simulation functionality in an OApp.
 */
interface IOAppPreCrimeSimulator {
    // @dev simulation result used in PreCrime implementation
    error SimulationResult(bytes result);
    error OnlySelf();

    /**
     * @dev Emitted when the preCrime contract address is set.
     * @param preCrimeAddress The address of the preCrime contract.
     */
    event PreCrimeSet(address preCrimeAddress);

    /**
     * @dev Retrieves the address of the preCrime contract implementation.
     * @return The address of the preCrime contract.
     */
    function preCrime() external view returns (address);

    /**
     * @dev Retrieves the address of the OApp contract.
     * @return The address of the OApp contract.
     */
    function oApp() external view returns (address);

    /**
     * @dev Sets the preCrime contract address.
     * @param _preCrime The address of the preCrime contract.
     */
    function setPreCrime(address _preCrime) external;

    /**
     * @dev Mocks receiving a packet, then reverts with a series of data to infer the state/result.
     * @param _packets An array of LayerZero InboundPacket objects representing received packets.
     */
    function lzReceiveAndRevert(InboundPacket[] calldata _packets) external payable;

    /**
     * @dev checks if the specified peer is considered 'trusted' by the OApp.
     * @param _eid The endpoint Id to check.
     * @param _peer The peer to check.
     * @return Whether the peer passed is considered 'trusted' by the OApp.
     */
    function isPeer(uint32 _eid, bytes32 _peer) external view returns (bool);
}

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

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @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), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(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) {
        uint256 localValue = value;
        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] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

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

pragma solidity ^0.8.20;

/**
 * @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(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 */
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
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

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

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

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

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import { IMessageLibManager } from "./IMessageLibManager.sol";
import { IMessagingComposer } from "./IMessagingComposer.sol";
import { IMessagingChannel } from "./IMessagingChannel.sol";
import { IMessagingContext } from "./IMessagingContext.sol";

struct MessagingParams {
    uint32 dstEid;
    bytes32 receiver;
    bytes message;
    bytes options;
    bool payInLzToken;
}

struct MessagingReceipt {
    bytes32 guid;
    uint64 nonce;
    MessagingFee fee;
}

struct MessagingFee {
    uint256 nativeFee;
    uint256 lzTokenFee;
}

struct Origin {
    uint32 srcEid;
    bytes32 sender;
    uint64 nonce;
}

interface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {
    event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);

    event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);

    event PacketDelivered(Origin origin, address receiver);

    event LzReceiveAlert(
        address indexed receiver,
        address indexed executor,
        Origin origin,
        bytes32 guid,
        uint256 gas,
        uint256 value,
        bytes message,
        bytes extraData,
        bytes reason
    );

    event LzTokenSet(address token);

    event DelegateSet(address sender, address delegate);

    function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);

    function send(
        MessagingParams calldata _params,
        address _refundAddress
    ) external payable returns (MessagingReceipt memory);

    function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;

    function verifiable(Origin calldata _origin, address _receiver) external view returns (bool);

    function initializable(Origin calldata _origin, address _receiver) external view returns (bool);

    function lzReceive(
        Origin calldata _origin,
        address _receiver,
        bytes32 _guid,
        bytes calldata _message,
        bytes calldata _extraData
    ) external payable;

    // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order
    function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;

    function setLzToken(address _lzToken) external;

    function lzToken() external view returns (address);

    function nativeToken() external view returns (address);

    function setDelegate(address _delegate) external;
}

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

import { ILayerZeroReceiver, Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroReceiver.sol";

interface IOAppReceiver is ILayerZeroReceiver {
    /**
     * @notice Indicates whether an address is an approved composeMsg sender to the Endpoint.
     * @param _origin The origin information containing the source endpoint and sender address.
     *  - srcEid: The source chain endpoint ID.
     *  - sender: The sender address on the src chain.
     *  - nonce: The nonce of the message.
     * @param _message The lzReceive payload.
     * @param _sender The sender address.
     * @return isSender Is a valid sender.
     *
     * @dev Applications can optionally choose to implement a separate composeMsg sender that is NOT the bridging layer.
     * @dev The default sender IS the OAppReceiver implementer.
     */
    function isComposeMsgSender(
        Origin calldata _origin,
        bytes calldata _message,
        address _sender
    ) external view returns (bool isSender);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { ILayerZeroEndpointV2 } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";

/**
 * @title IOAppCore
 */
interface IOAppCore {
    // Custom error messages
    error OnlyPeer(uint32 eid, bytes32 sender);
    error NoPeer(uint32 eid);
    error InvalidEndpointCall();
    error InvalidDelegate();

    // Event emitted when a peer (OApp) is set for a corresponding endpoint
    event PeerSet(uint32 eid, bytes32 peer);

    /**
     * @notice Retrieves the OApp version information.
     * @return senderVersion The version of the OAppSender.sol contract.
     * @return receiverVersion The version of the OAppReceiver.sol contract.
     */
    function oAppVersion() external view returns (uint64 senderVersion, uint64 receiverVersion);

    /**
     * @notice Retrieves the LayerZero endpoint associated with the OApp.
     * @return iEndpoint The LayerZero endpoint as an interface.
     */
    function endpoint() external view returns (ILayerZeroEndpointV2 iEndpoint);

    /**
     * @notice Retrieves the peer (OApp) associated with a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @return peer The peer address (OApp instance) associated with the corresponding endpoint.
     */
    function peers(uint32 _eid) external view returns (bytes32 peer);

    /**
     * @notice Sets the peer address (OApp instance) for a corresponding endpoint.
     * @param _eid The endpoint ID.
     * @param _peer The address of the peer to be associated with the corresponding endpoint.
     */
    function setPeer(uint32 _eid, bytes32 _peer) external;

    /**
     * @notice Sets the delegate address for the OApp Core.
     * @param _delegate The address of the delegate to be set.
     */
    function setDelegate(address _delegate) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { Origin } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";
import { PacketV1Codec } from "@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol";

/**
 * @title InboundPacket
 * @dev Structure representing an inbound packet received by the contract.
 */
struct InboundPacket {
    Origin origin; // Origin information of the packet.
    uint32 dstEid; // Destination endpointId of the packet.
    address receiver; // Receiver address for the packet.
    bytes32 guid; // Unique identifier of the packet.
    uint256 value; // msg.value of the packet.
    address executor; // Executor address for the packet.
    bytes message; // Message payload of the packet.
    bytes extraData; // Additional arbitrary data for the packet.
}

/**
 * @title PacketDecoder
 * @dev Library for decoding LayerZero packets.
 */
library PacketDecoder {
    using PacketV1Codec for bytes;

    /**
     * @dev Decode an inbound packet from the given packet data.
     * @param _packet The packet data to decode.
     * @return packet An InboundPacket struct representing the decoded packet.
     */
    function decode(bytes calldata _packet) internal pure returns (InboundPacket memory packet) {
        packet.origin = Origin(_packet.srcEid(), _packet.sender(), _packet.nonce());
        packet.dstEid = _packet.dstEid();
        packet.receiver = _packet.receiverB20();
        packet.guid = _packet.guid();
        packet.message = _packet.message();
    }

    /**
     * @dev Decode multiple inbound packets from the given packet data and associated message values.
     * @param _packets An array of packet data to decode.
     * @param _packetMsgValues An array of associated message values for each packet.
     * @return packets An array of InboundPacket structs representing the decoded packets.
     */
    function decode(
        bytes[] calldata _packets,
        uint256[] memory _packetMsgValues
    ) internal pure returns (InboundPacket[] memory packets) {
        packets = new InboundPacket[](_packets.length);
        for (uint256 i = 0; i < _packets.length; i++) {
            bytes calldata packet = _packets[i];
            packets[i] = PacketDecoder.decode(packet);
            // @dev Allows the verifier to specify the msg.value that gets passed in lzReceive.
            packets[i].value = _packetMsgValues[i];
        }
    }
}

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

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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 towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (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 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                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.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 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.

            uint256 twos = denominator & (0 - denominator);
            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 (unsignedRoundsUp(rounding) && 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
     * towards zero.
     *
     * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

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

pragma solidity ^0.8.20;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

struct SetConfigParam {
    uint32 eid;
    uint32 configType;
    bytes config;
}

interface IMessageLibManager {
    struct Timeout {
        address lib;
        uint256 expiry;
    }

    event LibraryRegistered(address newLib);
    event DefaultSendLibrarySet(uint32 eid, address newLib);
    event DefaultReceiveLibrarySet(uint32 eid, address newLib);
    event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);
    event SendLibrarySet(address sender, uint32 eid, address newLib);
    event ReceiveLibrarySet(address receiver, uint32 eid, address newLib);
    event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);

    function registerLibrary(address _lib) external;

    function isRegisteredLibrary(address _lib) external view returns (bool);

    function getRegisteredLibraries() external view returns (address[] memory);

    function setDefaultSendLibrary(uint32 _eid, address _newLib) external;

    function defaultSendLibrary(uint32 _eid) external view returns (address);

    function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _gracePeriod) external;

    function defaultReceiveLibrary(uint32 _eid) external view returns (address);

    function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;

    function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);

    function isSupportedEid(uint32 _eid) external view returns (bool);

    function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool);

    /// ------------------- OApp interfaces -------------------
    function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;

    function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);

    function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);

    function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;

    function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);

    function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _expiry) external;

    function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);

    function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;

    function getConfig(
        address _oapp,
        address _lib,
        uint32 _eid,
        uint32 _configType
    ) external view returns (bytes memory config);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IMessagingComposer {
    event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);
    event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);
    event LzComposeAlert(
        address indexed from,
        address indexed to,
        address indexed executor,
        bytes32 guid,
        uint16 index,
        uint256 gas,
        uint256 value,
        bytes message,
        bytes extraData,
        bytes reason
    );

    function composeQueue(
        address _from,
        address _to,
        bytes32 _guid,
        uint16 _index
    ) external view returns (bytes32 messageHash);

    function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;

    function lzCompose(
        address _from,
        address _to,
        bytes32 _guid,
        uint16 _index,
        bytes calldata _message,
        bytes calldata _extraData
    ) external payable;
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IMessagingChannel {
    event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);
    event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);
    event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);

    function eid() external view returns (uint32);

    // this is an emergency function if a message cannot be verified for some reasons
    // required to provide _nextNonce to avoid race condition
    function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;

    function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;

    function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;

    function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);

    function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);

    function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);

    function inboundPayloadHash(
        address _receiver,
        uint32 _srcEid,
        bytes32 _sender,
        uint64 _nonce
    ) external view returns (bytes32);

    function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IMessagingContext {
    function isSendingMessage() external view returns (bool);

    function getSendContext() external view returns (uint32 dstEid, address sender);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import { Origin } from "./ILayerZeroEndpointV2.sol";

interface ILayerZeroReceiver {
    function allowInitializePath(Origin calldata _origin) external view returns (bool);

    function nextNonce(uint32 _eid, bytes32 _sender) external view returns (uint64);

    function lzReceive(
        Origin calldata _origin,
        bytes32 _guid,
        bytes calldata _message,
        address _executor,
        bytes calldata _extraData
    ) external payable;
}

// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.20;

import { Packet } from "../../interfaces/ISendLib.sol";
import { AddressCast } from "../../libs/AddressCast.sol";

library PacketV1Codec {
    using AddressCast for address;
    using AddressCast for bytes32;

    uint8 internal constant PACKET_VERSION = 1;

    // header (version + nonce + path)
    // version
    uint256 private constant PACKET_VERSION_OFFSET = 0;
    //    nonce
    uint256 private constant NONCE_OFFSET = 1;
    //    path
    uint256 private constant SRC_EID_OFFSET = 9;
    uint256 private constant SENDER_OFFSET = 13;
    uint256 private constant DST_EID_OFFSET = 45;
    uint256 private constant RECEIVER_OFFSET = 49;
    // payload (guid + message)
    uint256 private constant GUID_OFFSET = 81; // keccak256(nonce + path)
    uint256 private constant MESSAGE_OFFSET = 113;

    function encode(Packet memory _packet) internal pure returns (bytes memory encodedPacket) {
        encodedPacket = abi.encodePacked(
            PACKET_VERSION,
            _packet.nonce,
            _packet.srcEid,
            _packet.sender.toBytes32(),
            _packet.dstEid,
            _packet.receiver,
            _packet.guid,
            _packet.message
        );
    }

    function encodePacketHeader(Packet memory _packet) internal pure returns (bytes memory) {
        return
            abi.encodePacked(
                PACKET_VERSION,
                _packet.nonce,
                _packet.srcEid,
                _packet.sender.toBytes32(),
                _packet.dstEid,
                _packet.receiver
            );
    }

    function encodePayload(Packet memory _packet) internal pure returns (bytes memory) {
        return abi.encodePacked(_packet.guid, _packet.message);
    }

    function header(bytes calldata _packet) internal pure returns (bytes calldata) {
        return _packet[0:GUID_OFFSET];
    }

    function version(bytes calldata _packet) internal pure returns (uint8) {
        return uint8(bytes1(_packet[PACKET_VERSION_OFFSET:NONCE_OFFSET]));
    }

    function nonce(bytes calldata _packet) internal pure returns (uint64) {
        return uint64(bytes8(_packet[NONCE_OFFSET:SRC_EID_OFFSET]));
    }

    function srcEid(bytes calldata _packet) internal pure returns (uint32) {
        return uint32(bytes4(_packet[SRC_EID_OFFSET:SENDER_OFFSET]));
    }

    function sender(bytes calldata _packet) internal pure returns (bytes32) {
        return bytes32(_packet[SENDER_OFFSET:DST_EID_OFFSET]);
    }

    function senderAddressB20(bytes calldata _packet) internal pure returns (address) {
        return sender(_packet).toAddress();
    }

    function dstEid(bytes calldata _packet) internal pure returns (uint32) {
        return uint32(bytes4(_packet[DST_EID_OFFSET:RECEIVER_OFFSET]));
    }

    function receiver(bytes calldata _packet) internal pure returns (bytes32) {
        return bytes32(_packet[RECEIVER_OFFSET:GUID_OFFSET]);
    }

    function receiverB20(bytes calldata _packet) internal pure returns (address) {
        return receiver(_packet).toAddress();
    }

    function guid(bytes calldata _packet) internal pure returns (bytes32) {
        return bytes32(_packet[GUID_OFFSET:MESSAGE_OFFSET]);
    }

    function message(bytes calldata _packet) internal pure returns (bytes calldata) {
        return bytes(_packet[MESSAGE_OFFSET:]);
    }

    function payload(bytes calldata _packet) internal pure returns (bytes calldata) {
        return bytes(_packet[GUID_OFFSET:]);
    }

    function payloadHash(bytes calldata _packet) internal pure returns (bytes32) {
        return keccak256(payload(_packet));
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import { MessagingFee } from "./ILayerZeroEndpointV2.sol";
import { IMessageLib } from "./IMessageLib.sol";

struct Packet {
    uint64 nonce;
    uint32 srcEid;
    address sender;
    uint32 dstEid;
    bytes32 receiver;
    bytes32 guid;
    bytes message;
}

interface ISendLib is IMessageLib {
    function send(
        Packet calldata _packet,
        bytes calldata _options,
        bool _payInLzToken
    ) external returns (MessagingFee memory, bytes memory encodedPacket);

    function quote(
        Packet calldata _packet,
        bytes calldata _options,
        bool _payInLzToken
    ) external view returns (MessagingFee memory);

    function setTreasury(address _treasury) external;

    function withdrawFee(address _to, uint256 _amount) external;

    function withdrawLzTokenFee(address _lzToken, address _to, uint256 _amount) external;
}

// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.20;

library AddressCast {
    error AddressCast_InvalidSizeForAddress();
    error AddressCast_InvalidAddress();

    function toBytes32(bytes calldata _addressBytes) internal pure returns (bytes32 result) {
        if (_addressBytes.length > 32) revert AddressCast_InvalidAddress();
        result = bytes32(_addressBytes);
        unchecked {
            uint256 offset = 32 - _addressBytes.length;
            result = result >> (offset * 8);
        }
    }

    function toBytes32(address _address) internal pure returns (bytes32 result) {
        result = bytes32(uint256(uint160(_address)));
    }

    function toBytes(bytes32 _addressBytes32, uint256 _size) internal pure returns (bytes memory result) {
        if (_size == 0 || _size > 32) revert AddressCast_InvalidSizeForAddress();
        result = new bytes(_size);
        unchecked {
            uint256 offset = 256 - _size * 8;
            assembly {
                mstore(add(result, 32), shl(offset, _addressBytes32))
            }
        }
    }

    function toAddress(bytes32 _addressBytes32) internal pure returns (address result) {
        result = address(uint160(uint256(_addressBytes32)));
    }

    function toAddress(bytes calldata _addressBytes) internal pure returns (address result) {
        if (_addressBytes.length != 20) revert AddressCast_InvalidAddress();
        result = address(bytes20(_addressBytes));
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol";

import { SetConfigParam } from "./IMessageLibManager.sol";

enum MessageLibType {
    Send,
    Receive,
    SendAndReceive
}

interface IMessageLib is IERC165 {
    function setConfig(address _oapp, SetConfigParam[] calldata _config) external;

    function getConfig(uint32 _eid, address _oapp, uint32 _configType) external view returns (bytes memory config);

    function isSupportedEid(uint32 _eid) external view returns (bool);

    // message libs of same major version are compatible
    function version() external view returns (uint64 major, uint8 minor, uint8 endpointVersion);

    function messageLibType() external view returns (MessageLibType);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

Settings
{
  "remappings": [
    "ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/",
    "forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/",
    "@layerzerolabs/=node_modules/@layerzerolabs/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@axelar-network/=node_modules/@axelar-network/",
    "@balancer-labs/=node_modules/@balancer-labs/",
    "@chainlink/=node_modules/@chainlink/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "hardhat-deploy/=node_modules/hardhat-deploy/",
    "hardhat/=node_modules/hardhat/",
    "solidity-bytes-utils/=node_modules/solidity-bytes-utils/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 150
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_lzEndpoint","type":"address"},{"internalType":"address","name":"_delegate","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_guardian","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"CdxUSD__FACILITATOR_ALREADY_EXISTS","type":"error"},{"inputs":[],"name":"CdxUSD__FACILITATOR_BUCKET_CAPACITY_EXCEEDED","type":"error"},{"inputs":[],"name":"CdxUSD__FACILITATOR_BUCKET_LEVEL_NOT_ZERO","type":"error"},{"inputs":[],"name":"CdxUSD__FACILITATOR_DOES_NOT_EXIST","type":"error"},{"inputs":[],"name":"CdxUSD__INVALID_BURN_AMOUNT","type":"error"},{"inputs":[],"name":"CdxUSD__INVALID_LABEL","type":"error"},{"inputs":[],"name":"CdxUSD__INVALID_MINT_AMOUNT","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidDelegate","type":"error"},{"inputs":[],"name":"InvalidEndpointCall","type":"error"},{"inputs":[],"name":"InvalidLocalDecimals","type":"error"},{"inputs":[{"internalType":"bytes","name":"options","type":"bytes"}],"name":"InvalidOptions","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"LzTokenUnavailable","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"NoPeer","type":"error"},{"inputs":[{"internalType":"uint256","name":"msgValue","type":"uint256"}],"name":"NotEnoughNative","type":"error"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"OFTExtended__BRIDGING_HOURLY_LIMIT_REACHED","type":"error"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"}],"name":"OFTExtended__BRIDGING_LIMIT_REACHED","type":"error"},{"inputs":[],"name":"OFTExtended__BRIDGING_PAUSED","type":"error"},{"inputs":[],"name":"OFTExtended__FEE_TOO_HIGH","type":"error"},{"inputs":[],"name":"OFTExtended__LIMIT_MUST_BE_NEGATIVE","type":"error"},{"inputs":[],"name":"OFTExtended__ONLY_ADMINS","type":"error"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"OnlyEndpoint","type":"error"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"}],"name":"OnlyPeer","type":"error"},{"inputs":[],"name":"OnlySelf","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"name":"SimulationResult","type":"error"},{"inputs":[{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"}],"name":"SlippageExceeded","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"indexed":false,"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"EnforcedOptionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"facilitatorAddress","type":"address"},{"indexed":true,"internalType":"bytes32","name":"label","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"bucketCapacity","type":"uint256"}],"name":"FacilitatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"facilitatorAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldCapacity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCapacity","type":"uint256"}],"name":"FacilitatorBucketCapacityUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"facilitatorAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldLevel","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLevel","type":"uint256"}],"name":"FacilitatorBucketLevelUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"facilitatorAddress","type":"address"}],"name":"FacilitatorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"inspector","type":"address"}],"name":"MsgInspectorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"srcEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"name":"OFTReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"guid","type":"bytes32"},{"indexed":false,"internalType":"uint32","name":"dstEid","type":"uint32"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"name":"OFTSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"eid","type":"uint32"},{"indexed":false,"internalType":"bytes32","name":"peer","type":"bytes32"}],"name":"PeerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"preCrimeAddress","type":"address"}],"name":"PreCrimeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"_eid","type":"uint32"},{"indexed":false,"internalType":"int256","name":"_minBalanceLimit","type":"int256"}],"name":"SetBalanceLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"SetFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newGuardian","type":"address"}],"name":"SetGuardian","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_hourlyLimit","type":"uint256"}],"name":"SetHourlyLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_newTreasury","type":"address"}],"name":"SetTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_pause","type":"bool"}],"name":"ToggleBridgePause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SEND_AND_CALL","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_facilitatorAddress","type":"address"},{"internalType":"string","name":"_facilitatorLabel","type":"string"},{"internalType":"uint128","name":"_bucketCapacity","type":"uint128"}],"name":"addFacilitator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"}],"name":"allowInitializePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvalRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"uint16","name":"_msgType","type":"uint16"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"}],"name":"combineOptions","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalConversionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endpoint","outputs":[{"internalType":"contract ILayerZeroEndpointV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"}],"name":"enforcedOptions","outputs":[{"internalType":"bytes","name":"enforcedOption","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"getBalanceLimit","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_dstEid","type":"uint32"}],"name":"getBalanceUtilization","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_facilitator","type":"address"}],"name":"getFacilitator","outputs":[{"components":[{"internalType":"uint128","name":"bucketCapacity","type":"uint128"},{"internalType":"uint128","name":"bucketLevel","type":"uint128"},{"internalType":"string","name":"label","type":"string"}],"internalType":"struct ICdxUSD.Facilitator","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_facilitator","type":"address"}],"name":"getFacilitatorBucket","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFacilitatorsList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hourlyLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"","type":"tuple"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"address","name":"_sender","type":"address"}],"name":"isComposeMsgSender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"isPeer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUsedTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzPause","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"origin","type":"tuple"},{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct InboundPacket[]","name":"_packets","type":"tuple[]"}],"name":"lzReceiveAndRevert","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"srcEid","type":"uint32"},{"internalType":"bytes32","name":"sender","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"}],"internalType":"struct Origin","name":"_origin","type":"tuple"},{"internalType":"bytes32","name":"_guid","type":"bytes32"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"lzReceiveSimulate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"msgInspector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"nextNonce","outputs":[{"internalType":"uint64","name":"nonce","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oApp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oAppVersion","outputs":[{"internalType":"uint64","name":"senderVersion","type":"uint64"},{"internalType":"uint64","name":"receiverVersion","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"oftVersion","outputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"},{"internalType":"uint64","name":"version","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"eid","type":"uint32"}],"name":"peers","outputs":[{"internalType":"bytes32","name":"peer","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"preCrime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"}],"name":"quoteOFT","outputs":[{"components":[{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"uint256","name":"maxAmountLD","type":"uint256"}],"internalType":"struct OFTLimit","name":"oftLimit","type":"tuple"},{"components":[{"internalType":"int256","name":"feeAmountLD","type":"int256"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct OFTFeeDetail[]","name":"oftFeeDetails","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"internalType":"struct OFTReceipt","name":"oftReceipt","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"internalType":"bool","name":"_payInLzToken","type":"bool"}],"name":"quoteSend","outputs":[{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"msgFee","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_facilitatorAddress","type":"address"}],"name":"removeFacilitator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"dstEid","type":"uint32"},{"internalType":"bytes32","name":"to","type":"bytes32"},{"internalType":"uint256","name":"amountLD","type":"uint256"},{"internalType":"uint256","name":"minAmountLD","type":"uint256"},{"internalType":"bytes","name":"extraOptions","type":"bytes"},{"internalType":"bytes","name":"composeMsg","type":"bytes"},{"internalType":"bytes","name":"oftCmd","type":"bytes"}],"internalType":"struct SendParam","name":"_sendParam","type":"tuple"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"_fee","type":"tuple"},{"internalType":"address","name":"_refundAddress","type":"address"}],"name":"send","outputs":[{"components":[{"internalType":"bytes32","name":"guid","type":"bytes32"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"fee","type":"tuple"}],"internalType":"struct MessagingReceipt","name":"msgReceipt","type":"tuple"},{"components":[{"internalType":"uint256","name":"amountSentLD","type":"uint256"},{"internalType":"uint256","name":"amountReceivedLD","type":"uint256"}],"internalType":"struct OFTReceipt","name":"oftReceipt","type":"tuple"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"int256","name":"_minBalanceLimit","type":"int256"}],"name":"setBalanceLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegate","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint32","name":"eid","type":"uint32"},{"internalType":"uint16","name":"msgType","type":"uint16"},{"internalType":"bytes","name":"options","type":"bytes"}],"internalType":"struct EnforcedOptionParam[]","name":"_enforcedOptions","type":"tuple[]"}],"name":"setEnforcedOptions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_facilitator","type":"address"},{"internalType":"uint128","name":"_newCapacity","type":"uint128"}],"name":"setFacilitatorBucketCapacity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_guardian","type":"address"}],"name":"setGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_hourlyLimit","type":"uint256"}],"name":"setHourlyLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_msgInspector","type":"address"}],"name":"setMsgInspector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_eid","type":"uint32"},{"internalType":"bytes32","name":"_peer","type":"bytes32"}],"name":"setPeer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_preCrime","type":"address"}],"name":"setPreCrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_symbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharedDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slidingHourlyLimitUtilization","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpauseBridge","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101a06040523480156200001257600080fd5b506040516200568838038062005688833981016040819052620000359162000530565b8585858585858580604051806040016040528060018152602001603160f81b8152506040518060200160405280600081525060405180602001604052806000815250620000876200037060201b60201c565b898981818181806001600160a01b038116620000be57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000c98162000375565b506001600160a01b038083166080528116620000f857604051632d618d8160e21b815260040160405180910390fd5b60805160405163ca5eb5e160e01b81526001600160a01b0383811660048301529091169063ca5eb5e190602401600060405180830381600087803b1580156200014057600080fd5b505af115801562000155573d6000803e3d6000fd5b50505050505050506200016d620003c560201b60201c565b60ff168360ff16101562000194576040516301e9714b60e41b815260040160405180910390fd5b620001a1600684620005f9565b620001ae90600a62000712565b60a0525060089150620001c490508382620007bb565b506009620001d38282620007bb565b50620001e59150839050600a620003ca565b61016052620001f681600b620003ca565b61018052815160208084019190912061012052815190820120610140524660e052620002866101205161014051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60c052505030610100908152601480546001600160a01b0319166001600160a01b0386811691821790925560138054610100600160a81b031916928616909302919091179091556040519081527fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef3915060200160405180910390a16040516001600160a01b03821681527f31845eceb9cde510c7e8b37f76301c688feb70bc9653aa4c28a3734999840fd89060200160405180910390a15050505050508560189081620003549190620007bb565b506019620003638682620007bb565b50505050505050620008e1565b601290565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600690565b6000602083511015620003ea57620003e28362000403565b9050620003fd565b81620003f78482620007bb565b5060ff90505b92915050565b600080829050601f8151111562000431578260405163305a27a960e01b8152600401620000b5919062000887565b80516200043e82620008bc565b179392505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620004795781810151838201526020016200045f565b50506000910152565b600082601f8301126200049457600080fd5b81516001600160401b0380821115620004b157620004b162000446565b604051601f8301601f19908116603f01168101908282118183101715620004dc57620004dc62000446565b81604052838152866020858801011115620004f657600080fd5b620005098460208301602089016200045c565b9695505050505050565b80516001600160a01b03811681146200052b57600080fd5b919050565b60008060008060008060c087890312156200054a57600080fd5b86516001600160401b03808211156200056257600080fd5b620005708a838b0162000482565b975060208901519150808211156200058757600080fd5b506200059689828a0162000482565b955050620005a76040880162000513565b9350620005b76060880162000513565b9250620005c76080880162000513565b9150620005d760a0880162000513565b90509295509295509295565b634e487b7160e01b600052601160045260246000fd5b60ff8281168282160390811115620003fd57620003fd620005e3565b600181815b80851115620006565781600019048211156200063a576200063a620005e3565b808516156200064857918102915b93841c93908002906200061a565b509250929050565b6000826200066f57506001620003fd565b816200067e57506000620003fd565b8160018114620006975760028114620006a257620006c2565b6001915050620003fd565b60ff841115620006b657620006b6620005e3565b50506001821b620003fd565b5060208310610133831016604e8410600b8410161715620006e7575081810a620003fd565b620006f3838362000615565b80600019048211156200070a576200070a620005e3565b029392505050565b60006200072360ff8416836200065e565b9392505050565b600181811c908216806200073f57607f821691505b6020821081036200076057634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620007b6576000816000526020600020601f850160051c81016020861015620007915750805b601f850160051c820191505b81811015620007b2578281556001016200079d565b5050505b505050565b81516001600160401b03811115620007d757620007d762000446565b620007ef81620007e884546200072a565b8462000766565b602080601f8311600181146200082757600084156200080e5750858301515b600019600386901b1c1916600185901b178555620007b2565b600085815260208120601f198616915b82811015620008585788860151825594840194600190910190840162000837565b5085821015620008775787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020815260008251806020840152620008a88160408501602087016200045c565b601f01601f19169190910160400192915050565b80516020808301519190811015620007605760001960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161018051614cf06200099860003960006129e5015260006129b801526000612629015260006126010152600061255c01526000612586015260006125b0015260008181610a0f01528181612ec401528181612f3901526131b001526000818161078801528181610f1901528181611d9d01528181612329015281816127b401528181612cb801528181613485015261353e0152614cf06000f3fe60806040526004361061041b5760003560e01c80637ecebe001161021e578063bb0b6a5311610123578063d46ec0ed116100ab578063de2e31e61161007a578063de2e31e614610d07578063f0f4426014610d3a578063f2fde38b14610d5a578063fc0c546a1461070c578063ff7bd03d14610d7a57600080fd5b8063d46ec0ed14610c84578063d505accf14610cb1578063dd62ed3e14610cd1578063ddca3f4314610cf157600080fd5b8063c777ffa6116100f2578063c777ffa614610bfa578063c7c7f5b314610c10578063ca5eb5e114610c31578063d045a0dc14610c51578063d424388514610c6457600080fd5b8063bb0b6a5314610b7a578063bc70b35414610ba7578063bd815db014610bc7578063c47f002714610bda57600080fd5b80639f68b964116101a6578063aa02f94a11610175578063aa02f94a14610a9a578063af93df5714610afa578063b731ea0a14610b1a578063b84c824614610b3a578063b98bd07014610b5a57600080fd5b80639f68b96414610a31578063a11812ba14610a45578063a82f143c14610a65578063a9059cbb14610a7a57600080fd5b8063857749b0116101ed578063857749b0146109965780638a0dac4a146109aa5780638da5cb5b146109ca57806395d89b41146109e8578063963efcaa146109fd57600080fd5b80637ecebe001461090e5780637fc24def1461092e57806382413eac1461094e57806384b0196e1461096e57600080fd5b80633c96a8c71161032457806369fe0e2d116102ac578063715018a61161027b578063715018a61461087357806377e274001461088857806379a3c6ed146108a85780637d25a05e146108be5780637dd0480f146108f957600080fd5b806369fe0e2d146107ca5780636b5c2963146107ea5780636fc1b31e1461081d57806370a082311461083d57600080fd5b806352ae2879116102f357806352ae28791461070c5780635535d4611461071f5780635a0dfe4d1461073f5780635e280f111461077657806361d027b3146107aa57600080fd5b80633c96a8c71461068757806340c10f19146106a757806342966c68146106c7578063452a9320146106e757600080fd5b80631ec90f2e116103a7578063313ce56711610376578063313ce567146105e95780633400288b1461060b5780633644e5151461062b5780633771e259146106405780633b6f743b1461065a57600080fd5b80631ec90f2e1461057c5780631f5e13341461059e57806323b872dd146105b3578063243f466f146105d357600080fd5b806313137d65116103ee57806313137d65146104d7578063134d4f25146104ec578063156a0d0f1461051457806317442b701461053b57806318160ddd1461055d57600080fd5b806306fdde0314610420578063095ea7b31461044b5780630d35b4151461047b578063111ecdad146104aa575b600080fd5b34801561042c57600080fd5b50610435610d9a565b60405161044291906139d1565b60405180910390f35b34801561045757600080fd5b5061046b6104663660046139f9565b610e2c565b6040519015158152602001610442565b34801561048757600080fd5b5061049b610496366004613a3d565b610e46565b60405161044293929190613a71565b3480156104b657600080fd5b506004546104ca906001600160a01b031681565b6040516104429190613b0a565b6104ea6104e5366004613b78565b610f17565b005b3480156104f857600080fd5b50610501600281565b60405161ffff9091168152602001610442565b34801561052057600080fd5b506040805162b9270b60e21b81526001602082015201610442565b34801561054757600080fd5b5060408051600181526002602082015201610442565b34801561056957600080fd5b506007545b604051908152602001610442565b34801561058857600080fd5b50610591610fdb565b6040516104429190613c17565b3480156105aa57600080fd5b50610501600181565b3480156105bf57600080fd5b5061046b6105ce366004613c58565b610fec565b3480156105df57600080fd5b5061056e60115481565b3480156105f557600080fd5b5060125b60405160ff9091168152602001610442565b34801561061757600080fd5b506104ea610626366004613cb2565b611012565b34801561063757600080fd5b5061056e611028565b34801561064c57600080fd5b5060135461046b9060ff1681565b34801561066657600080fd5b5061067a610675366004613cdc565b611032565b6040516104429190613d2d565b34801561069357600080fd5b506104ea6106a2366004613cb2565b611099565b3480156106b357600080fd5b506104ea6106c23660046139f9565b611119565b3480156106d357600080fd5b506104ea6106e2366004613d44565b6111fb565b3480156106f357600080fd5b506013546104ca9061010090046001600160a01b031681565b34801561071857600080fd5b50306104ca565b34801561072b57600080fd5b5061043561073a366004613d6f565b6112b0565b34801561074b57600080fd5b5061046b61075a366004613cb2565b63ffffffff919091166000908152600160205260409020541490565b34801561078257600080fd5b506104ca7f000000000000000000000000000000000000000000000000000000000000000081565b3480156107b657600080fd5b506014546104ca906001600160a01b031681565b3480156107d657600080fd5b506104ea6107e5366004613d44565b611355565b3480156107f657600080fd5b5061056e610805366004613da2565b63ffffffff1660009081526010602052604090205490565b34801561082957600080fd5b506104ea610838366004613dbd565b6113c5565b34801561084957600080fd5b5061056e610858366004613dbd565b6001600160a01b031660009081526005602052604090205490565b34801561087f57600080fd5b506104ea611418565b34801561089457600080fd5b506104ea6108a3366004613d44565b61142c565b3480156108b457600080fd5b5061056e600e5481565b3480156108ca57600080fd5b506108e16108d9366004613cb2565b600092915050565b6040516001600160401b039091168152602001610442565b34801561090557600080fd5b506104ea61147c565b34801561091a57600080fd5b5061056e610929366004613dbd565b6114f2565b34801561093a57600080fd5b506104ea610949366004613df1565b611510565b34801561095a57600080fd5b5061046b610969366004613e57565b61162c565b34801561097a57600080fd5b50610983611641565b6040516104429796959493929190613ebd565b3480156109a257600080fd5b5060066105f9565b3480156109b657600080fd5b506104ea6109c5366004613dbd565b611687565b3480156109d657600080fd5b506000546001600160a01b03166104ca565b3480156109f457600080fd5b506104356116df565b348015610a0957600080fd5b5061056e7f000000000000000000000000000000000000000000000000000000000000000081565b348015610a3d57600080fd5b50600061046b565b348015610a5157600080fd5b506104ea610a60366004613dbd565b6116ee565b348015610a7157600080fd5b506104ea6117f4565b348015610a8657600080fd5b5061046b610a953660046139f9565b611837565b348015610aa657600080fd5b50610ae5610ab5366004613dbd565b6001600160a01b03166000908152601560205260409020546001600160801b0380821692600160801b9092041690565b60408051928352602083019190915201610442565b348015610b0657600080fd5b506104ea610b15366004613f56565b611845565b348015610b2657600080fd5b506002546104ca906001600160a01b031681565b348015610b4657600080fd5b506104ea610b55366004614077565b61190f565b348015610b6657600080fd5b506104ea610b75366004614103565b611923565b348015610b8657600080fd5b5061056e610b95366004613da2565b60016020526000908152604090205481565b348015610bb357600080fd5b50610435610bc2366004614144565b61193d565b6104ea610bd5366004614103565b611ae5565b348015610be657600080fd5b506104ea610bf5366004614077565b611c6f565b348015610c0657600080fd5b5061056e60125481565b610c23610c1e3660046141a4565b611c83565b604051610442929190614211565b348015610c3d57600080fd5b506104ea610c4c366004613dbd565b611d7e565b6104ea610c5f366004613b78565b611e07565b348015610c7057600080fd5b506104ea610c7f366004613dbd565b611e36565b348015610c9057600080fd5b50610ca4610c9f366004613dbd565b611e89565b6040516104429190614263565b348015610cbd57600080fd5b506104ea610ccc36600461429f565b611f82565b348015610cdd57600080fd5b5061056e610cec366004614316565b6120bc565b348015610cfd57600080fd5b5061056e600f5481565b348015610d1357600080fd5b5061056e610d22366004613da2565b63ffffffff166000908152600d602052604090205490565b348015610d4657600080fd5b506104ea610d55366004613dbd565b6120e7565b348015610d6657600080fd5b506104ea610d75366004613dbd565b61213a565b348015610d8657600080fd5b5061046b610d95366004614344565b612178565b606060188054610da990614360565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd590614360565b8015610e225780601f10610df757610100808354040283529160200191610e22565b820191906000526020600020905b815481529060010190602001808311610e0557829003601f168201915b5050505050905090565b600033610e3a8185856121ae565b60019150505b92915050565b60408051808201909152600080825260208201526060610e79604051806040016040528060008152602001600081525090565b60408051808201825260008082526001600160401b03602080840182905284518381529081019094529195509182610ed4565b604080518082019091526000815260606020820152815260200190600190039081610eac5790505b509350600080610ef9604089013560608a0135610ef460208c018c613da2565b6121c0565b60408051808201909152918252602082015296989597505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163314610f6b57336040516391ac5e4f60e01b8152600401610f629190613b0a565b60405180910390fd5b60208701803590610f8590610f80908a613da2565b612258565b14610fc357610f976020880188613da2565b60405163309afaf360e21b815263ffffffff909116600482015260208801356024820152604401610f62565b610fd287878787878787612294565b50505050505050565b6060610fe760166123fb565b905090565b600033610ffa858285612408565b61100585858561246e565b60019150505b9392505050565b61101a6124cd565b61102482826124fa565b5050565b6000610fe761254f565b6040805180820190915260008082526020820152600061106260408501356060860135610ef46020880188613da2565b915050600080611072868461267a565b909250905061108f6110876020880188613da2565b83838861279e565b9695505050505050565b6110a16124cd565b60008113156110c357604051637cc6fe4b60e11b815260040160405180910390fd5b63ffffffff82166000818152600d602052604090819020839055517f99d37cf7f853411320e929295446ce5e8d2d17ef46a59d47edc350999d4e84069061110d9084815260200190565b60405180910390a25050565b8060000361113a576040516303703cb360e01b815260040160405180910390fd5b33600090815260156020526040812080549091600160801b9091046001600160801b03169061116984836143aa565b83549091506001600160801b03168111156111975760405163655fcfd760e01b815260040160405180910390fd5b82546001600160801b03808316600160801b0291161783556111b9858561287f565b604080518381526020810183905233917facb6de9209e4f34974cb165eef5738f0cf0b4ea9819ef30d30f0f7d81272ab82910160405180910390a25050505050565b8060000361121c57604051632ba1b49760e01b815260040160405180910390fd5b33600090815260156020526040812080549091600160801b9091046001600160801b03169061124b84836143bd565b83546001600160801b03808316600160801b029116178455905061126f33856128b5565b604080518381526020810183905233917facb6de9209e4f34974cb165eef5738f0cf0b4ea9819ef30d30f0f7d81272ab82910160405180910390a250505050565b6003602090815260009283526040808420909152908252902080546112d490614360565b80601f016020809104026020016040519081016040528092919081815260200182805461130090614360565b801561134d5780601f106113225761010080835404028352916020019161134d565b820191906000526020600020905b81548152906001019060200180831161133057829003601f168201915b505050505081565b61135d6124cd565b61136a600a6127106143d0565b81111561138a576040516345c242e160e01b815260040160405180910390fd5b600f8190556040518181527e172ddfc5ae88d08b3de01a5a187667c37a5a53989e8c175055cb6c993792a7906020015b60405180910390a150565b6113cd6124cd565b600480546001600160a01b0319166001600160a01b0383161790556040517ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d4414197906113ba908390613b0a565b6114206124cd565b61142a60006128eb565b565b6114346124cd565b80600e541461144757611447600061293b565b600e8190556040518181527f3eca63985afcb12e35f3201792a8e8653305818e44a00d49369a65060e2ea981906020016113ba565b60135461010090046001600160a01b031633146114ac576040516369584d7160e01b815260040160405180910390fd5b6013805460ff191660019081179091556040519081527fc8660cf212026b1de7d608062f14766c193f6df9a00b9899193ee3c6906ca48d906020015b60405180910390a1565b6001600160a01b0381166000908152600c6020526040812054610e40565b6115186124cd565b6001600160a01b038416600090815260156020526040902060018101805461153f90614360565b15905061155f576040516347511baf60e11b815260040160405180910390fd5b600083900361158157604051630454a9db60e11b815260040160405180910390fd5b60018101611590848683614442565b5080546001600160801b0319166001600160801b0383161781556115b560168661299c565b5083836040516020016115c9929190614501565b60408051601f198184030181529082905280516020918201206001600160801b0385168352916001600160a01b038816917fdabd62626ada7b13e299389e94d768b294e5e24285ed2ffa1e5cd447c99c54ad910160405180910390a35050505050565b6001600160a01b03811630145b949350505050565b6000606080600080600060606116556129b1565b61165d6129de565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61168f6124cd565b60138054610100600160a81b0319166101006001600160a01b038416021790556040517f31845eceb9cde510c7e8b37f76301c688feb70bc9653aa4c28a3734999840fd8906113ba908390613b0a565b606060198054610da990614360565b6116f66124cd565b6001600160a01b0381166000908152601560205260409020600101805461171c90614360565b905060000361173e57604051633f602bfd60e21b815260040160405180910390fd5b6001600160a01b038116600090815260156020526040902054600160801b90046001600160801b03161561178557604051631f2b94b360e01b815260040160405180910390fd5b6001600160a01b0381166000908152601560205260408120818155906117ae60018301826138eb565b506117bc9050601682612a0b565b506040516001600160a01b038216907fa8fe5b89f35f2ebd6f3f95a7ef215f4bd89179e10c101073ae76cffad14734cf90600090a250565b6117fc6124cd565b6013805460ff19169055604051600081527fc8660cf212026b1de7d608062f14766c193f6df9a00b9899193ee3c6906ca48d906020016114e8565b600033610e3a81858561246e565b61184d6124cd565b6001600160a01b0382166000908152601560205260409020600101805461187390614360565b905060000361189557604051633f602bfd60e21b815260040160405180910390fd5b6001600160a01b03821660008181526015602090815260409182902080546001600160801b031981166001600160801b03878116918217909355845192909116808352928201529092917fc795c0a4927c3b6645e4e49a5a519af936b3c1c0e4c323a3f7251063f3f4bb0e910160405180910390a2505050565b6119176124cd565b60196110248282614511565b61192b6124cd565b61102461193882846145d0565b612a20565b63ffffffff8416600090815260036020908152604080832061ffff8716845290915281208054606092919061197190614360565b80601f016020809104026020016040519081016040528092919081815260200182805461199d90614360565b80156119ea5780601f106119bf576101008083540402835291602001916119ea565b820191906000526020600020905b8154815290600101906020018083116119cd57829003601f168201915b505050505090508051600003611a3a5783838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294506116399350505050565b6000839003611a4a579050611639565b60028310611ac857611a9184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612b2792505050565b80611a9f84600281886146b8565b604051602001611ab1939291906146e2565b604051602081830303815290604052915050611639565b8383604051639a6d49cd60e01b8152600401610f62929190614733565b60005b81811015611bee5736838383818110611b0357611b03614747565b9050602002810190611b15919061475d565b9050611b48611b276020830183613da2565b602083013563ffffffff919091166000908152600160205260409020541490565b611b525750611be6565b3063d045a0dc60c08301358360a0810135611b7161010083018361477e565b611b82610100890160e08a01613dbd565b611b906101208a018a61477e565b6040518963ffffffff1660e01b8152600401611bb297969594939291906147d9565b6000604051808303818588803b158015611bcb57600080fd5b505af1158015611bdf573d6000803e3d6000fd5b5050505050505b600101611ae8565b50336001600160a01b0316638e9e70996040518163ffffffff1660e01b8152600401600060405180830381865afa158015611c2d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c55919081019061485f565b604051638351eea760e01b8152600401610f6291906139d1565b611c776124cd565b60186110248282614511565b611c8b613925565b6040805180820190915260008082526020820152600080611cc233604089013560608a0135611cbd60208c018c613da2565b612b53565b91509150600080611cd3898461267a565b9092509050611cff611ce860208b018b613da2565b8383611cf9368d90038d018d6148cc565b8b612c85565b60408051808201909152858152602080820186905282519298509096503391907f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a90611d4d908d018d613da2565b6040805163ffffffff909216825260208201899052810187905260600160405180910390a350505050935093915050565b611d866124cd565b60405163ca5eb5e160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ca5eb5e190611dd2908490600401613b0a565b600060405180830381600087803b158015611dec57600080fd5b505af1158015611e00573d6000803e3d6000fd5b5050505050565b333014611e275760405163029a949d60e31b815260040160405180910390fd5b610fd287878787878787610fc3565b611e3e6124cd565b600280546001600160a01b0319166001600160a01b0383161790556040517fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c2427760906113ba908390613b0a565b6040805160608082018352600080835260208084018290528385018390526001600160a01b038616825260158152908490208451928301855280546001600160801b038082168552600160801b9091041691830191909152600181018054939492939192840191611ef990614360565b80601f0160208091040260200160405190810160405280929190818152602001828054611f2590614360565b8015611f725780601f10611f4757610100808354040283529160200191611f72565b820191906000526020600020905b815481529060010190602001808311611f5557829003601f168201915b5050505050815250509050919050565b83421115611fa65760405163313c898160e11b815260048101859052602401610f62565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888611ff38c6001600160a01b03166000908152600c6020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061204e82612d90565b9050600061205e82878787612dbd565b9050896001600160a01b0316816001600160a01b0316146120a5576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610f62565b6120b08a8a8a6121ae565b50505050505050505050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6120ef6124cd565b601480546001600160a01b0319166001600160a01b0383161790556040517fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef3906113ba908390613b0a565b6121426124cd565b6001600160a01b03811661216c576000604051631e4fbdf760e01b8152600401610f629190613b0a565b612175816128eb565b50565b60006020820180359060019083906121909086613da2565b63ffffffff1681526020810191909152604001600020541492915050565b6121bb8383836001612deb565b505050565b6000806121cc85612ec0565b600f5490925080158015906121eb57506014546001600160a01b031615155b156122205761221961271061220083866148fe565b61220a91906143d0565b61221490856143bd565b612ec0565b9150612224565b8291505b8482101561224f576040516371c4efed60e01b81526004810183905260248101869052604401610f62565b50935093915050565b63ffffffff811660009081526001602052604081205480610e405760405163f6ff4fb760e01b815263ffffffff84166004820152602401610f62565b60006122a66122a38787612ef7565b90565b905060006122d2826122c06122bb8a8a612f0f565b612f32565b6122cd60208d018d613da2565b612f67565b9050602886111561239957600061230f6122f260608c0160408d01614915565b6122ff60208d018d613da2565b8461230a8c8c612fa6565b612ff1565b604051633e5ac80960e11b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637cb59012906123659086908d906000908790600401614932565b600060405180830381600087803b15801561237f57600080fd5b505af1158015612393573d6000803e3d6000fd5b50505050505b6001600160a01b038216887fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c6123d260208d018d613da2565b6040805163ffffffff9092168252602082018690520160405180910390a3505050505050505050565b6060600061100b83613023565b600061241484846120bc565b90506000198114612468578181101561245957604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610f62565b61246884848484036000612deb565b50505050565b6001600160a01b038316612498576000604051634b637e8f60e11b8152600401610f629190613b0a565b6001600160a01b0382166124c257600060405163ec442f0560e01b8152600401610f629190613b0a565b6121bb83838361307f565b6000546001600160a01b0316331461142a573360405163118cdaa760e01b8152600401610f629190613b0a565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156125a857507f000000000000000000000000000000000000000000000000000000000000000046145b156125d257507f000000000000000000000000000000000000000000000000000000000000000090565b610fe7604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60608060006126d78560200135612690866131a9565b61269d60a089018961477e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506131d592505050565b90935090506000816126ea5760016126ed565b60025b905061270d6126ff6020880188613da2565b82610bc260808a018a61477e565b6004549093506001600160a01b031615612795576004805460405163043a78eb60e01b81526001600160a01b039091169163043a78eb91612752918891889101614963565b602060405180830381865afa15801561276f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127939190614988565b505b50509250929050565b60408051808201909152600080825260208201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ddc28c586040518060a001604052808863ffffffff16815260200161280189612258565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b81526004016128369291906149a5565b6040805180830381865afa158015612852573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128769190614a4e565b95945050505050565b6001600160a01b0382166128a957600060405163ec442f0560e01b8152600401610f629190613b0a565b6110246000838361307f565b6001600160a01b0382166128df576000604051634b637e8f60e11b8152600401610f629190613b0a565b6110248260008361307f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006012544261294b91906143bd565b90506000610e10600e548361296091906148fe565b61296a91906143d0565b6011549091508361297b838361324f565b61298590836143bd565b61298f91906143aa565b6011555050426012555050565b600061100b836001600160a01b038416613265565b6060610fe77f0000000000000000000000000000000000000000000000000000000000000000600a6132b4565b6060610fe77f0000000000000000000000000000000000000000000000000000000000000000600b6132b4565b600061100b836001600160a01b03841661335f565b60005b8151811015612af757612a52828281518110612a4157612a41614747565b602002602001015160400151612b27565b818181518110612a6457612a64614747565b60200260200101516040015160036000848481518110612a8657612a86614747565b60200260200101516000015163ffffffff1663ffffffff1681526020019081526020016000206000848481518110612ac057612ac0614747565b60200260200101516020015161ffff1661ffff1681526020019081526020016000209081612aee9190614511565b50600101612a23565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b674816040516113ba9190614a6a565b600281015161ffff81166003146110245781604051639a6d49cd60e01b8152600401610f6291906139d1565b601354600090819060ff1615612b7c5760405163221fa73960e21b815260040160405180910390fd5b612b878585856121c0565b90925090506000612b9882846143bd565b90508015612bb857601454612bb89088906001600160a01b03168361246e565b63ffffffff8416600090815260106020526040812054612bd9908490614af5565b63ffffffff86166000908152600d6020526040902054909150811215612c1a5760405163088e811160e21b815263ffffffff86166004820152602401610f62565b63ffffffff8516600090815260106020526040902055600e546000198114612c7057612c458361293b565b806011541115612c705760405163160580e560e01b815263ffffffff86166004820152602401610f62565b612c7a88846128b5565b505094509492505050565b612c8d613925565b6000612c9c8460000151613459565b602085015190915015612cb657612cb68460200151613481565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632637a450826040518060a001604052808b63ffffffff168152602001612d068c612258565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401612d429291906149a5565b60806040518083038185885af1158015612d60573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612d859190614b15565b979650505050505050565b6000610e40612d9d61254f565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600080612dcf88888888613563565b925092509250612ddf8282613628565b50909695505050505050565b6001600160a01b038416612e1557600060405163e602df0560e01b8152600401610f629190613b0a565b6001600160a01b038316612e3f576000604051634a1406b160e11b8152600401610f629190613b0a565b6001600160a01b038085166000908152600660209081526040808320938716835292905220829055801561246857826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051612eb291815260200190565b60405180910390a350505050565b60007f0000000000000000000000000000000000000000000000000000000000000000612eed81846143d0565b610e4091906148fe565b6000612f0660208284866146b8565b61100b91614b5f565b6000612f1f6028602084866146b8565b612f2891614b7d565b60c01c9392505050565b6000610e407f00000000000000000000000000000000000000000000000000000000000000006001600160401b0384166148fe565b63ffffffff8116600090815260106020526040812080548491908390612f8e908490614bad565b90915550612f9e9050848461287f565b509092915050565b6060612fb582602881866146b8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929695505050505050565b60608484848460405160200161300a9493929190614bcd565b6040516020818303038152906040529050949350505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561307357602002820191906000526020600020905b81548152602001906001019080831161305f575b50505050509050919050565b6001600160a01b0383166130aa57806007600082825461309f91906143aa565b9091555061311c9050565b6001600160a01b038316600090815260056020526040902054818110156130fd5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610f62565b6001600160a01b03841660009081526005602052604090209082900390555b6001600160a01b03821661313857600780548290039055613157565b6001600160a01b03821660009081526005602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161319c91815260200190565b60405180910390a3505050565b6000610e407f0000000000000000000000000000000000000000000000000000000000000000836143d0565b805160609015158061321e57848460405160200161320a92919091825260c01b6001600160c01b031916602082015260280190565b604051602081830303815290604052613245565b848433856040516020016132359493929190614c1c565b6040516020818303038152906040525b9150935093915050565b600081831061325e578161100b565b5090919050565b60008181526001830160205260408120546132ac57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610e40565b506000610e40565b606060ff83146132ce576132c7836136e1565b9050610e40565b8180546132da90614360565b80601f016020809104026020016040519081016040528092919081815260200182805461330690614360565b80156133535780601f1061332857610100808354040283529160200191613353565b820191906000526020600020905b81548152906001019060200180831161333657829003601f168201915b50505050509050610e40565b600081815260018301602052604081205480156134485760006133836001836143bd565b8554909150600090613397906001906143bd565b90508082146133fc5760008660000182815481106133b7576133b7614747565b90600052602060002001549050808760000184815481106133da576133da614747565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061340d5761340d614c5f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e40565b6000915050610e40565b5092915050565b600081341461347d576040516304fb820960e51b8152346004820152602401610f62565b5090565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135059190614c75565b90506001600160a01b03811661352e576040516329b99a9560e11b815260040160405180910390fd5b6110246001600160a01b038216337f000000000000000000000000000000000000000000000000000000000000000085613720565b600080806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03841115613594575060009150600390508261361e565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156135e8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136145750600092506001915082905061361e565b9250600091508190505b9450945094915050565b600082600381111561363c5761363c614c92565b03613645575050565b600182600381111561365957613659614c92565b036136775760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561368b5761368b614c92565b036136ac5760405163fce698f760e01b815260048101829052602401610f62565b60038260038111156136c0576136c0614c92565b03611024576040516335e2f38360e21b815260048101829052602401610f62565b606060006136ee8361377a565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526124689085906137a2565b600060ff8216601f811115610e4057604051632cd44ac360e21b815260040160405180910390fd5b60006137b76001600160a01b038416836137fc565b905080516000141580156137dc5750808060200190518101906137da9190614988565b155b156121bb5782604051635274afe760e01b8152600401610f629190613b0a565b606061100b8383600084600080856001600160a01b031684866040516138229190614ca8565b60006040518083038185875af1925050503d806000811461385f576040519150601f19603f3d011682016040523d82523d6000602084013e613864565b606091505b509150915061108f8683836060826138845761387f826138c2565b61100b565b815115801561389b57506001600160a01b0384163b155b156138bb5783604051639996b31560e01b8152600401610f629190613b0a565b508061100b565b8051156138d25780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5080546138f790614360565b6000825580601f10613907575050565b601f016020900490600052602060002090810190612175919061396c565b60405180606001604052806000801916815260200160006001600160401b03168152602001613967604051806040016040528060008152602001600081525090565b905290565b5b8082111561347d576000815560010161396d565b60005b8381101561399c578181015183820152602001613984565b50506000910152565b600081518084526139bd816020860160208601613981565b601f01601f19169290920160200192915050565b60208152600061100b60208301846139a5565b6001600160a01b038116811461217557600080fd5b60008060408385031215613a0c57600080fd5b8235613a17816139e4565b946020939093013593505050565b600060e08284031215613a3757600080fd5b50919050565b600060208284031215613a4f57600080fd5b81356001600160401b03811115613a6557600080fd5b61163984828501613a25565b8351815260208085015190820152600060a08201604060a0604085015281865180845260c08601915060c08160051b8701019350602080890160005b83811015613aec5788870360bf19018552815180518852830151838801879052613ad9878901826139a5565b9750509382019390820190600101613aad565b50508751606088015250505060208501516080850152509050611639565b6001600160a01b0391909116815260200190565b600060608284031215613a3757600080fd5b60008083601f840112613b4257600080fd5b5081356001600160401b03811115613b5957600080fd5b602083019150836020828501011115613b7157600080fd5b9250929050565b600080600080600080600060e0888a031215613b9357600080fd5b613b9d8989613b1e565b96506060880135955060808801356001600160401b0380821115613bc057600080fd5b613bcc8b838c01613b30565b909750955060a08a01359150613be1826139e4565b90935060c08901359080821115613bf757600080fd5b50613c048a828b01613b30565b989b979a50959850939692959293505050565b6020808252825182820181905260009190848201906040850190845b81811015612ddf5783516001600160a01b031683529284019291840191600101613c33565b600080600060608486031215613c6d57600080fd5b8335613c78816139e4565b92506020840135613c88816139e4565b929592945050506040919091013590565b803563ffffffff81168114613cad57600080fd5b919050565b60008060408385031215613cc557600080fd5b613a1783613c99565b801515811461217557600080fd5b60008060408385031215613cef57600080fd5b82356001600160401b03811115613d0557600080fd5b613d1185828601613a25565b9250506020830135613d2281613cce565b809150509250929050565b815181526020808301519082015260408101610e40565b600060208284031215613d5657600080fd5b5035919050565b803561ffff81168114613cad57600080fd5b60008060408385031215613d8257600080fd5b613d8b83613c99565b9150613d9960208401613d5d565b90509250929050565b600060208284031215613db457600080fd5b61100b82613c99565b600060208284031215613dcf57600080fd5b813561100b816139e4565b80356001600160801b0381168114613cad57600080fd5b60008060008060608587031215613e0757600080fd5b8435613e12816139e4565b935060208501356001600160401b03811115613e2d57600080fd5b613e3987828801613b30565b9094509250613e4c905060408601613dda565b905092959194509250565b60008060008060a08587031215613e6d57600080fd5b613e778686613b1e565b935060608501356001600160401b03811115613e9257600080fd5b613e9e87828801613b30565b9094509250506080850135613eb2816139e4565b939692955090935050565b60ff60f81b881681526000602060e06020840152613ede60e084018a6139a5565b8381036040850152613ef0818a6139a5565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015613f4457835183529284019291840191600101613f28565b50909c9b505050505050505050505050565b60008060408385031215613f6957600080fd5b8235613f74816139e4565b9150613d9960208401613dda565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715613fba57613fba613f82565b60405290565b604080519081016001600160401b0381118282101715613fba57613fba613f82565b604051601f8201601f191681016001600160401b038111828210171561400a5761400a613f82565b604052919050565b60006001600160401b0382111561402b5761402b613f82565b50601f01601f191660200190565b600061404c61404784614012565b613fe2565b905082815283838301111561406057600080fd5b828260208301376000602084830101529392505050565b60006020828403121561408957600080fd5b81356001600160401b0381111561409f57600080fd5b8201601f810184136140b057600080fd5b61163984823560208401614039565b60008083601f8401126140d157600080fd5b5081356001600160401b038111156140e857600080fd5b6020830191508360208260051b8501011115613b7157600080fd5b6000806020838503121561411657600080fd5b82356001600160401b0381111561412c57600080fd5b614138858286016140bf565b90969095509350505050565b6000806000806060858703121561415a57600080fd5b61416385613c99565b935061417160208601613d5d565b925060408501356001600160401b0381111561418c57600080fd5b61419887828801613b30565b95989497509550505050565b600080600083850360808112156141ba57600080fd5b84356001600160401b038111156141d057600080fd5b6141dc87828801613a25565b9450506040601f19820112156141f157600080fd5b506020840191506060840135614206816139e4565b809150509250925092565b600060c082019050835182526001600160401b036020850151166020830152604084015161424c604084018280518252602090810151910152565b5082516080830152602083015160a083015261100b565b6020815260006001600160801b0380845116602084015280602085015116604084015250604083015160608084015261163960808401826139a5565b600080600080600080600060e0888a0312156142ba57600080fd5b87356142c5816139e4565b965060208801356142d5816139e4565b95506040880135945060608801359350608088013560ff811681146142f957600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561432957600080fd5b8235614334816139e4565b91506020830135613d22816139e4565b60006060828403121561435657600080fd5b61100b8383613b1e565b600181811c9082168061437457607f821691505b602082108103613a3757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610e4057610e40614394565b81810381811115610e4057610e40614394565b6000826143ed57634e487b7160e01b600052601260045260246000fd5b500490565b601f8211156121bb576000816000526020600020601f850160051c8101602086101561441b5750805b601f850160051c820191505b8181101561443a57828155600101614427565b505050505050565b6001600160401b0383111561445957614459613f82565b61446d836144678354614360565b836143f2565b6000601f8411600181146144a157600085156144895750838201355b600019600387901b1c1916600186901b178355611e00565b600083815260209020601f19861690835b828110156144d257868501358255602094850194600190920191016144b2565b50868210156144ef5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8183823760009101908152919050565b81516001600160401b0381111561452a5761452a613f82565b61453e816145388454614360565b846143f2565b602080601f831160018114614573576000841561455b5750858301515b600019600386901b1c1916600185901b17855561443a565b600085815260208120601f198616915b828110156145a257888601518255948401946001909101908401614583565b50858210156145c05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001600160401b03808411156145ea576145ea613f82565b8360051b60206145fb818301613fe2565b86815291850191818101903684111561461357600080fd5b865b848110156146ac5780358681111561462d5760008081fd5b880160603682900312156146415760008081fd5b614649613f98565b61465282613c99565b815261465f868301613d5d565b86820152604080830135898111156146775760008081fd5b929092019136601f84011261468c5760008081fd5b61469a368435898601614039565b90820152845250918301918301614615565b50979650505050505050565b600080858511156146c857600080fd5b838611156146d557600080fd5b5050820193919092039150565b600084516146f4818460208901613981565b8201838582376000930192835250909392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600061163960208301848661470a565b634e487b7160e01b600052603260045260246000fd5b6000823561013e1983360301811261477457600080fd5b9190910192915050565b6000808335601e1984360301811261479557600080fd5b8301803591506001600160401b038211156147af57600080fd5b602001915036819003821315613b7157600080fd5b6001600160401b038116811461217557600080fd5b63ffffffff6147e789613c99565b1681526020880135602082015260006040890135614804816147c4565b6001600160401b03811660408401525087606083015260e0608083015261482f60e08301878961470a565b6001600160a01b03861660a084015282810360c084015261485181858761470a565b9a9950505050505050505050565b60006020828403121561487157600080fd5b81516001600160401b0381111561488757600080fd5b8201601f8101841361489857600080fd5b80516148a661404782614012565b8181528560208385010111156148bb57600080fd5b612876826020830160208601613981565b6000604082840312156148de57600080fd5b6148e6613fc0565b82358152602083013560208201528091505092915050565b8082028115828204841417610e4057610e40614394565b60006020828403121561492757600080fd5b813561100b816147c4565b60018060a01b038516815283602082015261ffff8316604082015260806060820152600061108f60808301846139a5565b60408152600061497660408301856139a5565b828103602084015261287681856139a5565b60006020828403121561499a57600080fd5b815161100b81613cce565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a060808401526149db60e08401826139a5565b90506060850151603f198483030160a08501526149f882826139a5565b60809690960151151560c08501525050506001600160a01b039190911660209091015290565b600060408284031215614a3057600080fd5b614a38613fc0565b9050815181526020820151602082015292915050565b600060408284031215614a6057600080fd5b61100b8383614a1e565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015614ae757888303603f190185528151805163ffffffff1684528781015161ffff16888501528601516060878501819052614ad3818601836139a5565b968901969450505090860190600101614a93565b509098975050505050505050565b818103600083128015838313168383128216171561345257613452614394565b600060808284031215614b2757600080fd5b614b2f613f98565b825181526020830151614b41816147c4565b6020820152614b538460408501614a1e565b60408201529392505050565b80356020831015610e4057600019602084900360031b1b1692915050565b6001600160c01b03198135818116916008851015614ba55780818660080360031b1b83161692505b505092915050565b8082018281126000831280158216821582161715614ba557614ba5614394565b6001600160401b0360c01b8560c01b16815263ffffffff60e01b8460e01b16600882015282600c82015260008251614c0c81602c850160208701613981565b91909101602c0195945050505050565b8481526001600160401b0360c01b8460c01b16602082015282602882015260008251614c4f816048850160208701613981565b9190910160480195945050505050565b634e487b7160e01b600052603160045260246000fd5b600060208284031215614c8757600080fd5b815161100b816139e4565b634e487b7160e01b600052602160045260246000fd5b6000825161477481846020870161398156fea26469706673582212200ec0f8a481d538abce24aa9387564cae45723ee88b590c267bd9c634f08ad3a764736f6c6343000817003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000001a44076050125825900e736c501f859c50fe728c000000000000000000000000c0d3700924301ac384e5eae3272e08220752de3d000000000000000000000000fefcb2fb19b9a70b30646fdc1a0860eb12f7ff8b0000000000000000000000000d1d0f89cb988678b37fd5b5c6c1a5bbdc55f8ba0000000000000000000000000000000000000000000000000000000000000009436f64337820555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066364785553440000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061041b5760003560e01c80637ecebe001161021e578063bb0b6a5311610123578063d46ec0ed116100ab578063de2e31e61161007a578063de2e31e614610d07578063f0f4426014610d3a578063f2fde38b14610d5a578063fc0c546a1461070c578063ff7bd03d14610d7a57600080fd5b8063d46ec0ed14610c84578063d505accf14610cb1578063dd62ed3e14610cd1578063ddca3f4314610cf157600080fd5b8063c777ffa6116100f2578063c777ffa614610bfa578063c7c7f5b314610c10578063ca5eb5e114610c31578063d045a0dc14610c51578063d424388514610c6457600080fd5b8063bb0b6a5314610b7a578063bc70b35414610ba7578063bd815db014610bc7578063c47f002714610bda57600080fd5b80639f68b964116101a6578063aa02f94a11610175578063aa02f94a14610a9a578063af93df5714610afa578063b731ea0a14610b1a578063b84c824614610b3a578063b98bd07014610b5a57600080fd5b80639f68b96414610a31578063a11812ba14610a45578063a82f143c14610a65578063a9059cbb14610a7a57600080fd5b8063857749b0116101ed578063857749b0146109965780638a0dac4a146109aa5780638da5cb5b146109ca57806395d89b41146109e8578063963efcaa146109fd57600080fd5b80637ecebe001461090e5780637fc24def1461092e57806382413eac1461094e57806384b0196e1461096e57600080fd5b80633c96a8c71161032457806369fe0e2d116102ac578063715018a61161027b578063715018a61461087357806377e274001461088857806379a3c6ed146108a85780637d25a05e146108be5780637dd0480f146108f957600080fd5b806369fe0e2d146107ca5780636b5c2963146107ea5780636fc1b31e1461081d57806370a082311461083d57600080fd5b806352ae2879116102f357806352ae28791461070c5780635535d4611461071f5780635a0dfe4d1461073f5780635e280f111461077657806361d027b3146107aa57600080fd5b80633c96a8c71461068757806340c10f19146106a757806342966c68146106c7578063452a9320146106e757600080fd5b80631ec90f2e116103a7578063313ce56711610376578063313ce567146105e95780633400288b1461060b5780633644e5151461062b5780633771e259146106405780633b6f743b1461065a57600080fd5b80631ec90f2e1461057c5780631f5e13341461059e57806323b872dd146105b3578063243f466f146105d357600080fd5b806313137d65116103ee57806313137d65146104d7578063134d4f25146104ec578063156a0d0f1461051457806317442b701461053b57806318160ddd1461055d57600080fd5b806306fdde0314610420578063095ea7b31461044b5780630d35b4151461047b578063111ecdad146104aa575b600080fd5b34801561042c57600080fd5b50610435610d9a565b60405161044291906139d1565b60405180910390f35b34801561045757600080fd5b5061046b6104663660046139f9565b610e2c565b6040519015158152602001610442565b34801561048757600080fd5b5061049b610496366004613a3d565b610e46565b60405161044293929190613a71565b3480156104b657600080fd5b506004546104ca906001600160a01b031681565b6040516104429190613b0a565b6104ea6104e5366004613b78565b610f17565b005b3480156104f857600080fd5b50610501600281565b60405161ffff9091168152602001610442565b34801561052057600080fd5b506040805162b9270b60e21b81526001602082015201610442565b34801561054757600080fd5b5060408051600181526002602082015201610442565b34801561056957600080fd5b506007545b604051908152602001610442565b34801561058857600080fd5b50610591610fdb565b6040516104429190613c17565b3480156105aa57600080fd5b50610501600181565b3480156105bf57600080fd5b5061046b6105ce366004613c58565b610fec565b3480156105df57600080fd5b5061056e60115481565b3480156105f557600080fd5b5060125b60405160ff9091168152602001610442565b34801561061757600080fd5b506104ea610626366004613cb2565b611012565b34801561063757600080fd5b5061056e611028565b34801561064c57600080fd5b5060135461046b9060ff1681565b34801561066657600080fd5b5061067a610675366004613cdc565b611032565b6040516104429190613d2d565b34801561069357600080fd5b506104ea6106a2366004613cb2565b611099565b3480156106b357600080fd5b506104ea6106c23660046139f9565b611119565b3480156106d357600080fd5b506104ea6106e2366004613d44565b6111fb565b3480156106f357600080fd5b506013546104ca9061010090046001600160a01b031681565b34801561071857600080fd5b50306104ca565b34801561072b57600080fd5b5061043561073a366004613d6f565b6112b0565b34801561074b57600080fd5b5061046b61075a366004613cb2565b63ffffffff919091166000908152600160205260409020541490565b34801561078257600080fd5b506104ca7f0000000000000000000000001a44076050125825900e736c501f859c50fe728c81565b3480156107b657600080fd5b506014546104ca906001600160a01b031681565b3480156107d657600080fd5b506104ea6107e5366004613d44565b611355565b3480156107f657600080fd5b5061056e610805366004613da2565b63ffffffff1660009081526010602052604090205490565b34801561082957600080fd5b506104ea610838366004613dbd565b6113c5565b34801561084957600080fd5b5061056e610858366004613dbd565b6001600160a01b031660009081526005602052604090205490565b34801561087f57600080fd5b506104ea611418565b34801561089457600080fd5b506104ea6108a3366004613d44565b61142c565b3480156108b457600080fd5b5061056e600e5481565b3480156108ca57600080fd5b506108e16108d9366004613cb2565b600092915050565b6040516001600160401b039091168152602001610442565b34801561090557600080fd5b506104ea61147c565b34801561091a57600080fd5b5061056e610929366004613dbd565b6114f2565b34801561093a57600080fd5b506104ea610949366004613df1565b611510565b34801561095a57600080fd5b5061046b610969366004613e57565b61162c565b34801561097a57600080fd5b50610983611641565b6040516104429796959493929190613ebd565b3480156109a257600080fd5b5060066105f9565b3480156109b657600080fd5b506104ea6109c5366004613dbd565b611687565b3480156109d657600080fd5b506000546001600160a01b03166104ca565b3480156109f457600080fd5b506104356116df565b348015610a0957600080fd5b5061056e7f000000000000000000000000000000000000000000000000000000e8d4a5100081565b348015610a3d57600080fd5b50600061046b565b348015610a5157600080fd5b506104ea610a60366004613dbd565b6116ee565b348015610a7157600080fd5b506104ea6117f4565b348015610a8657600080fd5b5061046b610a953660046139f9565b611837565b348015610aa657600080fd5b50610ae5610ab5366004613dbd565b6001600160a01b03166000908152601560205260409020546001600160801b0380821692600160801b9092041690565b60408051928352602083019190915201610442565b348015610b0657600080fd5b506104ea610b15366004613f56565b611845565b348015610b2657600080fd5b506002546104ca906001600160a01b031681565b348015610b4657600080fd5b506104ea610b55366004614077565b61190f565b348015610b6657600080fd5b506104ea610b75366004614103565b611923565b348015610b8657600080fd5b5061056e610b95366004613da2565b60016020526000908152604090205481565b348015610bb357600080fd5b50610435610bc2366004614144565b61193d565b6104ea610bd5366004614103565b611ae5565b348015610be657600080fd5b506104ea610bf5366004614077565b611c6f565b348015610c0657600080fd5b5061056e60125481565b610c23610c1e3660046141a4565b611c83565b604051610442929190614211565b348015610c3d57600080fd5b506104ea610c4c366004613dbd565b611d7e565b6104ea610c5f366004613b78565b611e07565b348015610c7057600080fd5b506104ea610c7f366004613dbd565b611e36565b348015610c9057600080fd5b50610ca4610c9f366004613dbd565b611e89565b6040516104429190614263565b348015610cbd57600080fd5b506104ea610ccc36600461429f565b611f82565b348015610cdd57600080fd5b5061056e610cec366004614316565b6120bc565b348015610cfd57600080fd5b5061056e600f5481565b348015610d1357600080fd5b5061056e610d22366004613da2565b63ffffffff166000908152600d602052604090205490565b348015610d4657600080fd5b506104ea610d55366004613dbd565b6120e7565b348015610d6657600080fd5b506104ea610d75366004613dbd565b61213a565b348015610d8657600080fd5b5061046b610d95366004614344565b612178565b606060188054610da990614360565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd590614360565b8015610e225780601f10610df757610100808354040283529160200191610e22565b820191906000526020600020905b815481529060010190602001808311610e0557829003601f168201915b5050505050905090565b600033610e3a8185856121ae565b60019150505b92915050565b60408051808201909152600080825260208201526060610e79604051806040016040528060008152602001600081525090565b60408051808201825260008082526001600160401b03602080840182905284518381529081019094529195509182610ed4565b604080518082019091526000815260606020820152815260200190600190039081610eac5790505b509350600080610ef9604089013560608a0135610ef460208c018c613da2565b6121c0565b60408051808201909152918252602082015296989597505050505050565b7f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b03163314610f6b57336040516391ac5e4f60e01b8152600401610f629190613b0a565b60405180910390fd5b60208701803590610f8590610f80908a613da2565b612258565b14610fc357610f976020880188613da2565b60405163309afaf360e21b815263ffffffff909116600482015260208801356024820152604401610f62565b610fd287878787878787612294565b50505050505050565b6060610fe760166123fb565b905090565b600033610ffa858285612408565b61100585858561246e565b60019150505b9392505050565b61101a6124cd565b61102482826124fa565b5050565b6000610fe761254f565b6040805180820190915260008082526020820152600061106260408501356060860135610ef46020880188613da2565b915050600080611072868461267a565b909250905061108f6110876020880188613da2565b83838861279e565b9695505050505050565b6110a16124cd565b60008113156110c357604051637cc6fe4b60e11b815260040160405180910390fd5b63ffffffff82166000818152600d602052604090819020839055517f99d37cf7f853411320e929295446ce5e8d2d17ef46a59d47edc350999d4e84069061110d9084815260200190565b60405180910390a25050565b8060000361113a576040516303703cb360e01b815260040160405180910390fd5b33600090815260156020526040812080549091600160801b9091046001600160801b03169061116984836143aa565b83549091506001600160801b03168111156111975760405163655fcfd760e01b815260040160405180910390fd5b82546001600160801b03808316600160801b0291161783556111b9858561287f565b604080518381526020810183905233917facb6de9209e4f34974cb165eef5738f0cf0b4ea9819ef30d30f0f7d81272ab82910160405180910390a25050505050565b8060000361121c57604051632ba1b49760e01b815260040160405180910390fd5b33600090815260156020526040812080549091600160801b9091046001600160801b03169061124b84836143bd565b83546001600160801b03808316600160801b029116178455905061126f33856128b5565b604080518381526020810183905233917facb6de9209e4f34974cb165eef5738f0cf0b4ea9819ef30d30f0f7d81272ab82910160405180910390a250505050565b6003602090815260009283526040808420909152908252902080546112d490614360565b80601f016020809104026020016040519081016040528092919081815260200182805461130090614360565b801561134d5780601f106113225761010080835404028352916020019161134d565b820191906000526020600020905b81548152906001019060200180831161133057829003601f168201915b505050505081565b61135d6124cd565b61136a600a6127106143d0565b81111561138a576040516345c242e160e01b815260040160405180910390fd5b600f8190556040518181527e172ddfc5ae88d08b3de01a5a187667c37a5a53989e8c175055cb6c993792a7906020015b60405180910390a150565b6113cd6124cd565b600480546001600160a01b0319166001600160a01b0383161790556040517ff0be4f1e87349231d80c36b33f9e8639658eeaf474014dee15a3e6a4d4414197906113ba908390613b0a565b6114206124cd565b61142a60006128eb565b565b6114346124cd565b80600e541461144757611447600061293b565b600e8190556040518181527f3eca63985afcb12e35f3201792a8e8653305818e44a00d49369a65060e2ea981906020016113ba565b60135461010090046001600160a01b031633146114ac576040516369584d7160e01b815260040160405180910390fd5b6013805460ff191660019081179091556040519081527fc8660cf212026b1de7d608062f14766c193f6df9a00b9899193ee3c6906ca48d906020015b60405180910390a1565b6001600160a01b0381166000908152600c6020526040812054610e40565b6115186124cd565b6001600160a01b038416600090815260156020526040902060018101805461153f90614360565b15905061155f576040516347511baf60e11b815260040160405180910390fd5b600083900361158157604051630454a9db60e11b815260040160405180910390fd5b60018101611590848683614442565b5080546001600160801b0319166001600160801b0383161781556115b560168661299c565b5083836040516020016115c9929190614501565b60408051601f198184030181529082905280516020918201206001600160801b0385168352916001600160a01b038816917fdabd62626ada7b13e299389e94d768b294e5e24285ed2ffa1e5cd447c99c54ad910160405180910390a35050505050565b6001600160a01b03811630145b949350505050565b6000606080600080600060606116556129b1565b61165d6129de565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61168f6124cd565b60138054610100600160a81b0319166101006001600160a01b038416021790556040517f31845eceb9cde510c7e8b37f76301c688feb70bc9653aa4c28a3734999840fd8906113ba908390613b0a565b606060198054610da990614360565b6116f66124cd565b6001600160a01b0381166000908152601560205260409020600101805461171c90614360565b905060000361173e57604051633f602bfd60e21b815260040160405180910390fd5b6001600160a01b038116600090815260156020526040902054600160801b90046001600160801b03161561178557604051631f2b94b360e01b815260040160405180910390fd5b6001600160a01b0381166000908152601560205260408120818155906117ae60018301826138eb565b506117bc9050601682612a0b565b506040516001600160a01b038216907fa8fe5b89f35f2ebd6f3f95a7ef215f4bd89179e10c101073ae76cffad14734cf90600090a250565b6117fc6124cd565b6013805460ff19169055604051600081527fc8660cf212026b1de7d608062f14766c193f6df9a00b9899193ee3c6906ca48d906020016114e8565b600033610e3a81858561246e565b61184d6124cd565b6001600160a01b0382166000908152601560205260409020600101805461187390614360565b905060000361189557604051633f602bfd60e21b815260040160405180910390fd5b6001600160a01b03821660008181526015602090815260409182902080546001600160801b031981166001600160801b03878116918217909355845192909116808352928201529092917fc795c0a4927c3b6645e4e49a5a519af936b3c1c0e4c323a3f7251063f3f4bb0e910160405180910390a2505050565b6119176124cd565b60196110248282614511565b61192b6124cd565b61102461193882846145d0565b612a20565b63ffffffff8416600090815260036020908152604080832061ffff8716845290915281208054606092919061197190614360565b80601f016020809104026020016040519081016040528092919081815260200182805461199d90614360565b80156119ea5780601f106119bf576101008083540402835291602001916119ea565b820191906000526020600020905b8154815290600101906020018083116119cd57829003601f168201915b505050505090508051600003611a3a5783838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509294506116399350505050565b6000839003611a4a579050611639565b60028310611ac857611a9184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612b2792505050565b80611a9f84600281886146b8565b604051602001611ab1939291906146e2565b604051602081830303815290604052915050611639565b8383604051639a6d49cd60e01b8152600401610f62929190614733565b60005b81811015611bee5736838383818110611b0357611b03614747565b9050602002810190611b15919061475d565b9050611b48611b276020830183613da2565b602083013563ffffffff919091166000908152600160205260409020541490565b611b525750611be6565b3063d045a0dc60c08301358360a0810135611b7161010083018361477e565b611b82610100890160e08a01613dbd565b611b906101208a018a61477e565b6040518963ffffffff1660e01b8152600401611bb297969594939291906147d9565b6000604051808303818588803b158015611bcb57600080fd5b505af1158015611bdf573d6000803e3d6000fd5b5050505050505b600101611ae8565b50336001600160a01b0316638e9e70996040518163ffffffff1660e01b8152600401600060405180830381865afa158015611c2d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c55919081019061485f565b604051638351eea760e01b8152600401610f6291906139d1565b611c776124cd565b60186110248282614511565b611c8b613925565b6040805180820190915260008082526020820152600080611cc233604089013560608a0135611cbd60208c018c613da2565b612b53565b91509150600080611cd3898461267a565b9092509050611cff611ce860208b018b613da2565b8383611cf9368d90038d018d6148cc565b8b612c85565b60408051808201909152858152602080820186905282519298509096503391907f85496b760a4b7f8d66384b9df21b381f5d1b1e79f229a47aaf4c232edc2fe59a90611d4d908d018d613da2565b6040805163ffffffff909216825260208201899052810187905260600160405180910390a350505050935093915050565b611d866124cd565b60405163ca5eb5e160e01b81526001600160a01b037f0000000000000000000000001a44076050125825900e736c501f859c50fe728c169063ca5eb5e190611dd2908490600401613b0a565b600060405180830381600087803b158015611dec57600080fd5b505af1158015611e00573d6000803e3d6000fd5b5050505050565b333014611e275760405163029a949d60e31b815260040160405180910390fd5b610fd287878787878787610fc3565b611e3e6124cd565b600280546001600160a01b0319166001600160a01b0383161790556040517fd48d879cef83a1c0bdda516f27b13ddb1b3f8bbac1c9e1511bb2a659c2427760906113ba908390613b0a565b6040805160608082018352600080835260208084018290528385018390526001600160a01b038616825260158152908490208451928301855280546001600160801b038082168552600160801b9091041691830191909152600181018054939492939192840191611ef990614360565b80601f0160208091040260200160405190810160405280929190818152602001828054611f2590614360565b8015611f725780601f10611f4757610100808354040283529160200191611f72565b820191906000526020600020905b815481529060010190602001808311611f5557829003601f168201915b5050505050815250509050919050565b83421115611fa65760405163313c898160e11b815260048101859052602401610f62565b60007f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888611ff38c6001600160a01b03166000908152600c6020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061204e82612d90565b9050600061205e82878787612dbd565b9050896001600160a01b0316816001600160a01b0316146120a5576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610f62565b6120b08a8a8a6121ae565b50505050505050505050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6120ef6124cd565b601480546001600160a01b0319166001600160a01b0383161790556040517fcb7ef3e545f5cdb893f5c568ba710fe08f336375a2d9fd66e161033f8fc09ef3906113ba908390613b0a565b6121426124cd565b6001600160a01b03811661216c576000604051631e4fbdf760e01b8152600401610f629190613b0a565b612175816128eb565b50565b60006020820180359060019083906121909086613da2565b63ffffffff1681526020810191909152604001600020541492915050565b6121bb8383836001612deb565b505050565b6000806121cc85612ec0565b600f5490925080158015906121eb57506014546001600160a01b031615155b156122205761221961271061220083866148fe565b61220a91906143d0565b61221490856143bd565b612ec0565b9150612224565b8291505b8482101561224f576040516371c4efed60e01b81526004810183905260248101869052604401610f62565b50935093915050565b63ffffffff811660009081526001602052604081205480610e405760405163f6ff4fb760e01b815263ffffffff84166004820152602401610f62565b60006122a66122a38787612ef7565b90565b905060006122d2826122c06122bb8a8a612f0f565b612f32565b6122cd60208d018d613da2565b612f67565b9050602886111561239957600061230f6122f260608c0160408d01614915565b6122ff60208d018d613da2565b8461230a8c8c612fa6565b612ff1565b604051633e5ac80960e11b81529091506001600160a01b037f0000000000000000000000001a44076050125825900e736c501f859c50fe728c1690637cb59012906123659086908d906000908790600401614932565b600060405180830381600087803b15801561237f57600080fd5b505af1158015612393573d6000803e3d6000fd5b50505050505b6001600160a01b038216887fefed6d3500546b29533b128a29e3a94d70788727f0507505ac12eaf2e578fd9c6123d260208d018d613da2565b6040805163ffffffff9092168252602082018690520160405180910390a3505050505050505050565b6060600061100b83613023565b600061241484846120bc565b90506000198114612468578181101561245957604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610f62565b61246884848484036000612deb565b50505050565b6001600160a01b038316612498576000604051634b637e8f60e11b8152600401610f629190613b0a565b6001600160a01b0382166124c257600060405163ec442f0560e01b8152600401610f629190613b0a565b6121bb83838361307f565b6000546001600160a01b0316331461142a573360405163118cdaa760e01b8152600401610f629190613b0a565b63ffffffff8216600081815260016020908152604091829020849055815192835282018390527f238399d427b947898edb290f5ff0f9109849b1c3ba196a42e35f00c50a54b98b910160405180910390a15050565b6000306001600160a01b037f000000000000000000000000c0d3700000987c99b3c9009069e4f8413fd22330161480156125a857507f000000000000000000000000000000000000000000000000000000000000210546145b156125d257507fb97e97ec3842baf151e1e00f605d3bccd2a3be71dd3f614f2653882d239cbe6590565b610fe7604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fdf5f1a7911865305a6c6bb1fc0bdaad880545d9e47b548f3c8ab33a9fe9892b0918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60608060006126d78560200135612690866131a9565b61269d60a089018961477e565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506131d592505050565b90935090506000816126ea5760016126ed565b60025b905061270d6126ff6020880188613da2565b82610bc260808a018a61477e565b6004549093506001600160a01b031615612795576004805460405163043a78eb60e01b81526001600160a01b039091169163043a78eb91612752918891889101614963565b602060405180830381865afa15801561276f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127939190614988565b505b50509250929050565b60408051808201909152600080825260208201527f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b031663ddc28c586040518060a001604052808863ffffffff16815260200161280189612258565b8152602001878152602001868152602001851515815250306040518363ffffffff1660e01b81526004016128369291906149a5565b6040805180830381865afa158015612852573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128769190614a4e565b95945050505050565b6001600160a01b0382166128a957600060405163ec442f0560e01b8152600401610f629190613b0a565b6110246000838361307f565b6001600160a01b0382166128df576000604051634b637e8f60e11b8152600401610f629190613b0a565b6110248260008361307f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006012544261294b91906143bd565b90506000610e10600e548361296091906148fe565b61296a91906143d0565b6011549091508361297b838361324f565b61298590836143bd565b61298f91906143aa565b6011555050426012555050565b600061100b836001600160a01b038416613265565b6060610fe77f436f643378205553440000000000000000000000000000000000000000000009600a6132b4565b6060610fe77f3100000000000000000000000000000000000000000000000000000000000001600b6132b4565b600061100b836001600160a01b03841661335f565b60005b8151811015612af757612a52828281518110612a4157612a41614747565b602002602001015160400151612b27565b818181518110612a6457612a64614747565b60200260200101516040015160036000848481518110612a8657612a86614747565b60200260200101516000015163ffffffff1663ffffffff1681526020019081526020016000206000848481518110612ac057612ac0614747565b60200260200101516020015161ffff1661ffff1681526020019081526020016000209081612aee9190614511565b50600101612a23565b507fbe4864a8e820971c0247f5992e2da559595f7bf076a21cb5928d443d2a13b674816040516113ba9190614a6a565b600281015161ffff81166003146110245781604051639a6d49cd60e01b8152600401610f6291906139d1565b601354600090819060ff1615612b7c5760405163221fa73960e21b815260040160405180910390fd5b612b878585856121c0565b90925090506000612b9882846143bd565b90508015612bb857601454612bb89088906001600160a01b03168361246e565b63ffffffff8416600090815260106020526040812054612bd9908490614af5565b63ffffffff86166000908152600d6020526040902054909150811215612c1a5760405163088e811160e21b815263ffffffff86166004820152602401610f62565b63ffffffff8516600090815260106020526040902055600e546000198114612c7057612c458361293b565b806011541115612c705760405163160580e560e01b815263ffffffff86166004820152602401610f62565b612c7a88846128b5565b505094509492505050565b612c8d613925565b6000612c9c8460000151613459565b602085015190915015612cb657612cb68460200151613481565b7f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b0316632637a450826040518060a001604052808b63ffffffff168152602001612d068c612258565b81526020018a815260200189815260200160008960200151111515815250866040518463ffffffff1660e01b8152600401612d429291906149a5565b60806040518083038185885af1158015612d60573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612d859190614b15565b979650505050505050565b6000610e40612d9d61254f565b8360405161190160f01b8152600281019290925260228201526042902090565b600080600080612dcf88888888613563565b925092509250612ddf8282613628565b50909695505050505050565b6001600160a01b038416612e1557600060405163e602df0560e01b8152600401610f629190613b0a565b6001600160a01b038316612e3f576000604051634a1406b160e11b8152600401610f629190613b0a565b6001600160a01b038085166000908152600660209081526040808320938716835292905220829055801561246857826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051612eb291815260200190565b60405180910390a350505050565b60007f000000000000000000000000000000000000000000000000000000e8d4a51000612eed81846143d0565b610e4091906148fe565b6000612f0660208284866146b8565b61100b91614b5f565b6000612f1f6028602084866146b8565b612f2891614b7d565b60c01c9392505050565b6000610e407f000000000000000000000000000000000000000000000000000000e8d4a510006001600160401b0384166148fe565b63ffffffff8116600090815260106020526040812080548491908390612f8e908490614bad565b90915550612f9e9050848461287f565b509092915050565b6060612fb582602881866146b8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929695505050505050565b60608484848460405160200161300a9493929190614bcd565b6040516020818303038152906040529050949350505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561307357602002820191906000526020600020905b81548152602001906001019080831161305f575b50505050509050919050565b6001600160a01b0383166130aa57806007600082825461309f91906143aa565b9091555061311c9050565b6001600160a01b038316600090815260056020526040902054818110156130fd5760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610f62565b6001600160a01b03841660009081526005602052604090209082900390555b6001600160a01b03821661313857600780548290039055613157565b6001600160a01b03821660009081526005602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161319c91815260200190565b60405180910390a3505050565b6000610e407f000000000000000000000000000000000000000000000000000000e8d4a51000836143d0565b805160609015158061321e57848460405160200161320a92919091825260c01b6001600160c01b031916602082015260280190565b604051602081830303815290604052613245565b848433856040516020016132359493929190614c1c565b6040516020818303038152906040525b9150935093915050565b600081831061325e578161100b565b5090919050565b60008181526001830160205260408120546132ac57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610e40565b506000610e40565b606060ff83146132ce576132c7836136e1565b9050610e40565b8180546132da90614360565b80601f016020809104026020016040519081016040528092919081815260200182805461330690614360565b80156133535780601f1061332857610100808354040283529160200191613353565b820191906000526020600020905b81548152906001019060200180831161333657829003601f168201915b50505050509050610e40565b600081815260018301602052604081205480156134485760006133836001836143bd565b8554909150600090613397906001906143bd565b90508082146133fc5760008660000182815481106133b7576133b7614747565b90600052602060002001549050808760000184815481106133da576133da614747565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061340d5761340d614c5f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e40565b6000915050610e40565b5092915050565b600081341461347d576040516304fb820960e51b8152346004820152602401610f62565b5090565b60007f0000000000000000000000001a44076050125825900e736c501f859c50fe728c6001600160a01b031663e4fe1d946040518163ffffffff1660e01b8152600401602060405180830381865afa1580156134e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135059190614c75565b90506001600160a01b03811661352e576040516329b99a9560e11b815260040160405180910390fd5b6110246001600160a01b038216337f0000000000000000000000001a44076050125825900e736c501f859c50fe728c85613720565b600080806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03841115613594575060009150600390508261361e565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa1580156135e8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136145750600092506001915082905061361e565b9250600091508190505b9450945094915050565b600082600381111561363c5761363c614c92565b03613645575050565b600182600381111561365957613659614c92565b036136775760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561368b5761368b614c92565b036136ac5760405163fce698f760e01b815260048101829052602401610f62565b60038260038111156136c0576136c0614c92565b03611024576040516335e2f38360e21b815260048101829052602401610f62565b606060006136ee8361377a565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526124689085906137a2565b600060ff8216601f811115610e4057604051632cd44ac360e21b815260040160405180910390fd5b60006137b76001600160a01b038416836137fc565b905080516000141580156137dc5750808060200190518101906137da9190614988565b155b156121bb5782604051635274afe760e01b8152600401610f629190613b0a565b606061100b8383600084600080856001600160a01b031684866040516138229190614ca8565b60006040518083038185875af1925050503d806000811461385f576040519150601f19603f3d011682016040523d82523d6000602084013e613864565b606091505b509150915061108f8683836060826138845761387f826138c2565b61100b565b815115801561389b57506001600160a01b0384163b155b156138bb5783604051639996b31560e01b8152600401610f629190613b0a565b508061100b565b8051156138d25780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5080546138f790614360565b6000825580601f10613907575050565b601f016020900490600052602060002090810190612175919061396c565b60405180606001604052806000801916815260200160006001600160401b03168152602001613967604051806040016040528060008152602001600081525090565b905290565b5b8082111561347d576000815560010161396d565b60005b8381101561399c578181015183820152602001613984565b50506000910152565b600081518084526139bd816020860160208601613981565b601f01601f19169290920160200192915050565b60208152600061100b60208301846139a5565b6001600160a01b038116811461217557600080fd5b60008060408385031215613a0c57600080fd5b8235613a17816139e4565b946020939093013593505050565b600060e08284031215613a3757600080fd5b50919050565b600060208284031215613a4f57600080fd5b81356001600160401b03811115613a6557600080fd5b61163984828501613a25565b8351815260208085015190820152600060a08201604060a0604085015281865180845260c08601915060c08160051b8701019350602080890160005b83811015613aec5788870360bf19018552815180518852830151838801879052613ad9878901826139a5565b9750509382019390820190600101613aad565b50508751606088015250505060208501516080850152509050611639565b6001600160a01b0391909116815260200190565b600060608284031215613a3757600080fd5b60008083601f840112613b4257600080fd5b5081356001600160401b03811115613b5957600080fd5b602083019150836020828501011115613b7157600080fd5b9250929050565b600080600080600080600060e0888a031215613b9357600080fd5b613b9d8989613b1e565b96506060880135955060808801356001600160401b0380821115613bc057600080fd5b613bcc8b838c01613b30565b909750955060a08a01359150613be1826139e4565b90935060c08901359080821115613bf757600080fd5b50613c048a828b01613b30565b989b979a50959850939692959293505050565b6020808252825182820181905260009190848201906040850190845b81811015612ddf5783516001600160a01b031683529284019291840191600101613c33565b600080600060608486031215613c6d57600080fd5b8335613c78816139e4565b92506020840135613c88816139e4565b929592945050506040919091013590565b803563ffffffff81168114613cad57600080fd5b919050565b60008060408385031215613cc557600080fd5b613a1783613c99565b801515811461217557600080fd5b60008060408385031215613cef57600080fd5b82356001600160401b03811115613d0557600080fd5b613d1185828601613a25565b9250506020830135613d2281613cce565b809150509250929050565b815181526020808301519082015260408101610e40565b600060208284031215613d5657600080fd5b5035919050565b803561ffff81168114613cad57600080fd5b60008060408385031215613d8257600080fd5b613d8b83613c99565b9150613d9960208401613d5d565b90509250929050565b600060208284031215613db457600080fd5b61100b82613c99565b600060208284031215613dcf57600080fd5b813561100b816139e4565b80356001600160801b0381168114613cad57600080fd5b60008060008060608587031215613e0757600080fd5b8435613e12816139e4565b935060208501356001600160401b03811115613e2d57600080fd5b613e3987828801613b30565b9094509250613e4c905060408601613dda565b905092959194509250565b60008060008060a08587031215613e6d57600080fd5b613e778686613b1e565b935060608501356001600160401b03811115613e9257600080fd5b613e9e87828801613b30565b9094509250506080850135613eb2816139e4565b939692955090935050565b60ff60f81b881681526000602060e06020840152613ede60e084018a6139a5565b8381036040850152613ef0818a6139a5565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015613f4457835183529284019291840191600101613f28565b50909c9b505050505050505050505050565b60008060408385031215613f6957600080fd5b8235613f74816139e4565b9150613d9960208401613dda565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715613fba57613fba613f82565b60405290565b604080519081016001600160401b0381118282101715613fba57613fba613f82565b604051601f8201601f191681016001600160401b038111828210171561400a5761400a613f82565b604052919050565b60006001600160401b0382111561402b5761402b613f82565b50601f01601f191660200190565b600061404c61404784614012565b613fe2565b905082815283838301111561406057600080fd5b828260208301376000602084830101529392505050565b60006020828403121561408957600080fd5b81356001600160401b0381111561409f57600080fd5b8201601f810184136140b057600080fd5b61163984823560208401614039565b60008083601f8401126140d157600080fd5b5081356001600160401b038111156140e857600080fd5b6020830191508360208260051b8501011115613b7157600080fd5b6000806020838503121561411657600080fd5b82356001600160401b0381111561412c57600080fd5b614138858286016140bf565b90969095509350505050565b6000806000806060858703121561415a57600080fd5b61416385613c99565b935061417160208601613d5d565b925060408501356001600160401b0381111561418c57600080fd5b61419887828801613b30565b95989497509550505050565b600080600083850360808112156141ba57600080fd5b84356001600160401b038111156141d057600080fd5b6141dc87828801613a25565b9450506040601f19820112156141f157600080fd5b506020840191506060840135614206816139e4565b809150509250925092565b600060c082019050835182526001600160401b036020850151166020830152604084015161424c604084018280518252602090810151910152565b5082516080830152602083015160a083015261100b565b6020815260006001600160801b0380845116602084015280602085015116604084015250604083015160608084015261163960808401826139a5565b600080600080600080600060e0888a0312156142ba57600080fd5b87356142c5816139e4565b965060208801356142d5816139e4565b95506040880135945060608801359350608088013560ff811681146142f957600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561432957600080fd5b8235614334816139e4565b91506020830135613d22816139e4565b60006060828403121561435657600080fd5b61100b8383613b1e565b600181811c9082168061437457607f821691505b602082108103613a3757634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820180821115610e4057610e40614394565b81810381811115610e4057610e40614394565b6000826143ed57634e487b7160e01b600052601260045260246000fd5b500490565b601f8211156121bb576000816000526020600020601f850160051c8101602086101561441b5750805b601f850160051c820191505b8181101561443a57828155600101614427565b505050505050565b6001600160401b0383111561445957614459613f82565b61446d836144678354614360565b836143f2565b6000601f8411600181146144a157600085156144895750838201355b600019600387901b1c1916600186901b178355611e00565b600083815260209020601f19861690835b828110156144d257868501358255602094850194600190920191016144b2565b50868210156144ef5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8183823760009101908152919050565b81516001600160401b0381111561452a5761452a613f82565b61453e816145388454614360565b846143f2565b602080601f831160018114614573576000841561455b5750858301515b600019600386901b1c1916600185901b17855561443a565b600085815260208120601f198616915b828110156145a257888601518255948401946001909101908401614583565b50858210156145c05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001600160401b03808411156145ea576145ea613f82565b8360051b60206145fb818301613fe2565b86815291850191818101903684111561461357600080fd5b865b848110156146ac5780358681111561462d5760008081fd5b880160603682900312156146415760008081fd5b614649613f98565b61465282613c99565b815261465f868301613d5d565b86820152604080830135898111156146775760008081fd5b929092019136601f84011261468c5760008081fd5b61469a368435898601614039565b90820152845250918301918301614615565b50979650505050505050565b600080858511156146c857600080fd5b838611156146d557600080fd5b5050820193919092039150565b600084516146f4818460208901613981565b8201838582376000930192835250909392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600061163960208301848661470a565b634e487b7160e01b600052603260045260246000fd5b6000823561013e1983360301811261477457600080fd5b9190910192915050565b6000808335601e1984360301811261479557600080fd5b8301803591506001600160401b038211156147af57600080fd5b602001915036819003821315613b7157600080fd5b6001600160401b038116811461217557600080fd5b63ffffffff6147e789613c99565b1681526020880135602082015260006040890135614804816147c4565b6001600160401b03811660408401525087606083015260e0608083015261482f60e08301878961470a565b6001600160a01b03861660a084015282810360c084015261485181858761470a565b9a9950505050505050505050565b60006020828403121561487157600080fd5b81516001600160401b0381111561488757600080fd5b8201601f8101841361489857600080fd5b80516148a661404782614012565b8181528560208385010111156148bb57600080fd5b612876826020830160208601613981565b6000604082840312156148de57600080fd5b6148e6613fc0565b82358152602083013560208201528091505092915050565b8082028115828204841417610e4057610e40614394565b60006020828403121561492757600080fd5b813561100b816147c4565b60018060a01b038516815283602082015261ffff8316604082015260806060820152600061108f60808301846139a5565b60408152600061497660408301856139a5565b828103602084015261287681856139a5565b60006020828403121561499a57600080fd5b815161100b81613cce565b6040815263ffffffff8351166040820152602083015160608201526000604084015160a060808401526149db60e08401826139a5565b90506060850151603f198483030160a08501526149f882826139a5565b60809690960151151560c08501525050506001600160a01b039190911660209091015290565b600060408284031215614a3057600080fd5b614a38613fc0565b9050815181526020820151602082015292915050565b600060408284031215614a6057600080fd5b61100b8383614a1e565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b83811015614ae757888303603f190185528151805163ffffffff1684528781015161ffff16888501528601516060878501819052614ad3818601836139a5565b968901969450505090860190600101614a93565b509098975050505050505050565b818103600083128015838313168383128216171561345257613452614394565b600060808284031215614b2757600080fd5b614b2f613f98565b825181526020830151614b41816147c4565b6020820152614b538460408501614a1e565b60408201529392505050565b80356020831015610e4057600019602084900360031b1b1692915050565b6001600160c01b03198135818116916008851015614ba55780818660080360031b1b83161692505b505092915050565b8082018281126000831280158216821582161715614ba557614ba5614394565b6001600160401b0360c01b8560c01b16815263ffffffff60e01b8460e01b16600882015282600c82015260008251614c0c81602c850160208701613981565b91909101602c0195945050505050565b8481526001600160401b0360c01b8460c01b16602082015282602882015260008251614c4f816048850160208701613981565b9190910160480195945050505050565b634e487b7160e01b600052603160045260246000fd5b600060208284031215614c8757600080fd5b815161100b816139e4565b634e487b7160e01b600052602160045260246000fd5b6000825161477481846020870161398156fea26469706673582212200ec0f8a481d538abce24aa9387564cae45723ee88b590c267bd9c634f08ad3a764736f6c63430008170033

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

00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000001a44076050125825900e736c501f859c50fe728c000000000000000000000000c0d3700924301ac384e5eae3272e08220752de3d000000000000000000000000fefcb2fb19b9a70b30646fdc1a0860eb12f7ff8b0000000000000000000000000d1d0f89cb988678b37fd5b5c6c1a5bbdc55f8ba0000000000000000000000000000000000000000000000000000000000000009436f64337820555344000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066364785553440000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Cod3x USD
Arg [1] : _symbol (string): cdxUSD
Arg [2] : _lzEndpoint (address): 0x1a44076050125825900e736c501f859c50fE728c
Arg [3] : _delegate (address): 0xc0D3700924301AC384E5Eae3272E08220752DE3D
Arg [4] : _treasury (address): 0xfEfcb2fb19b9A70B30646Fdc1A0860Eb12F7ff8b
Arg [5] : _guardian (address): 0x0D1d0f89cb988678B37FD5b5c6C1A5bBdc55f8ba

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000001a44076050125825900e736c501f859c50fe728c
Arg [3] : 000000000000000000000000c0d3700924301ac384e5eae3272e08220752de3d
Arg [4] : 000000000000000000000000fefcb2fb19b9a70b30646fdc1a0860eb12f7ff8b
Arg [5] : 0000000000000000000000000d1d0f89cb988678b37fd5b5c6c1a5bbdc55f8ba
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [7] : 436f643378205553440000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 6364785553440000000000000000000000000000000000000000000000000000


Deployed Bytecode Sourcemap

404:6768:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5835:91;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4293:186:34;;;;;;;;;;-1:-1:-1;4293:186:34;;;;;:::i;:::-;;:::i;:::-;;;1391:14:53;;1384:22;1366:41;;1354:2;1339:18;4293:186:34;1226:187:53;4928:1258:13;;;;;;;;;;-1:-1:-1;4928:1258:13;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;:::i;2132:27::-;;;;;;;;;;-1:-1:-1;2132:27:13;;;;-1:-1:-1;;;;;2132:27:13;;;;;;;;;;:::i;4368:708:6:-;;;;;;:::i;:::-;;:::i;:::-;;2006:40:13;;;;;;;;;;;;2045:1;2006:40;;;;;5387:6:53;5375:19;;;5357:38;;5345:2;5330:18;2006:40:13;5213:188:53;3277:140:13;;;;;;;;;;-1:-1:-1;3277:140:13;;;-1:-1:-1;;;5576:52:53;;3408:1:13;5659:2:53;5644:18;;5637:59;5549:18;3277:140:13;5406:296:53;1287:235:4;;;;;;;;;;-1:-1:-1;1287:235:4;;;843:1:7;5914:34:53;;678:1:6;5979:2:53;5964:18;;5957:43;5850:18;1287:235:4;5707:299:53;3144:97:34;;;;;;;;;;-1:-1:-1;3222:12:34;;3144:97;;;6157:25:53;;;6145:2;6130:18;3144:97:34;6011:177:53;7049:121:2;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;1969:31:13:-;;;;;;;;;;;;1999:1;1969:31;;5039:244:34;;;;;;;;;;-1:-1:-1;5039:244:34;;;;;:::i;:::-;;:::i;1680:44:3:-;;;;;;;;;;;;;;;;3002:82:34;;;;;;;;;;-1:-1:-1;3075:2:34;3002:82;;;7489:4:53;7477:17;;;7459:36;;7447:2;7432:18;3002:82:34;7317:184:53;1724:108:5;;;;;;;;;;-1:-1:-1;1724:108:5;;;;;:::i;:::-;;:::i;2656:112:36:-;;;;;;;;;;;;;:::i;1896:19:3:-;;;;;;;;;;-1:-1:-1;1896:19:3;;;;;;;;6637:774:13;;;;;;;;;;-1:-1:-1;6637:774:13;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;3791:440:3:-;;;;;;;;;;-1:-1:-1;3791:440:3;;;;;:::i;:::-;;:::i;1334:613:2:-;;;;;;;;;;-1:-1:-1;1334:613:2;;;;;:::i;:::-;;:::i;2210:470::-;;;;;;;;;;-1:-1:-1;2210:470:2;;;;;:::i;:::-;;:::i;1977:23:3:-;;;;;;;;;;-1:-1:-1;1977:23:3;;;;;;;-1:-1:-1;;;;;1977:23:3;;;875:93:17;;;;;;;;;;-1:-1:-1;956:4:17;875:93;;538::12;;;;;;;;;;-1:-1:-1;538:93:12;;;;;:::i;:::-;;:::i;14792:132:13:-;;;;;;;;;;-1:-1:-1;14792:132:13;;;;;:::i;:::-;14897:11;;;;;14874:4;14897:11;;;:5;:11;;;;;;:20;;14792:132;446:46:5;;;;;;;;;;;;;;;2059:23:3;;;;;;;;;;-1:-1:-1;2059:23:3;;;;-1:-1:-1;;;;;2059:23:3;;;4869:169;;;;;;;;;;-1:-1:-1;4869:169:3;;;;;:::i;:::-;;:::i;3266:134::-;;;;;;;;;;-1:-1:-1;3266:134:3;;;;;:::i;:::-;3361:32;;3336:6;3361:32;;;:23;:32;;;;;;;3266:134;4459:163:13;;;;;;;;;;-1:-1:-1;4459:163:13;;;;;:::i;:::-;;:::i;3299:116:34:-;;;;;;;;;;-1:-1:-1;3299:116:34;;;;;:::i;:::-;-1:-1:-1;;;;;3390:18:34;3364:7;3390:18;;;:9;:18;;;;;;;3299:116;2293:101:31;;;;;;;;;;;;;:::i;4483:241:3:-;;;;;;;;;;-1:-1:-1;4483:241:3;;;;;:::i;:::-;;:::i;1119:26::-;;;;;;;;;;;;;;;;3507:128:6;;;;;;;;;;-1:-1:-1;3507:128:6;;;;;:::i;:::-;3596:12;3507:128;;;;;;;;-1:-1:-1;;;;;11101:31:53;;;11083:50;;11071:2;11056:18;3507:128:6;10939:200:53;5655:114:3;;;;;;;;;;;;;:::i;2406:143:36:-;;;;;;;;;;-1:-1:-1;2406:143:36;;;;;:::i;:::-;;:::i;3115:718:2:-;;;;;;;;;;-1:-1:-1;3115:718:2;;;;;:::i;:::-;;:::i;2013:216:6:-;;;;;;;;;;-1:-1:-1;2013:216:6;;;;;:::i;:::-;;:::i;5144:557:47:-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;:::i;4024:87:13:-;;;;;;;;;;-1:-1:-1;4103:1:13;4024:87;;5417:133:3;;;;;;;;;;-1:-1:-1;5417:133:3;;;;;:::i;:::-;;:::i;1638:85:31:-;;;;;;;;;;-1:-1:-1;1684:7:31;1710:6;-1:-1:-1;;;;;1710:6:31;1638:85;;6039:95:2;;;;;;;;;;;;;:::i;1663:46:13:-;;;;;;;;;;;;;;;6693:94:3;;;;;;;;;;-1:-1:-1;6752:4:3;6693:94;;4082:523:2;;;;;;;;;;-1:-1:-1;4082:523:2;;;;;:::i;:::-;;:::i;5873:115:3:-;;;;;;;;;;;;;:::i;3610:178:34:-;;;;;;;;;;-1:-1:-1;3610:178:34;;;;;:::i;:::-;;:::i;6698:200:2:-;;;;;;;;;;-1:-1:-1;6698:200:2;;;;;:::i;:::-;-1:-1:-1;;;;;6809:26:2;6773:7;6809:26;;;:12;:26;;;;;:41;-1:-1:-1;;;;;6809:41:2;;;;-1:-1:-1;;;6852:38:2;;;;;6698:200;;;;;14074:25:53;;;14130:2;14115:18;;14108:34;;;;14047:18;6698:200:2;13900:248:53;4883:493:2;;;;;;;;;;-1:-1:-1;4883:493:2;;;;;:::i;:::-;;:::i;559:23:17:-;;;;;;;;;;-1:-1:-1;559:23:17;;;;-1:-1:-1;;;;;559:23:17;;;5674:96:2;;;;;;;;;;-1:-1:-1;5674:96:2;;;;;:::i;:::-;;:::i;1391:156:12:-;;;;;;;;;;-1:-1:-1;1391:156:12;;;;;:::i;:::-;;:::i;569:48:5:-;;;;;;;;;;-1:-1:-1;569:48:5;;;;;:::i;:::-;;;;;;;;;;;;;;3510:981:12;;;;;;;;;;-1:-1:-1;3510:981:12;;;;;:::i;:::-;;:::i;1698:1333:17:-;;;;;;:::i;:::-;;:::i;5479:88:2:-;;;;;;;;;;-1:-1:-1;5479:88:2;;;;;:::i;:::-;;:::i;1790:32:3:-;;;;;;;;;;;;;;;;8099:1340:13;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;3252:105:5:-;;;;;;;;;;-1:-1:-1;3252:105:5;;;;;:::i;:::-;;:::i;3679:409:17:-;;;;;;:::i;:::-;;:::i;1100:139::-;;;;;;;;;;-1:-1:-1;1100:139:17;;;;;:::i;:::-;;:::i;6303::2:-;;;;;;;;;;-1:-1:-1;6303:139:2;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1680:672:36:-;;;;;;;;;;-1:-1:-1;1680:672:36;;;;;:::i;:::-;;:::i;3846:140:34:-;;;;;;;;;;-1:-1:-1;3846:140:34;;;;;:::i;:::-;;:::i;1225:18:3:-;;;;;;;;;;;;;;;;3135:125;;;;;;;;;;-1:-1:-1;3135:125:3;;;;;:::i;:::-;3224:29;;3199:6;3224:29;;;:20;:29;;;;;;;3135:125;5183:133;;;;;;;;;;-1:-1:-1;5183:133:3;;;;;:::i;:::-;;:::i;2543:215:31:-;;;;;;;;;;-1:-1:-1;2543:215:31;;;;;:::i;:::-;;:::i;2771:149:6:-;;;;;;;;;;-1:-1:-1;2771:149:6;;;;;:::i;:::-;;:::i;5835:91:2:-;5881:13;5913:6;5906:13;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5835:91;:::o;4293:186:34:-;4366:4;735:10:41;4420:31:34;735:10:41;4436:7:34;4445:5;4420:8;:31::i;:::-;4468:4;4461:11;;;4293:186;;;;;:::o;4928:1258:13:-;-1:-1:-1;;;;;;;;;;;;;;;;;5080:35:13;5117:28;-1:-1:-1;;;;;;;;;;;;;;;;;;;5117:28:13;5335:34;;;;;;;;-1:-1:-1;5335:34:13;;;-1:-1:-1;;;;;5335:34:13;;;;;;;5486:21;;;;;;;;;;;5335:34;;-1:-1:-1;;;5486:21:13;;;-1:-1:-1;;;;;;;;;;;;;;;;;5486:21:13;;;;;;;;;;;;;;;-1:-1:-1;5470:37:13;-1:-1:-1;5944:20:13;;5994:120;6018:19;;;;6051:22;;;;6087:17;;;;6018:10;6087:17;:::i;:::-;5994:10;:120::i;:::-;6137:42;;;;;;;;;;;;;;;;4928:1258;;;;-1:-1:-1;;;;;;4928:1258:13:o;4368:708:6:-;4681:8;-1:-1:-1;;;;;4673:31:6;4694:10;4673:31;4669:68;;4726:10;4713:24;;-1:-1:-1;;;4713:24:6;;;;;;;;:::i;:::-;;;;;;;;4669:68;4873:14;;;;;;4837:32;;4854:14;;4873:7;4854:14;:::i;:::-;4837:16;:32::i;:::-;:50;4833:103;;4905:14;;;;:7;:14;:::i;:::-;4896:40;;-1:-1:-1;;;4896:40:6;;22241:10:53;22229:23;;;4896:40:6;;;22211:42:53;4921:14:6;;;;22269:18:53;;;22262:34;22184:18;;4896:40:6;22039:263:53;4833:103:6;5010:59;5021:7;5030:5;5037:8;;5047:9;5058:10;;5010;:59::i;:::-;4368:708;;;;;;;:::o;7049:121:2:-;7103:16;7138:25;:16;:23;:25::i;:::-;7131:32;;7049:121;:::o;5039:244:34:-;5126:4;735:10:41;5182:37:34;5198:4;735:10:41;5213:5:34;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;5272:4;5265:11;;;5039:244;;;;;;:::o;1724:108:5:-;1531:13:31;:11;:13::i;:::-;1804:21:5::1;1813:4;1819:5;1804:8;:21::i;:::-;1724:108:::0;;:::o;2656:112:36:-;2715:7;2741:20;:18;:20::i;6637:774:13:-;-1:-1:-1;;;;;;;;;;;;;;;;;6971:24:13;6999:74;7010:19;;;;7031:22;;;;7055:17;;;;7010:10;7055:17;:::i;6999:74::-;6968:105;;;7162:20;7184;7208:49;7228:10;7240:16;7208:19;:49::i;:::-;7161:96;;-1:-1:-1;7161:96:13;-1:-1:-1;7346:58:13;7353:17;;;;:10;:17;:::i;:::-;7372:7;7381;7390:13;7346:6;:58::i;:::-;7339:65;6637:774;-1:-1:-1;;;;;;6637:774:13:o;3791:440:3:-;1531:13:31;:11;:13::i;:::-;4066:1:3::1;4047:16;:20;4043:70;;;4076:37;;-1:-1:-1::0;;;4076:37:3::1;;;;;;;;;;;4043:70;4124:26;::::0;::::1;;::::0;;;:20:::1;:26;::::0;;;;;;:45;;;4185:39;::::1;::::0;::::1;::::0;4153:16;6157:25:53;;6145:2;6130:18;;6011:177;4185:39:3::1;;;;;;;;3791:440:::0;;:::o;1334:613:2:-;1406:7;1417:1;1406:12;1402:54;;1427:29;;-1:-1:-1;;;1427:29:2;;;;;;;;;;;1402:54;1503:10;1466:21;1490:24;;;:12;:24;;;;;1555:13;;1490:24;;-1:-1:-1;;;1555:13:2;;;-1:-1:-1;;;;;1555:13:2;;1604:29;1626:7;1555:13;1604:29;:::i;:::-;1647:16;;1578:55;;-1:-1:-1;;;;;;1647:16:2;:34;-1:-1:-1;1643:118:2;;;1704:46;;-1:-1:-1;;;1704:46:2;;;;;;;;;;;1643:118;1770:40;;-1:-1:-1;;;;;1770:40:2;;;-1:-1:-1;;;1770:40:2;;;;;;1821:24;1827:8;1837:7;1821:5;:24::i;:::-;1861:79;;;14074:25:53;;;14130:2;14115:18;;14108:34;;;1891:10:2;;1861:79;;14047:18:53;1861:79:2;;;;;;;1392:555;;;1334:613;;:::o;2210:470::-;2264:7;2275:1;2264:12;2260:54;;2285:29;;-1:-1:-1;;;2285:29:2;;;;;;;;;;;2260:54;2362:10;2325:21;2349:24;;;:12;:24;;;;;2413:13;;2349:24;;-1:-1:-1;;;2413:13:2;;;-1:-1:-1;;;;;2413:13:2;;2462:29;2484:7;2413:13;2462:29;:::i;:::-;2501:40;;-1:-1:-1;;;;;2501:40:2;;;-1:-1:-1;;;2501:40:2;;;;;;2436:55;-1:-1:-1;2552:26:2;2558:10;2570:7;2552:5;:26::i;:::-;2594:79;;;14074:25:53;;;14130:2;14115:18;;14108:34;;;2624:10:2;;2594:79;;14047:18:53;2594:79:2;;;;;;;2250:430;;;2210:470;:::o;538:93:12:-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;4869:169:3:-;1531:13:31;:11;:13::i;:::-;4939:8:3::1;4945:2;880:5;4939:8;:::i;:::-;4932:4;:15;4928:55;;;4956:27;;-1:-1:-1::0;;;4956:27:3::1;;;;;;;;;;;4928:55;4993:3;:10:::0;;;5019:12:::1;::::0;6157:25:53;;;5019:12:3::1;::::0;6145:2:53;6130:18;5019:12:3::1;;;;;;;;4869:169:::0;:::o;4459:163:13:-;1531:13:31;:11;:13::i;:::-;4542:12:13::1;:28:::0;;-1:-1:-1;;;;;;4542:28:13::1;-1:-1:-1::0;;;;;4542:28:13;::::1;;::::0;;4585:30:::1;::::0;::::1;::::0;::::1;::::0;4542:28;;4585:30:::1;:::i;2293:101:31:-:0;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;:::-;2293:101::o:0;4483:241:3:-;1531:13:31;:11;:13::i;:::-;4577:12:3::1;4562:11;;:27;4558:79;;4605:21;4624:1;4605:18;:21::i;:::-;4647:11;:26:::0;;;4689:28:::1;::::0;6157:25:53;;;4689:28:3::1;::::0;6145:2:53;6130:18;4689:28:3::1;6011:177:53::0;5655:114:3;2141:8;;;;;-1:-1:-1;;;;;2141:8:3;2127:10;:22;2123:86;;2172:26;;-1:-1:-1;;;2172:26:3;;;;;;;;;;;2123:86;5710:7:::1;:14:::0;;-1:-1:-1;;5710:14:3::1;5720:4;5710:14:::0;;::::1;::::0;;;5739:23:::1;::::0;1366:41:53;;;5739:23:3::1;::::0;1354:2:53;1339:18;5739:23:3::1;;;;;;;;5655:114::o:0;2406:143:36:-;-1:-1:-1;;;;;624:14:42;;2497:7:36;624:14:42;;;:7;:14;;;;;;2523:19:36;538:107:42;3115:718:2;1531:13:31;:11;:13::i;:::-;-1:-1:-1;;;;;3321:33:2;::::1;3287:31;3321:33:::0;;;:12:::1;:33;::::0;;;;3375:17:::1;::::0;::::1;3369:31:::0;;::::1;::::0;::::1;:::i;:::-;:36:::0;;-1:-1:-1;3365:85:2::1;;3414:36;;-1:-1:-1::0;;;3414:36:2::1;;;;;;;;;;;3365:85;3499:1;3464:36:::0;;;3460:72:::1;;3509:23;;-1:-1:-1::0;;;3509:23:2::1;;;;;;;;;;;3460:72;3543:17;::::0;::::1;:37;3563:17:::0;;3543;:37:::1;:::i;:::-;-1:-1:-1::0;3590:44:2;;-1:-1:-1;;;;;;3590:44:2::1;-1:-1:-1::0;;;;;3590:44:2;::::1;;::::0;;3645:41:::1;:16;3666:19:::0;3645:20:::1;:41::i;:::-;;3780:17;;3763:35;;;;;;;;;:::i;:::-;;::::0;;-1:-1:-1;;3763:35:2;;::::1;::::0;;;;;;;3753:46;;3763:35:::1;3753:46:::0;;::::1;::::0;-1:-1:-1;;;;;25422:47:53;;25404:66;;3753:46:2;-1:-1:-1;;;;;3702:124:2;::::1;::::0;::::1;::::0;25377:18:53;3702:124:2::1;;;;;;;3277:556;3115:718:::0;;;;:::o;2013:216:6:-;-1:-1:-1;;;;;2198:24:6;;2217:4;2198:24;2013:216;;;;;;;:::o;5144:557:47:-;5242:13;5269:18;5301:21;5336:15;5365:25;5404:12;5430:27;5533:13;:11;:13::i;:::-;5560:16;:14;:16::i;:::-;5668;;;5652:1;5668:16;;;;;;;;;-1:-1:-1;;;5482:212:47;;;-1:-1:-1;5482:212:47;;-1:-1:-1;5590:13:47;;-1:-1:-1;5625:4:47;;-1:-1:-1;5652:1:47;-1:-1:-1;5668:16:47;-1:-1:-1;5482:212:47;-1:-1:-1;5144:557:47:o;5417:133:3:-;1531:13:31;:11;:13::i;:::-;5486:8:3::1;:20:::0;;-1:-1:-1;;;;;;5486:20:3::1;;-1:-1:-1::0;;;;;5486:20:3;::::1;;;::::0;;5521:22:::1;::::0;::::1;::::0;::::1;::::0;5486:20;;5521:22:::1;:::i;6039:95:2:-:0;6087:13;6119:8;6112:15;;;;;:::i;4082:523::-;1531:13:31;:11;:13::i;:::-;-1:-1:-1;;;;;4177:33:2;::::1;;::::0;;;:12:::1;:33;::::0;;;;:39:::1;;4171:53:::0;;::::1;::::0;::::1;:::i;:::-;;;4228:1;4171:58:::0;4167:132:::1;;4252:36;;-1:-1:-1::0;;;4252:36:2::1;;;;;;;;;;;4167:132;-1:-1:-1::0;;;;;4312:33:2;::::1;;::::0;;;:12:::1;:33;::::0;;;;:45;-1:-1:-1;;;4312:45:2;::::1;-1:-1:-1::0;;;;;4312:45:2::1;:50:::0;4308:131:::1;;4385:43;;-1:-1:-1::0;;;4385:43:2::1;;;;;;;;;;;4308:131;-1:-1:-1::0;;;;;4456:33:2;::::1;;::::0;;;:12:::1;:33;::::0;;;;4449:40;;;4456:33;4449:40:::1;::::0;;::::1;4456:33:::0;4449:40:::1;:::i;:::-;-1:-1:-1::0;4499:44:2::1;::::0;-1:-1:-1;4499:16:2::1;4523:19:::0;4499:23:::1;:44::i;:::-;-1:-1:-1::0;4559:39:2::1;::::0;-1:-1:-1;;;;;4559:39:2;::::1;::::0;::::1;::::0;;;::::1;4082:523:::0;:::o;5873:115:3:-;1531:13:31;:11;:13::i;:::-;5927:7:3::1;:15:::0;;-1:-1:-1;;5927:15:3::1;::::0;;5957:24:::1;::::0;-1:-1:-1;1366:41:53;;5957:24:3::1;::::0;1354:2:53;1339:18;5957:24:3::1;1226:187:53::0;3610:178:34;3679:4;735:10:41;3733:27:34;735:10:41;3750:2:34;3754:5;3733:9;:27::i;4883:493:2:-;1531:13:31;:11;:13::i;:::-;-1:-1:-1;;;;;5024:26:2;::::1;;::::0;;;:12:::1;:26;::::0;;;;:32:::1;;5018:46:::0;;::::1;::::0;::::1;:::i;:::-;;;5068:1;5018:51:::0;5014:125:::1;;5092:36;;-1:-1:-1::0;;;5092:36:2::1;;;;;;;;;;;5014:125;-1:-1:-1::0;;;;;5172:26:2;::::1;5149:20;5172:26:::0;;;:12:::1;:26;::::0;;;;;;;;:41;;-1:-1:-1;;;;;;5223:56:2;::::1;-1:-1:-1::0;;;;;5223:56:2;;::::1;::::0;;::::1;::::0;;;5295:74;;5172:41;;;::::1;25655:25:53::0;;;25696:18;;;25689:75;5172:41:2;;:26;5295:74:::1;::::0;25628:18:53;5295:74:2::1;;;;;;;5004:372;4883:493:::0;;:::o;5674:96::-;1531:13:31;:11;:13::i;:::-;5745:8:2::1;:18;5756:7:::0;5745:8;:18:::1;:::i;1391:156:12:-:0;1531:13:31;:11;:13::i;:::-;1503:37:12::1;;1523:16:::0;;1503:37:::1;:::i;:::-;:19;:37::i;3510:981::-:0;3701:21;;;3677;3701;;;:15;:21;;;;;;;;:31;;;;;;;;;;3677:55;;3653:12;;3677:21;3701:31;3677:55;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3861:8;:15;3880:1;3861:20;3857:46;;3890:13;;3883:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3883:20:12;;-1:-1:-1;3883:20:12;;-1:-1:-1;;;;3883:20:12;3857:46;3988:1;3964:25;;;3960:46;;3998:8;-1:-1:-1;3991:15:12;;3960:46;4153:1;4129:25;;4125:267;;4170:34;4190:13;;4170:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4170:19:12;;-1:-1:-1;;;4170:34:12:i;:::-;4353:8;4363:17;:13;4377:1;4363:13;;:17;:::i;:::-;4340:41;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;4333:48;;;;;4125:267;4470:13;;4455:29;;-1:-1:-1;;;4455:29:12;;;;;;;;;:::i;1698:1333:17:-;1799:9;1794:1037;1814:19;;;1794:1037;;;1854:29;1886:8;;1895:1;1886:11;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;1854:43;-1:-1:-1;1980:50:17;1987:20;;;;1854:43;1987:20;:::i;:::-;2009;;;;14897:11:13;;;;;14874:4;14897:11;;;:5;:11;;;;;;:20;;14792:132;1980:50:17;1975:65;;2032:8;;;1975:65;2602:4;:22;2633:12;;;;:6;2696:11;;;;2725:14;;;;2633:6;2725:14;:::i;:::-;2757:15;;;;;;;;:::i;:::-;2790:16;;;;:6;:16;:::i;:::-;2602:218;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1840:991;1794:1037;1835:3;;1794:1037;;;;2988:10;-1:-1:-1;;;;;2978:43:17;;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2978:45:17;;;;;;;;;;;;:::i;:::-;2961:63;;-1:-1:-1;;;2961:63:17;;;;;;;;:::i;5479:88:2:-;1531:13:31;:11;:13::i;:::-;5546:6:2::1;:14;5555:5:::0;5546:6;:14:::1;:::i;8099:1340:13:-:0;8260:34;;:::i;:::-;-1:-1:-1;;;;;;;;;;;;;;;;;8658:20:13;;8708:140;8728:10;8752:19;;;;8785:22;;;;8821:17;;;;8752:10;8821:17;:::i;:::-;8708:6;:140::i;:::-;8657:191;;;;8937:20;8959;8983:49;9003:10;9015:16;8983:19;:49::i;:::-;8936:96;;-1:-1:-1;8936:96:13;-1:-1:-1;9155:66:13;9163:17;;;;:10;:17;:::i;:::-;9182:7;9191;9155:66;;;;;;;9200:4;9155:66;:::i;:::-;9206:14;9155:7;:66::i;:::-;9287:42;;;;;;;;;;;;;;;;;;;9353:15;;9142:79;;-1:-1:-1;9287:42:13;;-1:-1:-1;9389:10:13;;9353:15;9345:87;;9370:17;;;;:10;:17;:::i;:::-;9345:87;;;33621:10:53;33609:23;;;33591:42;;33664:2;33649:18;;33642:34;;;33692:18;;33685:34;;;33579:2;33564:18;9345:87:13;;;;;;;8326:1113;;;;8099:1340;;;;;;:::o;3252:105:5:-;1531:13:31;:11;:13::i;:::-;3319:31:5::1;::::0;-1:-1:-1;;;3319:31:5;;-1:-1:-1;;;;;3319:8:5::1;:20;::::0;::::1;::::0;:31:::1;::::0;3340:9;;3319:31:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;3252:105:::0;:::o;3679:409:17:-;3958:10;3980:4;3958:27;3954:50;;3994:10;;-1:-1:-1;;;3994:10:17;;;;;;;;;;;3954:50;4014:67;4033:7;4042:5;4049:8;;4059:9;4070:10;;4014:18;:67::i;1100:139::-;1531:13:31;:11;:13::i;:::-;1175:8:17::1;:20:::0;;-1:-1:-1;;;;;;1175:20:17::1;-1:-1:-1::0;;;;;1175:20:17;::::1;;::::0;;1210:22:::1;::::0;::::1;::::0;::::1;::::0;1175:20;;1210:22:::1;:::i;6303:139:2:-:0;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6409:26:2;;;;:12;:26;;;;;;6402:33;;;;;;;;;-1:-1:-1;;;;;6402:33:2;;;;;-1:-1:-1;;;6402:33:2;;;;;;;;;;;;;;;;-1:-1:-1;;6402:33:2;;6409:26;;6402:33;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6303:139;;;:::o;1680:672:36:-;1901:8;1883:15;:26;1879:97;;;1932:33;;-1:-1:-1;;;1932:33:36;;;;;6157:25:53;;;6130:18;;1932:33:36;6011:177:53;1879:97:36;1986:18;1022:95;2045:5;2052:7;2061:5;2068:16;2078:5;-1:-1:-1;;;;;1121:14:42;819:7;1121:14;;;:7;:14;;;;;:16;;;;;;;;;759:395;2068:16:36;2017:78;;;;;;34017:25:53;;;;-1:-1:-1;;;;;34116:15:53;;;34096:18;;;34089:43;34168:15;;;;34148:18;;;34141:43;34200:18;;;34193:34;34243:19;;;34236:35;34287:19;;;34280:35;;;33989:19;;2017:78:36;;;;;;;;;;;;2007:89;;;;;;1986:110;;2107:12;2122:28;2139:10;2122:16;:28::i;:::-;2107:43;;2161:14;2178:28;2192:4;2198:1;2201;2204;2178:13;:28::i;:::-;2161:45;;2230:5;-1:-1:-1;;;;;2220:15:36;:6;-1:-1:-1;;;;;2220:15:36;;2216:88;;2258:35;;-1:-1:-1;;;2258:35:36;;-1:-1:-1;;;;;34556:15:53;;;2258:35:36;;;34538:34:53;34608:15;;34588:18;;;34581:43;34473:18;;2258:35:36;34326:304:53;2216:88:36;2314:31;2323:5;2330:7;2339:5;2314:8;:31::i;:::-;1869:483;;;1680:672;;;;;;;:::o;3846:140:34:-;-1:-1:-1;;;;;3952:18:34;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140::o;5183:133:3:-;1531:13:31;:11;:13::i;:::-;5252:8:3::1;:20:::0;;-1:-1:-1;;;;;;5252:20:3::1;-1:-1:-1::0;;;;;5252:20:3;::::1;;::::0;;5287:22:::1;::::0;::::1;::::0;::::1;::::0;5252:20;;5287:22:::1;:::i;2543:215:31:-:0;1531:13;:11;:13::i;:::-;-1:-1:-1;;;;;2627:22:31;::::1;2623:91;;2700:1;2672:31;;-1:-1:-1::0;;;2672:31:31::1;;;;;;;;:::i;2623:91::-;2723:28;2742:8;2723:18;:28::i;:::-;2543:215:::0;:::o;2771:149:6:-;2853:4;2900:13;;;;;;2876:5;;2853:4;;2882:13;;2900:6;2882:13;:::i;:::-;2876:20;;;;;;;;;;;;;-1:-1:-1;2876:20:6;;:37;;2771:149;-1:-1:-1;;2771:149:6:o;8989:128:34:-;9073:37;9082:5;9089:7;9098:5;9105:4;9073:8;:37::i;:::-;8989:128;;;:::o;9147:682:3:-;9288:21;9311:25;9368:22;9380:9;9368:11;:22::i;:::-;9443:3;;9352:38;;-1:-1:-1;9460:9:3;;;;;:35;;-1:-1:-1;9473:8:3;;-1:-1:-1;;;;;9473:8:3;:22;;9460:35;9456:207;;;9531:57;880:5;9560:20;9576:4;9560:13;:20;:::i;:::-;:26;;;;:::i;:::-;9543:44;;:13;:44;:::i;:::-;9531:11;:57::i;:::-;9511:77;;9456:207;;;9639:13;9619:33;;9456:207;9728:12;9708:17;:32;9704:119;;;9763:49;;-1:-1:-1;;;9763:49:3;;;;;14074:25:53;;;14115:18;;;14108:34;;;14047:18;;9763:49:3;13900:248:53;9704:119:3;9342:487;9147:682;;;;;;:::o;2718:196:5:-;2822:11;;;2788:7;2822:11;;;:5;:11;;;;;;;2843:43;;2874:12;;-1:-1:-1;;;2874:12:5;;34982:10:53;34970:23;;2874:12:5;;;34952:42:53;34925:18;;2874:12:5;34808:192:53;11585:1806:13;12062:17;12082:36;:17;:8;;:15;:17::i;:::-;2891:2:16;2780:123;12082:36:13;12062:56;;12251:24;12278:62;12286:9;12297:26;12303:19;:8;;:17;:19::i;:::-;12297:5;:26::i;:::-;12325:14;;;;:7;:14;:::i;:::-;12278:7;:62::i;:::-;12251:89;-1:-1:-1;243:2:16;-1:-1:-1;;12351:955:13;;;12455:23;12481:175;12524:13;;;;;;;;:::i;:::-;12555:14;;;;:7;:14;:::i;:::-;12587:16;12621:21;:8;;:19;:21::i;:::-;12481:25;:175::i;:::-;13203:92;;-1:-1:-1;;;13203:92:13;;12455:201;;-1:-1:-1;;;;;;13203:8:13;:20;;;;:92;;13224:9;;13235:5;;13242:1;;12455:201;;13203:92;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12378:928;12351:955;-1:-1:-1;;;;;13321:63:13;;13333:5;13321:63;13340:14;;;;:7;:14;:::i;:::-;13321:63;;;22241:10:53;22229:23;;;22211:42;;22284:2;22269:18;;22262:34;;;22184:18;13321:63:13;;;;;;;11888:1503;;11585:1806;;;;;;;:::o;10270:300:52:-;10333:16;10361:22;10386:19;10394:3;10386:7;:19::i;10663:477:34:-;10762:24;10789:25;10799:5;10806:7;10789:9;:25::i;:::-;10762:52;;-1:-1:-1;;10828:16:34;:37;10824:310;;10904:5;10885:16;:24;10881:130;;;10936:60;;-1:-1:-1;;;10936:60:34;;-1:-1:-1;;;;;36227:32:53;;10936:60:34;;;36209:51:53;36276:18;;;36269:34;;;36319:18;;;36312:34;;;36182:18;;10936:60:34;36007:345:53;10881:130:34;11052:57;11061:5;11068:7;11096:5;11077:16;:24;11103:5;11052:8;:57::i;:::-;10752:388;10663:477;;;:::o;5656:300::-;-1:-1:-1;;;;;5739:18:34;;5735:86;;5807:1;5780:30;;-1:-1:-1;;;5780:30:34;;;;;;;;:::i;5735:86::-;-1:-1:-1;;;;;5834:16:34;;5830:86;;5902:1;5873:32;;-1:-1:-1;;;5873:32:34;;;;;;;;:::i;5830:86::-;5925:24;5933:4;5939:2;5943:5;5925:7;:24::i;1796:162:31:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:31;735:10:41;1855:23:31;1851:101;;735:10:41;1901:40:31;;-1:-1:-1;;;1901:40:31;;;;;;;;:::i;2286:134:5:-;2359:11;;;;;;;:5;:11;;;;;;;;;:19;;;2393:20;;22211:42:53;;;22269:18;;22262:34;;;2393:20:5;;22184:18:53;2393:20:5;;;;;;;2286:134;;:::o;3845:262:47:-;3898:7;3929:4;-1:-1:-1;;;;;3938:11:47;3921:28;;:63;;;;;3970:14;3953:13;:31;3921:63;3917:184;;;-1:-1:-1;4007:22:47;;3845:262::o;3917:184::-;4067:23;4204:80;;;2079:95;4204:80;;;43341:25:53;4226:11:47;43382:18:53;;;43375:34;;;;4239:14:47;43425:18:53;;;43418:34;4255:13:47;43468:18:53;;;43461:34;4278:4:47;43511:19:53;;;43504:61;4168:7:47;;43313:19:53;;4204:80:47;;;;;;;;;;;;4194:91;;;;;;4187:98;;4113:179;;9733:1334:13;9865:20;9887;9919:15;10090:324;10122:10;:13;;;10149:16;10155:9;10149:5;:16::i;:::-;10383:21;;;;:10;:21;:::i;:::-;10090:324;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10090:18:13;;-1:-1:-1;;;10090:324:13:i;:::-;10066:348;;-1:-1:-1;10066:348:13;-1:-1:-1;10494:14:13;10066:348;10511:33;;1999:1;10511:33;;;2045:1;10511:33;10494:50;-1:-1:-1;10666:67:13;10681:17;;;;:10;:17;:::i;:::-;10700:7;10709:23;;;;:10;:23;:::i;10666:67::-;10975:12;;10656:77;;-1:-1:-1;;;;;;10975:12:13;:26;10971:89;;11021:12;;;11003:57;;-1:-1:-1;;;11003:57:13;;-1:-1:-1;;;;;11021:12:13;;;;11003:39;;:57;;11043:7;;11052;;11003:57;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;10971:89;9909:1158;;9733:1334;;;;;:::o;2038:391:7:-;-1:-1:-1;;;;;;;;;;;;;;;;;2259:8:7;-1:-1:-1;;;;;2259:14:7;;2291:86;;;;;;;;2307:7;2291:86;;;;;;2316:25;2333:7;2316:16;:25::i;:::-;2291:86;;;;2343:8;2291:86;;;;2353:8;2291:86;;;;2363:13;2291:86;;;;;2403:4;2259:163;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2240:182;2038:391;-1:-1:-1;;;;;2038:391:7:o;7721:208:34:-;-1:-1:-1;;;;;7791:21:34;;7787:91;;7864:1;7835:32;;-1:-1:-1;;;7835:32:34;;;;;;;;:::i;7787:91::-;7887:35;7903:1;7907:7;7916:5;7887:7;:35::i;8247:206::-;-1:-1:-1;;;;;8317:21:34;;8313:89;;8388:1;8361:30;;-1:-1:-1;;;8361:30:34;;;;;;;;:::i;8313:89::-;8411:35;8419:7;8436:1;8440:5;8411:7;:35::i;2912:187:31:-;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:31;;;-1:-1:-1;;;;;;3020:17:31;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;10697:585:3:-;10761:20;10802:17;;10784:15;:35;;;;:::i;:::-;10761:58;;10830:35;10897:7;10883:11;;10868:12;:26;;;;:::i;:::-;:36;;;;:::i;:::-;11038:29;;10830:74;;-1:-1:-1;11222:7:3;11155:64;10830:74;11038:29;11155:3;:64::i;:::-;11110:109;;:30;:109;:::i;:::-;:119;;;;:::i;:::-;11078:29;:151;-1:-1:-1;;11260:15:3;11240:17;:35;-1:-1:-1;;10697:585:3:o;8316:150:52:-;8386:4;8409:50;8414:3;-1:-1:-1;;;;;8434:23:52;;8409:4;:50::i;6021:126:47:-;6067:13;6099:41;:5;6126:13;6099:26;:41::i;6473:135::-;6522:13;6554:47;:8;6584:16;6554:29;:47::i;8634:156:52:-;8707:4;8730:53;8738:3;-1:-1:-1;;;;;8758:23:52;;8730:7;:53::i;2237:514:12:-;2345:9;2340:354;2364:16;:23;2360:1;:27;2340:354;;;2522:48;2542:16;2559:1;2542:19;;;;;;;;:::i;:::-;;;;;;;:27;;;2522:19;:48::i;:::-;2656:16;2673:1;2656:19;;;;;;;;:::i;:::-;;;;;;;:27;;;2584:15;:40;2600:16;2617:1;2600:19;;;;;;;;:::i;:::-;;;;;;;:23;;;2584:40;;;;;;;;;;;;;;;:69;2625:16;2642:1;2625:19;;;;;;;;:::i;:::-;;;;;;;:27;;;2584:69;;;;;;;;;;;;;;;:99;;;;;;:::i;:::-;-1:-1:-1;2389:3:12;;2340:354;;;;2709:35;2727:16;2709:35;;;;;;:::i;4631:264::-;4801:1;4787:16;;4781:23;4827:28;;;463:1;4827:28;4823:65;;4879:8;4864:24;;-1:-1:-1;;;4864:24:12;;;;;;;;:::i;7272:1310:3:-;7518:7;;7427:21;;;;7518:7;;7514:50;;;7534:30;;-1:-1:-1;;;7534:30:3;;;;;;;;;;;7514:50;7612:44;7623:9;7634:12;7648:7;7612:10;:44::i;:::-;7575:81;;-1:-1:-1;7575:81:3;-1:-1:-1;7699:15:3;7717:33;7575:81;;7717:33;:::i;:::-;7699:51;-1:-1:-1;7764:12:3;;7760:78;;7809:8;;7792:35;;7802:5;;-1:-1:-1;;;;;7809:8:3;7819:7;7792:9;:35::i;:::-;7911:32;;;7887:21;7911:32;;;:23;:32;;;;;;:60;;7953:17;;7911:60;:::i;:::-;8006:29;;;;;;;:20;:29;;;;;;7887:84;;-1:-1:-1;7989:46:3;;7985:136;;;8062:44;;-1:-1:-1;;;8062:44:3;;34982:10:53;34970:23;;8062:44:3;;;34952:42:53;34925:18;;8062:44:3;34808:192:53;7985:136:3;8134:32;;;;;;;:23;:32;;;;;:49;8257:11;;-1:-1:-1;;8282:33:3;;8278:256;;8331:37;8350:17;8331:18;:37::i;:::-;8419:12;8387:29;;:44;8383:141;;;8458:51;;-1:-1:-1;;;8458:51:3;;34982:10:53;34970:23;;8458:51:3;;;34952:42:53;34925:18;;8458:51:3;34808:192:53;8383:141:3;8544:31;8550:5;8557:17;8544:5;:31::i;:::-;7481:1101;;7272:1310;;;;;;;:::o;3188:766:7:-;3389:31;;:::i;:::-;3554:20;3577:26;3588:4;:14;;;3577:10;:26::i;:::-;3617:15;;;;3554:49;;-1:-1:-1;3617:19:7;3613:53;;3638:28;3650:4;:15;;;3638:11;:28::i;:::-;3755:8;-1:-1:-1;;;;;3755:13:7;;3777:12;3809:92;;;;;;;;3825:7;3809:92;;;;;;3834:25;3851:7;3834:16;:25::i;:::-;3809:92;;;;3861:8;3809:92;;;;3871:8;3809:92;;;;3899:1;3881:4;:15;;;:19;3809:92;;;;;3919:14;3755:192;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3677:270;3188:766;-1:-1:-1;;;;;;;3188:766:7:o;4917:176:47:-;4994:7;5020:66;5053:20;:18;:20::i;:::-;5075:10;3555:4:48;3549:11;-1:-1:-1;;;3573:23:48;;3625:4;3616:14;;3609:39;;;;3677:4;3668:14;;3661:34;3733:4;3718:20;;;3353:401;6803:260:46;6888:7;6908:17;6927:18;6947:16;6967:25;6978:4;6984:1;6987;6990;6967:10;:25::i;:::-;6907:85;;;;;;7002:28;7014:5;7021:8;7002:11;:28::i;:::-;-1:-1:-1;7047:9:46;;6803:260;-1:-1:-1;;;;;;6803:260:46:o;9949:432:34:-;-1:-1:-1;;;;;10061:19:34;;10057:89;;10132:1;10103:32;;-1:-1:-1;;;10103:32:34;;;;;;;;:::i;10057:89::-;-1:-1:-1;;;;;10159:21:34;;10155:90;;10231:1;10203:31;;-1:-1:-1;;;10203:31:34;;;;;;;;:::i;10155:90::-;-1:-1:-1;;;;;10254:18:34;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10299:76;;;;10349:7;-1:-1:-1;;;;;10333:31:34;10342:5;-1:-1:-1;;;;;10333:31:34;;10358:5;10333:31;;;;6157:25:53;;6145:2;6130:18;;6011:177;10333:31:34;;;;;;;;9949:432;;;;:::o;15318:172:13:-;15389:16;15462:21;15425:33;15462:21;15425:9;:33;:::i;:::-;15424:59;;;;:::i;1573:123:16:-;1633:7;1667:21;188:2;1633:7;1667:4;;:21;:::i;:::-;1659:30;;;:::i;1874:152::-;1936:6;1975:42;243:2;188;1975:4;;:42;:::i;:::-;1968:50;;;:::i;:::-;1961:58;;;1874:152;-1:-1:-1;;;1874:152:16:o;15714:139:13:-;15778:16;15813:33;15825:21;-1:-1:-1;;;;;15813:33:13;;;:::i;10165:413:3:-;10364:32;;;10297:25;10364:32;;;:23;:32;;;;;:53;;10407:9;;10364:32;10297:25;;10364:53;;10407:9;;10364:53;:::i;:::-;;;;-1:-1:-1;10524:21:3;;-1:-1:-1;10530:3:3;10535:9;10524:5;:21::i;:::-;-1:-1:-1;10562:9:3;;10165:413;-1:-1:-1;;10165:413:3:o;2186:130:16:-;2250:12;2281:28;:4;243:2;2281:4;;:28;:::i;:::-;2274:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2274:35:16;;2186:130;-1:-1:-1;;;;;;2186:130:16:o;640:284:15:-;824:17;877:6;885:7;894:9;905:11;860:57;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;853:64;;640:284;;;;;;:::o;5581:109:52:-;5637:16;5672:3;:11;;5665:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5581:109;;;:::o;6271:1107:34:-;-1:-1:-1;;;;;6360:18:34;;6356:540;;6512:5;6496:12;;:21;;;;;;;:::i;:::-;;;;-1:-1:-1;6356:540:34;;-1:-1:-1;6356:540:34;;-1:-1:-1;;;;;6570:15:34;;6548:19;6570:15;;;:9;:15;;;;;;6603:19;;;6599:115;;;6649:50;;-1:-1:-1;;;6649:50:34;;-1:-1:-1;;;;;36227:32:53;;6649:50:34;;;36209:51:53;36276:18;;;36269:34;;;36319:18;;;36312:34;;;36182:18;;6649:50:34;36007:345:53;6599:115:34;-1:-1:-1;;;;;6834:15:34;;;;;;:9;:15;;;;;6852:19;;;;6834:37;;6356:540;-1:-1:-1;;;;;6910:16:34;;6906:425;;7073:12;:21;;;;;;;6906:425;;;-1:-1:-1;;;;;7284:13:34;;;;;;:9;:13;;;;;:22;;;;;;6906:425;7361:2;-1:-1:-1;;;;;7346:25:34;7355:4;-1:-1:-1;;;;;7346:25:34;;7365:5;7346:25;;;;6157::53;;6145:2;6130:18;;6011:177;7346:25:34;;;;;;;;6271:1107;;;:::o;16077:147:13:-;16142:15;16183:33;16195:21;16183:9;:33;:::i;598:506:16:-;791:18;;732:17;;791:22;;;934:163;;1074:7;1083:13;1057:40;;;;;;;;43731:19:53;;;43806:3;43784:16;-1:-1:-1;;;;;;43780:51:53;43775:2;43766:12;;43759:73;43857:2;43848:12;;43576:290;1057:40:16;;;;;;;;;;;;;934:163;;;976:7;985:13;1017:10;1030:11;959:83;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;934:163;927:170;;598:506;;;;;;:::o;11375:110:3:-;11435:7;11466:2;11461;:7;:17;;11476:2;11461:17;;;-1:-1:-1;11471:2:3;;11375:110;-1:-1:-1;11375:110:3:o;2241:406:52:-;2304:4;4360:21;;;:14;;;:21;;;;;;2320:321;;-1:-1:-1;2362:23:52;;;;;;;;:11;:23;;;;;;;;;;;;;2544:18;;2520:21;;;:14;;;:21;;;;;;:42;;;;2576:11;;2320:321;-1:-1:-1;2625:5:52;2618:12;;3385:267:43;3479:13;1390:66;3508:46;;3504:142;;3577:15;3586:5;3577:8;:15::i;:::-;3570:22;;;;3504:142;3630:5;3623:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2815:1368:52;2881:4;3010:21;;;:14;;;:21;;;;;;3046:13;;3042:1135;;3413:18;3434:12;3445:1;3434:8;:12;:::i;:::-;3480:18;;3413:33;;-1:-1:-1;3460:17:52;;3480:22;;3501:1;;3480:22;:::i;:::-;3460:42;;3535:9;3521:10;:23;3517:378;;3564:17;3584:3;:11;;3596:9;3584:22;;;;;;;;:::i;:::-;;;;;;;;;3564:42;;3731:9;3705:3;:11;;3717:10;3705:23;;;;;;;;:::i;:::-;;;;;;;;;;;;:35;;;;3844:25;;;:14;;;:25;;;;;:36;;;3517:378;3973:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;4076:3;:14;;:21;4091:5;4076:21;;;;;;;;;;;4069:28;;;4119:4;4112:11;;;;;;;3042:1135;4161:5;4154:12;;;;;3042:1135;2887:1296;2815:1368;;;;:::o;4650:191:7:-;4716:17;4762:10;4749:9;:23;4745:62;;4781:26;;-1:-1:-1;;;4781:26:7;;4797:9;4781:26;;;6157:25:53;6130:18;;4781:26:7;6011:177:53;4745:62:7;-1:-1:-1;4824:10:7;4650:191::o;5218:410::-;5371:15;5389:8;-1:-1:-1;;;;;5389:16:7;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5371:36;-1:-1:-1;;;;;;5421:21:7;;5417:54;;5451:20;;-1:-1:-1;;;5451:20:7;;;;;;;;;;;5417:54;5545:76;-1:-1:-1;;;;;5545:32:7;;5578:10;5598:8;5609:11;5545:32;:76::i;5140:1530:46:-;5266:7;;;-1:-1:-1;;;;;6186:79:46;;6182:164;;;-1:-1:-1;6297:1:46;;-1:-1:-1;6301:30:46;;-1:-1:-1;6333:1:46;6281:54;;6182:164;6457:24;;;6440:14;6457:24;;;;;;;;;45023:25:53;;;45096:4;45084:17;;45064:18;;;45057:45;;;;45118:18;;;45111:34;;;45161:18;;;45154:34;;;6457:24:46;;44995:19:53;;6457:24:46;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6457:24:46;;-1:-1:-1;;6457:24:46;;;-1:-1:-1;;;;;;;6495:20:46;;6491:113;;-1:-1:-1;6547:1:46;;-1:-1:-1;6551:29:46;;-1:-1:-1;6547:1:46;;-1:-1:-1;6531:62:46;;6491:113;6622:6;-1:-1:-1;6630:20:46;;-1:-1:-1;6630:20:46;;-1:-1:-1;5140:1530:46;;;;;;;;;:::o;7196:532::-;7291:20;7282:5;:29;;;;;;;;:::i;:::-;;7278:444;;7196:532;;:::o;7278:444::-;7387:29;7378:5;:38;;;;;;;;:::i;:::-;;7374:348;;7439:23;;-1:-1:-1;;;7439:23:46;;;;;;;;;;;7374:348;7492:35;7483:5;:44;;;;;;;;:::i;:::-;;7479:243;;7550:46;;-1:-1:-1;;;7550:46:46;;;;;6157:25:53;;;6130:18;;7550:46:46;6011:177:53;7479:243:46;7626:30;7617:5;:39;;;;;;;;:::i;:::-;;7613:109;;7679:32;;-1:-1:-1;;;7679:32:46;;;;;6157:25:53;;;6130:18;;7679:32:46;6011:177:53;2078:405:43;2137:13;2162:11;2176:16;2187:4;2176:10;:16::i;:::-;2300:14;;;2311:2;2300:14;;;;;;;;;2162:30;;-1:-1:-1;2280:17:43;;2300:14;;;;;;;;;-1:-1:-1;;;2390:16:43;;;-1:-1:-1;2435:4:43;2426:14;;2419:28;;;;-1:-1:-1;2390:16:43;2078:405::o;1702:188:39:-;1829:53;;;-1:-1:-1;;;;;45589:15:53;;;1829:53:39;;;45571:34:53;45641:15;;45621:18;;;45614:43;45673:18;;;;45666:34;;;1829:53:39;;;;;;;;;;45506:18:53;;;;1829:53:39;;;;;;;;-1:-1:-1;;;;;1829:53:39;-1:-1:-1;;;1829:53:39;;;1802:81;;1822:5;;1802:19;:81::i;2555:245:43:-;2616:7;2688:4;2652:40;;2715:2;2706:11;;2702:69;;;2740:20;;-1:-1:-1;;;2740:20:43;;;;;;;;;;;4059:629:39;4478:23;4504:33;-1:-1:-1;;;;;4504:27:39;;4532:4;4504:27;:33::i;:::-;4478:59;;4551:10;:17;4572:1;4551:22;;:57;;;;;4589:10;4578:30;;;;;;;;;;;;:::i;:::-;4577:31;4551:57;4547:135;;;4664:5;4631:40;;-1:-1:-1;;;4631:40:39;;;;;;;;:::i;2705:151:40:-;2780:12;2811:38;2833:6;2841:4;2847:1;2780:12;3421;3435:23;3462:6;-1:-1:-1;;;;;3462:11:40;3481:5;3488:4;3462:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3420:73;;;;3510:55;3537:6;3545:7;3554:10;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;:::-;4793:408;;;5045:17;;:22;:49;;;;-1:-1:-1;;;;;;5071:18:40;;;:23;5045:49;5041:119;;;5138:6;5121:24;;-1:-1:-1;;;5121:24:40;;;;;;;;:::i;5041:119::-;-1:-1:-1;5180:10:40;5173:17;;5743:516;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;-1:-1:-1;;;6225:17:40;;;;;;;;;;;-1:-1:-1;;;;;;;:::i;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;14:250:53;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:53;238:16;;231:27;14:250::o;269:271::-;311:3;349:5;343:12;376:6;371:3;364:19;392:76;461:6;454:4;449:3;445:14;438:4;431:5;427:16;392:76;:::i;:::-;522:2;501:15;-1:-1:-1;;497:29:53;488:39;;;;529:4;484:50;;269:271;-1:-1:-1;;269:271:53:o;545:220::-;694:2;683:9;676:21;657:4;714:45;755:2;744:9;740:18;732:6;714:45;:::i;770:131::-;-1:-1:-1;;;;;845:31:53;;835:42;;825:70;;891:1;888;881:12;906:315;974:6;982;1035:2;1023:9;1014:7;1010:23;1006:32;1003:52;;;1051:1;1048;1041:12;1003:52;1090:9;1077:23;1109:31;1134:5;1109:31;:::i;:::-;1159:5;1211:2;1196:18;;;;1183:32;;-1:-1:-1;;;906:315:53:o;1418:158::-;1480:5;1525:3;1516:6;1511:3;1507:16;1503:26;1500:46;;;1542:1;1539;1532:12;1500:46;-1:-1:-1;1564:6:53;1418:158;-1:-1:-1;1418:158:53:o;1581:360::-;1669:6;1722:2;1710:9;1701:7;1697:23;1693:32;1690:52;;;1738:1;1735;1728:12;1690:52;1778:9;1765:23;-1:-1:-1;;;;;1803:6:53;1800:30;1797:50;;;1843:1;1840;1833:12;1797:50;1866:69;1927:7;1918:6;1907:9;1903:22;1866:69;:::i;2100:1336::-;2020:12;;2008:25;;2082:4;2071:16;;;2065:23;2049:14;;;2042:47;2466:4;2514:3;2499:19;;2591:2;2629:3;2624:2;2613:9;2609:18;2602:31;2653:6;2688;2682:13;2719:6;2711;2704:22;2757:3;2746:9;2742:19;2735:26;;2820:3;2810:6;2807:1;2803:14;2792:9;2788:30;2784:40;2770:54;;2843:4;2882;2874:6;2870:17;2905:1;2915:429;2929:6;2926:1;2923:13;2915:429;;;2994:22;;;-1:-1:-1;;2990:37:53;2978:50;;3051:13;;3092:9;;3077:25;;3141:11;;3135:18;3173:15;;;3166:27;;;3216:48;3248:15;;;3135:18;3216:48;:::i;:::-;3206:58;-1:-1:-1;;3322:12:53;;;;3287:15;;;;2951:1;2944:9;2915:429;;;-1:-1:-1;;2020:12:53;;3426:2;3411:18;;2008:25;-1:-1:-1;;;2082:4:53;2071:16;;2065:23;2049:14;;;2042:47;-1:-1:-1;3361:6:53;-1:-1:-1;3376:54:53;1946:149;3441:203;-1:-1:-1;;;;;3605:32:53;;;;3587:51;;3575:2;3560:18;;3441:203::o;3649:154::-;3708:5;3753:2;3744:6;3739:3;3735:16;3731:25;3728:45;;;3769:1;3766;3759:12;3808:347;3859:8;3869:6;3923:3;3916:4;3908:6;3904:17;3900:27;3890:55;;3941:1;3938;3931:12;3890:55;-1:-1:-1;3964:20:53;;-1:-1:-1;;;;;3996:30:53;;3993:50;;;4039:1;4036;4029:12;3993:50;4076:4;4068:6;4064:17;4052:29;;4128:3;4121:4;4112:6;4104;4100:19;4096:30;4093:39;4090:59;;;4145:1;4142;4135:12;4090:59;3808:347;;;;;:::o;4160:1048::-;4303:6;4311;4319;4327;4335;4343;4351;4404:3;4392:9;4383:7;4379:23;4375:33;4372:53;;;4421:1;4418;4411:12;4372:53;4444;4489:7;4478:9;4444:53;:::i;:::-;4434:63;;4544:2;4533:9;4529:18;4516:32;4506:42;;4599:3;4588:9;4584:19;4571:33;-1:-1:-1;;;;;4664:2:53;4656:6;4653:14;4650:34;;;4680:1;4677;4670:12;4650:34;4719:58;4769:7;4760:6;4749:9;4745:22;4719:58;:::i;:::-;4796:8;;-1:-1:-1;4693:84:53;-1:-1:-1;4881:3:53;4866:19;;4853:33;;-1:-1:-1;4895:31:53;4853:33;4895:31;:::i;:::-;4945:5;;-1:-1:-1;5003:3:53;4988:19;;4975:33;;5020:16;;;5017:36;;;5049:1;5046;5039:12;5017:36;;5088:60;5140:7;5129:8;5118:9;5114:24;5088:60;:::i;:::-;4160:1048;;;;-1:-1:-1;4160:1048:53;;-1:-1:-1;4160:1048:53;;;;5062:86;;-1:-1:-1;;;4160:1048:53:o;6193:658::-;6364:2;6416:21;;;6486:13;;6389:18;;;6508:22;;;6335:4;;6364:2;6587:15;;;;6561:2;6546:18;;;6335:4;6630:195;6644:6;6641:1;6638:13;6630:195;;;6709:13;;-1:-1:-1;;;;;6705:39:53;6693:52;;6800:15;;;;6765:12;;;;6741:1;6659:9;6630:195;;6856:456;6933:6;6941;6949;7002:2;6990:9;6981:7;6977:23;6973:32;6970:52;;;7018:1;7015;7008:12;6970:52;7057:9;7044:23;7076:31;7101:5;7076:31;:::i;:::-;7126:5;-1:-1:-1;7183:2:53;7168:18;;7155:32;7196:33;7155:32;7196:33;:::i;:::-;6856:456;;7248:7;;-1:-1:-1;;;7302:2:53;7287:18;;;;7274:32;;6856:456::o;7506:163::-;7573:20;;7633:10;7622:22;;7612:33;;7602:61;;7659:1;7656;7649:12;7602:61;7506:163;;;:::o;7674:252::-;7741:6;7749;7802:2;7790:9;7781:7;7777:23;7773:32;7770:52;;;7818:1;7815;7808:12;7770:52;7841:28;7859:9;7841:28;:::i;8113:118::-;8199:5;8192:13;8185:21;8178:5;8175:32;8165:60;;8221:1;8218;8211:12;8236:489;8330:6;8338;8391:2;8379:9;8370:7;8366:23;8362:32;8359:52;;;8407:1;8404;8397:12;8359:52;8447:9;8434:23;-1:-1:-1;;;;;8472:6:53;8469:30;8466:50;;;8512:1;8509;8502:12;8466:50;8535:69;8596:7;8587:6;8576:9;8572:22;8535:69;:::i;:::-;8525:79;;;8654:2;8643:9;8639:18;8626:32;8667:28;8689:5;8667:28;:::i;:::-;8714:5;8704:15;;;8236:489;;;;;:::o;8730:257::-;2020:12;;2008:25;;2082:4;2071:16;;;2065:23;2049:14;;;2042:47;8924:2;8909:18;;8936:45;1946:149;9248:180;9307:6;9360:2;9348:9;9339:7;9335:23;9331:32;9328:52;;;9376:1;9373;9366:12;9328:52;-1:-1:-1;9399:23:53;;9248:180;-1:-1:-1;9248:180:53:o;9433:159::-;9500:20;;9560:6;9549:18;;9539:29;;9529:57;;9582:1;9579;9572:12;9597:256;9663:6;9671;9724:2;9712:9;9703:7;9699:23;9695:32;9692:52;;;9740:1;9737;9730:12;9692:52;9763:28;9781:9;9763:28;:::i;:::-;9753:38;;9810:37;9843:2;9832:9;9828:18;9810:37;:::i;:::-;9800:47;;9597:256;;;;;:::o;10318:184::-;10376:6;10429:2;10417:9;10408:7;10404:23;10400:32;10397:52;;;10445:1;10442;10435:12;10397:52;10468:28;10486:9;10468:28;:::i;10687:247::-;10746:6;10799:2;10787:9;10778:7;10774:23;10770:32;10767:52;;;10815:1;10812;10805:12;10767:52;10854:9;10841:23;10873:31;10898:5;10873:31;:::i;11144:188::-;11212:20;;-1:-1:-1;;;;;11261:46:53;;11251:57;;11241:85;;11322:1;11319;11312:12;11337:619;11426:6;11434;11442;11450;11503:2;11491:9;11482:7;11478:23;11474:32;11471:52;;;11519:1;11516;11509:12;11471:52;11558:9;11545:23;11577:31;11602:5;11577:31;:::i;:::-;11627:5;-1:-1:-1;11683:2:53;11668:18;;11655:32;-1:-1:-1;;;;;11699:30:53;;11696:50;;;11742:1;11739;11732:12;11696:50;11781:58;11831:7;11822:6;11811:9;11807:22;11781:58;:::i;:::-;11858:8;;-1:-1:-1;11755:84:53;-1:-1:-1;11912:38:53;;-1:-1:-1;11946:2:53;11931:18;;11912:38;:::i;:::-;11902:48;;11337:619;;;;;;;:::o;11961:670::-;12075:6;12083;12091;12099;12152:3;12140:9;12131:7;12127:23;12123:33;12120:53;;;12169:1;12166;12159:12;12120:53;12192;12237:7;12226:9;12192:53;:::i;:::-;12182:63;;12296:2;12285:9;12281:18;12268:32;-1:-1:-1;;;;;12315:6:53;12312:30;12309:50;;;12355:1;12352;12345:12;12309:50;12394:58;12444:7;12435:6;12424:9;12420:22;12394:58;:::i;:::-;12471:8;;-1:-1:-1;12368:84:53;-1:-1:-1;;12556:3:53;12541:19;;12528:33;12570:31;12528:33;12570:31;:::i;:::-;11961:670;;;;-1:-1:-1;11961:670:53;;-1:-1:-1;;11961:670:53:o;12636:1259::-;13042:3;13037;13033:13;13025:6;13021:26;13010:9;13003:45;12984:4;13067:2;13105:3;13100:2;13089:9;13085:18;13078:31;13132:46;13173:3;13162:9;13158:19;13150:6;13132:46;:::i;:::-;13226:9;13218:6;13214:22;13209:2;13198:9;13194:18;13187:50;13260:33;13286:6;13278;13260:33;:::i;:::-;13324:2;13309:18;;13302:34;;;-1:-1:-1;;;;;13373:32:53;;13367:3;13352:19;;13345:61;13393:3;13422:19;;13415:35;;;13487:22;;;13481:3;13466:19;;13459:51;13559:13;;13581:22;;;13631:2;13657:15;;;;-1:-1:-1;13619:15:53;;;;-1:-1:-1;13700:169:53;13714:6;13711:1;13708:13;13700:169;;;13775:13;;13763:26;;13844:15;;;;13809:12;;;;13736:1;13729:9;13700:169;;;-1:-1:-1;13886:3:53;;12636:1259;-1:-1:-1;;;;;;;;;;;;12636:1259:53:o;14153:321::-;14221:6;14229;14282:2;14270:9;14261:7;14257:23;14253:32;14250:52;;;14298:1;14295;14288:12;14250:52;14337:9;14324:23;14356:31;14381:5;14356:31;:::i;:::-;14406:5;-1:-1:-1;14430:38:53;14464:2;14449:18;;14430:38;:::i;14479:127::-;14540:10;14535:3;14531:20;14528:1;14521:31;14571:4;14568:1;14561:15;14595:4;14592:1;14585:15;14611:253;14683:2;14677:9;14725:4;14713:17;;-1:-1:-1;;;;;14745:34:53;;14781:22;;;14742:62;14739:88;;;14807:18;;:::i;:::-;14843:2;14836:22;14611:253;:::o;14869:251::-;14941:2;14935:9;;;14971:15;;-1:-1:-1;;;;;15001:34:53;;15037:22;;;14998:62;14995:88;;;15063:18;;:::i;15125:275::-;15196:2;15190:9;15261:2;15242:13;;-1:-1:-1;;15238:27:53;15226:40;;-1:-1:-1;;;;;15281:34:53;;15317:22;;;15278:62;15275:88;;;15343:18;;:::i;:::-;15379:2;15372:22;15125:275;;-1:-1:-1;15125:275:53:o;15405:187::-;15454:4;-1:-1:-1;;;;;15479:6:53;15476:30;15473:56;;;15509:18;;:::i;:::-;-1:-1:-1;15575:2:53;15554:15;-1:-1:-1;;15550:29:53;15581:4;15546:40;;15405:187::o;15597:338::-;15662:5;15691:53;15707:36;15736:6;15707:36;:::i;:::-;15691:53;:::i;:::-;15682:62;;15767:6;15760:5;15753:21;15807:3;15798:6;15793:3;15789:16;15786:25;15783:45;;;15824:1;15821;15814:12;15783:45;15873:6;15868:3;15861:4;15854:5;15850:16;15837:43;15927:1;15920:4;15911:6;15904:5;15900:18;15896:29;15889:40;15597:338;;;;;:::o;15940:451::-;16009:6;16062:2;16050:9;16041:7;16037:23;16033:32;16030:52;;;16078:1;16075;16068:12;16030:52;16118:9;16105:23;-1:-1:-1;;;;;16143:6:53;16140:30;16137:50;;;16183:1;16180;16173:12;16137:50;16206:22;;16259:4;16251:13;;16247:27;-1:-1:-1;16237:55:53;;16288:1;16285;16278:12;16237:55;16311:74;16377:7;16372:2;16359:16;16354:2;16350;16346:11;16311:74;:::i;16396:395::-;16487:8;16497:6;16551:3;16544:4;16536:6;16532:17;16528:27;16518:55;;16569:1;16566;16559:12;16518:55;-1:-1:-1;16592:20:53;;-1:-1:-1;;;;;16624:30:53;;16621:50;;;16667:1;16664;16657:12;16621:50;16704:4;16696:6;16692:17;16680:29;;16764:3;16757:4;16747:6;16744:1;16740:14;16732:6;16728:27;16724:38;16721:47;16718:67;;;16781:1;16778;16771:12;16796:504;16921:6;16929;16982:2;16970:9;16961:7;16957:23;16953:32;16950:52;;;16998:1;16995;16988:12;16950:52;17038:9;17025:23;-1:-1:-1;;;;;17063:6:53;17060:30;17057:50;;;17103:1;17100;17093:12;17057:50;17142:98;17232:7;17223:6;17212:9;17208:22;17142:98;:::i;:::-;17259:8;;17116:124;;-1:-1:-1;16796:504:53;-1:-1:-1;;;;16796:504:53:o;17305:553::-;17391:6;17399;17407;17415;17468:2;17456:9;17447:7;17443:23;17439:32;17436:52;;;17484:1;17481;17474:12;17436:52;17507:28;17525:9;17507:28;:::i;:::-;17497:38;;17554:37;17587:2;17576:9;17572:18;17554:37;:::i;:::-;17544:47;;17642:2;17631:9;17627:18;17614:32;-1:-1:-1;;;;;17661:6:53;17658:30;17655:50;;;17701:1;17698;17691:12;17655:50;17740:58;17790:7;17781:6;17770:9;17766:22;17740:58;:::i;:::-;17305:553;;;;-1:-1:-1;17817:8:53;-1:-1:-1;;;;17305:553:53:o;18366:657::-;18504:6;18512;18520;18564:9;18555:7;18551:23;18594:3;18590:2;18586:12;18583:32;;;18611:1;18608;18601:12;18583:32;18651:9;18638:23;-1:-1:-1;;;;;18676:6:53;18673:30;18670:50;;;18716:1;18713;18706:12;18670:50;18739:69;18800:7;18791:6;18780:9;18776:22;18739:69;:::i;:::-;18729:79;-1:-1:-1;;18842:2:53;-1:-1:-1;;18824:16:53;;18820:25;18817:45;;;18858:1;18855;18848:12;18817:45;;18896:2;18885:9;18881:18;18871:28;;18949:2;18938:9;18934:18;18921:32;18962:31;18987:5;18962:31;:::i;:::-;19012:5;19002:15;;;18366:657;;;;;:::o;19028:613::-;19272:4;19314:3;19303:9;19299:19;19291:27;;19351:6;19345:13;19334:9;19327:32;-1:-1:-1;;;;;19419:4:53;19411:6;19407:17;19401:24;19397:49;19390:4;19379:9;19375:20;19368:79;19494:4;19486:6;19482:17;19476:24;19509:62;19565:4;19554:9;19550:20;19536:12;2020;;2008:25;;2082:4;2071:16;;;2065:23;2049:14;;2042:47;1946:149;19509:62;-1:-1:-1;2020:12:53;;19630:3;19615:19;;2008:25;2082:4;2071:16;;2065:23;2049:14;;;2042:47;19580:55;1946:149;19646:535;19829:2;19818:9;19811:21;19792:4;-1:-1:-1;;;;;19940:2:53;19931:6;19925:13;19921:22;19916:2;19905:9;19901:18;19894:50;20008:2;20002;19994:6;19990:15;19984:22;19980:31;19975:2;19964:9;19960:18;19953:59;;20059:2;20051:6;20047:15;20041:22;20101:4;20094;20083:9;20079:20;20072:34;20123:52;20170:3;20159:9;20155:19;20141:12;20123:52;:::i;20186:829::-;20297:6;20305;20313;20321;20329;20337;20345;20398:3;20386:9;20377:7;20373:23;20369:33;20366:53;;;20415:1;20412;20405:12;20366:53;20454:9;20441:23;20473:31;20498:5;20473:31;:::i;:::-;20523:5;-1:-1:-1;20580:2:53;20565:18;;20552:32;20593:33;20552:32;20593:33;:::i;:::-;20645:7;-1:-1:-1;20699:2:53;20684:18;;20671:32;;-1:-1:-1;20750:2:53;20735:18;;20722:32;;-1:-1:-1;20806:3:53;20791:19;;20778:33;20855:4;20842:18;;20830:31;;20820:59;;20875:1;20872;20865:12;20820:59;20186:829;;;;-1:-1:-1;20186:829:53;;;;20898:7;20952:3;20937:19;;20924:33;;-1:-1:-1;21004:3:53;20989:19;;;20976:33;;20186:829;-1:-1:-1;;20186:829:53:o;21020:388::-;21088:6;21096;21149:2;21137:9;21128:7;21124:23;21120:32;21117:52;;;21165:1;21162;21155:12;21117:52;21204:9;21191:23;21223:31;21248:5;21223:31;:::i;:::-;21273:5;-1:-1:-1;21330:2:53;21315:18;;21302:32;21343:33;21302:32;21343:33;:::i;21413:236::-;21498:6;21551:2;21539:9;21530:7;21526:23;21522:32;21519:52;;;21567:1;21564;21557:12;21519:52;21590:53;21635:7;21624:9;21590:53;:::i;21654:380::-;21733:1;21729:12;;;;21776;;;21797:61;;21851:4;21843:6;21839:17;21829:27;;21797:61;21904:2;21896:6;21893:14;21873:18;21870:38;21867:161;;21950:10;21945:3;21941:20;21938:1;21931:31;21985:4;21982:1;21975:15;22013:4;22010:1;22003:15;22307:127;22368:10;22363:3;22359:20;22356:1;22349:31;22399:4;22396:1;22389:15;22423:4;22420:1;22413:15;22439:125;22504:9;;;22525:10;;;22522:36;;;22538:18;;:::i;22569:128::-;22636:9;;;22657:11;;;22654:37;;;22671:18;;:::i;22702:217::-;22742:1;22768;22758:132;;22812:10;22807:3;22803:20;22800:1;22793:31;22847:4;22844:1;22837:15;22875:4;22872:1;22865:15;22758:132;-1:-1:-1;22904:9:53;;22702:217::o;23050:543::-;23152:2;23147:3;23144:11;23141:446;;;23188:1;23212:5;23209:1;23202:16;23256:4;23253:1;23243:18;23326:2;23314:10;23310:19;23307:1;23303:27;23297:4;23293:38;23362:4;23350:10;23347:20;23344:47;;;-1:-1:-1;23385:4:53;23344:47;23440:2;23435:3;23431:12;23428:1;23424:20;23418:4;23414:31;23404:41;;23495:82;23513:2;23506:5;23503:13;23495:82;;;23558:17;;;23539:1;23528:13;23495:82;;;23499:3;;;23050:543;;;:::o;23769:1206::-;-1:-1:-1;;;;;23888:3:53;23885:27;23882:53;;;23915:18;;:::i;:::-;23944:94;24034:3;23994:38;24026:4;24020:11;23994:38;:::i;:::-;23988:4;23944:94;:::i;:::-;24064:1;24089:2;24084:3;24081:11;24106:1;24101:616;;;;24761:1;24778:3;24775:93;;;-1:-1:-1;24834:19:53;;;24821:33;24775:93;-1:-1:-1;;23726:1:53;23722:11;;;23718:24;23714:29;23704:40;23750:1;23746:11;;;23701:57;24881:78;;24074:895;;24101:616;22997:1;22990:14;;;23034:4;23021:18;;-1:-1:-1;;24137:17:53;;;24238:9;24260:229;24274:7;24271:1;24268:14;24260:229;;;24363:19;;;24350:33;24335:49;;24470:4;24455:20;;;;24423:1;24411:14;;;;24290:12;24260:229;;;24264:3;24517;24508:7;24505:16;24502:159;;;24641:1;24637:6;24631:3;24625;24622:1;24618:11;24614:21;24610:34;24606:39;24593:9;24588:3;24584:19;24571:33;24567:79;24559:6;24552:95;24502:159;;;24704:1;24698:3;24695:1;24691:11;24687:19;24681:4;24674:33;24074:895;;23769:1206;;;:::o;24980:273::-;25165:6;25157;25152:3;25139:33;25121:3;25191:16;;25216:13;;;25191:16;24980:273;-1:-1:-1;24980:273:53:o;25775:1345::-;25901:3;25895:10;-1:-1:-1;;;;;25920:6:53;25917:30;25914:56;;;25950:18;;:::i;:::-;25979:97;26069:6;26029:38;26061:4;26055:11;26029:38;:::i;:::-;26023:4;25979:97;:::i;:::-;26131:4;;26188:2;26177:14;;26205:1;26200:663;;;;26907:1;26924:6;26921:89;;;-1:-1:-1;26976:19:53;;;26970:26;26921:89;-1:-1:-1;;23726:1:53;23722:11;;;23718:24;23714:29;23704:40;23750:1;23746:11;;;23701:57;27023:81;;26170:944;;26200:663;22997:1;22990:14;;;23034:4;23021:18;;-1:-1:-1;;26236:20:53;;;26354:236;26368:7;26365:1;26362:14;26354:236;;;26457:19;;;26451:26;26436:42;;26549:27;;;;26517:1;26505:14;;;;26384:19;;26354:236;;;26358:3;26618:6;26609:7;26606:19;26603:201;;;26679:19;;;26673:26;-1:-1:-1;;26762:1:53;26758:14;;;26774:3;26754:24;26750:37;26746:42;26731:58;26716:74;;26603:201;-1:-1:-1;;;;;26850:1:53;26834:14;;;26830:22;26817:36;;-1:-1:-1;25775:1345:53:o;27125:1793::-;27317:9;-1:-1:-1;;;;;27392:2:53;27384:6;27381:14;27378:40;;;27398:18;;:::i;:::-;27444:6;27441:1;27437:14;27470:4;27494:28;27518:2;27514;27510:11;27494:28;:::i;:::-;27556:19;;;27626:14;;;;27591:12;;;;27663:14;27652:26;;27649:46;;;27691:1;27688;27681:12;27649:46;27715:5;27729:1156;27745:6;27740:3;27737:15;27729:1156;;;27831:3;27818:17;27867:2;27854:11;27851:19;27848:109;;;27911:1;27940:2;27936;27929:14;27848:109;27980:23;;28048:4;28027:14;28023:23;;;28019:34;28016:124;;;28094:1;28123:2;28119;28112:14;28016:124;28168:22;;:::i;:::-;28219:21;28237:2;28219:21;:::i;:::-;28210:7;28203:38;28279:30;28305:2;28301;28297:11;28279:30;:::i;:::-;28274:2;28265:7;28261:16;28254:56;28333:2;28383;28379;28375:11;28362:25;28414:2;28406:6;28403:14;28400:104;;;28458:1;28487:2;28483;28476:14;28400:104;28527:15;;;;;28584:14;28577:4;28569:13;;28565:34;28555:135;;28642:1;28672:3;28667;28660:16;28555:135;28728:81;28794:14;28789:2;28776:16;28771:2;28767;28763:11;28728:81;:::i;:::-;28710:16;;;28703:107;28823:20;;-1:-1:-1;28863:12:53;;;;27762;;27729:1156;;;-1:-1:-1;28907:5:53;27125:1793;-1:-1:-1;;;;;;;27125:1793:53:o;28923:331::-;29028:9;29039;29081:8;29069:10;29066:24;29063:44;;;29103:1;29100;29093:12;29063:44;29132:6;29122:8;29119:20;29116:40;;;29152:1;29149;29142:12;29116:40;-1:-1:-1;;29178:23:53;;;29223:25;;;;;-1:-1:-1;28923:331:53:o;29259:476::-;29450:3;29488:6;29482:13;29504:66;29563:6;29558:3;29551:4;29543:6;29539:17;29504:66;:::i;:::-;29592:16;;29645:6;29637;29592:16;29617:35;29709:1;29671:18;;29698:13;;;-1:-1:-1;29671:18:53;;29259:476;-1:-1:-1;;;29259:476:53:o;29740:266::-;29828:6;29823:3;29816:19;29880:6;29873:5;29866:4;29861:3;29857:14;29844:43;-1:-1:-1;29932:1:53;29907:16;;;29925:4;29903:27;;;29896:38;;;;29988:2;29967:15;;;-1:-1:-1;;29963:29:53;29954:39;;;29950:50;;29740:266::o;30011:244::-;30168:2;30157:9;30150:21;30131:4;30188:61;30245:2;30234:9;30230:18;30222:6;30214;30188:61;:::i;30260:127::-;30321:10;30316:3;30312:20;30309:1;30302:31;30352:4;30349:1;30342:15;30376:4;30373:1;30366:15;30392:331;30491:4;30549:11;30536:25;30643:3;30639:8;30628;30612:14;30608:29;30604:44;30584:18;30580:69;30570:97;;30663:1;30660;30653:12;30570:97;30684:33;;;;;30392:331;-1:-1:-1;;30392:331:53:o;30728:521::-;30805:4;30811:6;30871:11;30858:25;30965:2;30961:7;30950:8;30934:14;30930:29;30926:43;30906:18;30902:68;30892:96;;30984:1;30981;30974:12;30892:96;31011:33;;31063:20;;;-1:-1:-1;;;;;;31095:30:53;;31092:50;;;31138:1;31135;31128:12;31092:50;31171:4;31159:17;;-1:-1:-1;31202:14:53;31198:27;;;31188:38;;31185:58;;;31239:1;31236;31229:12;31254:129;-1:-1:-1;;;;;31332:5:53;31328:30;31321:5;31318:41;31308:69;;31373:1;31370;31363:12;31388:992;31766:10;31739:25;31757:6;31739:25;:::i;:::-;31735:42;31724:9;31717:61;31841:4;31833:6;31829:17;31816:31;31809:4;31798:9;31794:20;31787:61;31698:4;31895;31887:6;31883:17;31870:31;31910:30;31934:5;31910:30;:::i;:::-;-1:-1:-1;;;;;31982:5:53;31978:30;31971:4;31960:9;31956:20;31949:60;;32045:6;32040:2;32029:9;32025:18;32018:34;32089:3;32083;32072:9;32068:19;32061:32;32116:62;32173:3;32162:9;32158:19;32150:6;32142;32116:62;:::i;:::-;-1:-1:-1;;;;;32215:32:53;;32235:3;32194:19;;32187:61;32285:22;;;32279:3;32264:19;;32257:51;32325:49;32289:6;32359;32351;32325:49;:::i;:::-;32317:57;31388:992;-1:-1:-1;;;;;;;;;;31388:992:53:o;32385:648::-;32464:6;32517:2;32505:9;32496:7;32492:23;32488:32;32485:52;;;32533:1;32530;32523:12;32485:52;32566:9;32560:16;-1:-1:-1;;;;;32591:6:53;32588:30;32585:50;;;32631:1;32628;32621:12;32585:50;32654:22;;32707:4;32699:13;;32695:27;-1:-1:-1;32685:55:53;;32736:1;32733;32726:12;32685:55;32765:2;32759:9;32790:49;32806:32;32835:2;32806:32;:::i;32790:49::-;32862:2;32855:5;32848:17;32902:7;32897:2;32892;32888;32884:11;32880:20;32877:33;32874:53;;;32923:1;32920;32913:12;32874:53;32936:67;33000:2;32995;32988:5;32984:14;32979:2;32975;32971:11;32936:67;:::i;33038:348::-;33127:6;33180:2;33168:9;33159:7;33155:23;33151:32;33148:52;;;33196:1;33193;33186:12;33148:52;33222:22;;:::i;:::-;33280:9;33267:23;33260:5;33253:38;33351:2;33340:9;33336:18;33323:32;33318:2;33311:5;33307:14;33300:56;33375:5;33365:15;;;33038:348;;;;:::o;34635:168::-;34708:9;;;34739;;34756:15;;;34750:22;;34736:37;34726:71;;34777:18;;:::i;35005:245::-;35063:6;35116:2;35104:9;35095:7;35091:23;35087:32;35084:52;;;35132:1;35129;35122:12;35084:52;35171:9;35158:23;35190:30;35214:5;35190:30;:::i;35255:479::-;35522:1;35518;35513:3;35509:11;35505:19;35497:6;35493:32;35482:9;35475:51;35562:6;35557:2;35546:9;35542:18;35535:34;35617:6;35609;35605:19;35600:2;35589:9;35585:18;35578:47;35661:3;35656:2;35645:9;35641:18;35634:31;35456:4;35682:46;35723:3;35712:9;35708:19;35700:6;35682:46;:::i;36357:379::-;36550:2;36539:9;36532:21;36513:4;36576:45;36617:2;36606:9;36602:18;36594:6;36576:45;:::i;:::-;36669:9;36661:6;36657:22;36652:2;36641:9;36637:18;36630:50;36697:33;36723:6;36715;36697:33;:::i;36741:245::-;36808:6;36861:2;36849:9;36840:7;36836:23;36832:32;36829:52;;;36877:1;36874;36867:12;36829:52;36909:9;36903:16;36928:28;36950:5;36928:28;:::i;36991:891::-;37214:2;37203:9;37196:21;37272:10;37263:6;37257:13;37253:30;37248:2;37237:9;37233:18;37226:58;37338:4;37330:6;37326:17;37320:24;37315:2;37304:9;37300:18;37293:52;37177:4;37392:2;37384:6;37380:15;37374:22;37433:4;37427:3;37416:9;37412:19;37405:33;37461:52;37508:3;37497:9;37493:19;37479:12;37461:52;:::i;:::-;37447:66;;37562:2;37554:6;37550:15;37544:22;37636:2;37632:7;37620:9;37612:6;37608:22;37604:36;37597:4;37586:9;37582:20;37575:66;37664:41;37698:6;37682:14;37664:41;:::i;:::-;37774:3;37762:16;;;;37756:23;37749:31;37742:39;37736:3;37721:19;;37714:68;-1:-1:-1;;;;;;;;37843:32:53;;;;37836:4;37821:20;;;37814:62;37650:55;36991:891::o;37887:284::-;37957:5;38005:4;37993:9;37988:3;37984:19;37980:30;37977:50;;;38023:1;38020;38013:12;37977:50;38045:22;;:::i;:::-;38036:31;;38096:9;38090:16;38083:5;38076:31;38160:2;38149:9;38145:18;38139:25;38134:2;38127:5;38123:14;38116:49;37887:284;;;;:::o;38176:259::-;38276:6;38329:2;38317:9;38308:7;38304:23;38300:32;38297:52;;;38345:1;38342;38335:12;38297:52;38368:61;38421:7;38410:9;38368:61;:::i;39788:1164::-;40004:4;40033:2;40073;40062:9;40058:18;40103:2;40092:9;40085:21;40126:6;40161;40155:13;40192:6;40184;40177:22;40218:2;40208:12;;40251:2;40240:9;40236:18;40229:25;;40313:2;40303:6;40300:1;40296:14;40285:9;40281:30;40277:39;40351:2;40343:6;40339:15;40372:1;40382:541;40396:6;40393:1;40390:13;40382:541;;;40461:22;;;-1:-1:-1;;40457:36:53;40445:49;;40517:13;;40589:9;;40600:10;40585:26;40570:42;;40659:11;;;40653:18;40673:6;40649:31;40632:15;;;40625:56;40720:11;;40714:18;40553:4;40752:15;;;40745:27;;;40795:48;40827:15;;;40714:18;40795:48;:::i;:::-;40901:12;;;;40785:58;-1:-1:-1;;;40866:15:53;;;;40418:1;40411:9;40382:541;;;-1:-1:-1;40940:6:53;;39788:1164;-1:-1:-1;;;;;;;;39788:1164:53:o;40957:200::-;41023:9;;;40996:4;41051:9;;41079:10;;41091:12;;;41075:29;41114:12;;;41106:21;;41072:56;41069:82;;;41131:18;;:::i;41162:525::-;41266:6;41319:3;41307:9;41298:7;41294:23;41290:33;41287:53;;;41336:1;41333;41326:12;41287:53;41362:22;;:::i;:::-;41413:9;41407:16;41400:5;41393:31;41469:2;41458:9;41454:18;41448:25;41482:32;41506:7;41482:32;:::i;:::-;41541:2;41530:14;;41523:31;41586:70;41648:7;41643:2;41628:18;;41586:70;:::i;:::-;41581:2;41570:14;;41563:94;41574:5;41162:525;-1:-1:-1;;;41162:525:53:o;41692:255::-;41812:19;;41851:2;41843:11;;41840:101;;;-1:-1:-1;;41912:2:53;41908:12;;;41905:1;41901:20;41897:33;41886:45;41692:255;;;;:::o;41952:331::-;-1:-1:-1;;;;;;42072:19:53;;42156:11;;;;42187:1;42179:10;;42176:101;;;42264:2;42258;42251:3;42248:1;42244:11;42241:1;42237:19;42233:28;42229:2;42225:37;42221:46;42212:55;;42176:101;;;41952:331;;;;:::o;42288:216::-;42352:9;;;42380:11;;;42327:3;42410:9;;42438:10;;42434:19;;42463:10;;42455:19;;42431:44;42428:70;;;42478:18;;:::i;42509:568::-;-1:-1:-1;;;;;42774:3:53;42770:28;42761:6;42756:3;42752:16;42748:51;42743:3;42736:64;42860:10;42855:3;42851:20;42842:6;42837:3;42833:16;42829:43;42825:1;42820:3;42816:11;42809:64;42903:6;42898:2;42893:3;42889:12;42882:28;42718:3;42939:6;42933:13;42955:75;43023:6;43018:2;43013:3;43009:12;43002:4;42994:6;42990:17;42955:75;:::i;:::-;43050:16;;;;43068:2;43046:25;;42509:568;-1:-1:-1;;;;;42509:568:53:o;43871:532::-;44112:6;44107:3;44100:19;-1:-1:-1;;;;;44175:3:53;44171:28;44162:6;44157:3;44153:16;44149:51;44144:2;44139:3;44135:12;44128:73;44231:6;44226:2;44221:3;44217:12;44210:28;44082:3;44267:6;44261:13;44283:73;44349:6;44344:2;44339:3;44335:12;44330:2;44322:6;44318:15;44283:73;:::i;:::-;44376:16;;;;44394:2;44372:25;;43871:532;-1:-1:-1;;;;;43871:532:53:o;44408:127::-;44469:10;44464:3;44460:20;44457:1;44450:31;44500:4;44497:1;44490:15;44524:4;44521:1;44514:15;44540:251;44610:6;44663:2;44651:9;44642:7;44638:23;44634:32;44631:52;;;44679:1;44676;44669:12;44631:52;44711:9;44705:16;44730:31;44755:5;44730:31;:::i;45199:127::-;45260:10;45255:3;45251:20;45248:1;45241:31;45291:4;45288:1;45281:15;45315:4;45312:1;45305:15;45711:287;45840:3;45878:6;45872:13;45894:66;45953:6;45948:3;45941:4;45933:6;45929:17;45894:66;:::i

Swarm Source

ipfs://0ec0f8a481d538abce24aa9387564cae45723ee88b590c267bd9c634f08ad3a7
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.