ETH Price: $2,949.09 (+1.26%)

Contract

0x908da814cc9725616D410b2978E88fF2fb9482eE

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Transaction Hash
Block
From
To
Process Payload1635767092023-12-25 11:18:31761 days ago1703503111IN
0x908da814...2fb9482eE
0 ETH0.000086130.1
Process Payload1597817892023-12-13 17:49:31772 days ago1702489771IN
0x908da814...2fb9482eE
0 ETH0.00020150.1
Process Payload1494355692023-11-11 17:57:32804 days ago1699725452IN
0x908da814...2fb9482eE
0 ETH0.000176910.1
Process Payload1438544592023-10-25 11:54:32822 days ago1698234872IN
0x908da814...2fb9482eE
0 ETH0.00007470.1
Process Payload1437991622023-10-25 8:02:32822 days ago1698220952IN
0x908da814...2fb9482eE
0 ETH0.000088070.1
Process Payload1436215602023-10-24 18:35:33822 days ago1698172533IN
0x908da814...2fb9482eE
0 ETH0.000098640.1
Process Payload1436178192023-10-24 18:19:31822 days ago1698171571IN
0x908da814...2fb9482eE
0 ETH0.000092940.1
Process Payload1037911532023-06-22 14:15:32946 days ago1687443332IN
0x908da814...2fb9482eE
0 ETH0.000095250.1
Process Payload929688942023-05-21 14:55:36978 days ago1684680936IN
0x908da814...2fb9482eE
0 ETH0.000127620.1
Process Payload787678722023-04-09 20:14:361020 days ago1681071276IN
0x908da814...2fb9482eE
0 ETH0.000085310.1
Process Payload703426422023-03-16 8:14:371045 days ago1678954477IN
0x908da814...2fb9482eE
0 ETH0.000082070.1
Process Payload695843922023-03-14 0:26:351047 days ago1678753595IN
0x908da814...2fb9482eE
0 ETH0.00008790.1
Process Payload655604982023-02-28 23:27:351060 days ago1677626855IN
0x908da814...2fb9482eE
0 ETH0.000104190.1
Process Payload595803862023-02-10 3:47:311079 days ago1676000851IN
0x908da814...2fb9482eE
0 ETH0.000087160.1
Process Payload595788892023-02-10 3:40:321079 days ago1676000432IN
0x908da814...2fb9482eE
0 ETH0.000088960.1
Process Payload595534602023-02-10 1:36:301079 days ago1675992990IN
0x908da814...2fb9482eE
0 ETH0.000090310.1
Process Payload584959422023-02-06 12:01:331083 days ago1675684893IN
0x908da814...2fb9482eE
0 ETH0.000077280.1
Process Payload571772172023-02-01 14:51:301087 days ago1675263090IN
0x908da814...2fb9482eE
0 ETH0.000079920.1
Process Payload571374722023-02-01 11:43:301088 days ago1675251810IN
0x908da814...2fb9482eE
0 ETH0.000075090.1
Process Payload569110472023-01-31 15:10:331088 days ago1675177833IN
0x908da814...2fb9482eE
0 ETH0.000112330.1
Process Payload569108352023-01-31 15:09:331088 days ago1675177773IN
0x908da814...2fb9482eE
0 ETH0.000109150.1
Process Payload565726472023-01-30 8:07:311090 days ago1675066051IN
0x908da814...2fb9482eE
0 ETH0.000074810.1
Process Payload563770162023-01-29 14:09:331091 days ago1675001373IN
0x908da814...2fb9482eE
0 ETH0.000076680.1
Process Payload558253352023-01-27 9:41:301093 days ago1674812490IN
0x908da814...2fb9482eE
0 ETH0.00007020.1
Process Payload555880982023-01-26 11:14:311094 days ago1674731671IN
0x908da814...2fb9482eE
0 ETH0.000070070.1
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
1788280942024-02-08 23:48:47715 days ago1707436127
0x908da814...2fb9482eE
0.00252754 ETH
1788280942024-02-08 23:48:47715 days ago1707436127
0x908da814...2fb9482eE
0.00252754 ETH
1463430022023-11-02 9:49:33814 days ago1698918573
0x908da814...2fb9482eE
0.00095354 ETH
1463430022023-11-02 9:49:33814 days ago1698918573
0x908da814...2fb9482eE
0.00095354 ETH
1451203582023-10-29 12:58:27818 days ago1698584307
0x908da814...2fb9482eE
0.00087895 ETH
1451203582023-10-29 12:58:27818 days ago1698584307
0x908da814...2fb9482eE
0.00087895 ETH
1437097352023-10-25 1:32:47822 days ago1698197567
0x908da814...2fb9482eE
0.00105758 ETH
1437097352023-10-25 1:32:47822 days ago1698197567
0x908da814...2fb9482eE
0.00105758 ETH
1418012662023-10-18 20:37:34828 days ago1697661454
0x908da814...2fb9482eE
0.00076739 ETH
1418012662023-10-18 20:37:34828 days ago1697661454
0x908da814...2fb9482eE
0.00076739 ETH
1417903192023-10-18 19:43:00828 days ago1697658180
0x908da814...2fb9482eE
0.00090248 ETH
1417903192023-10-18 19:43:00828 days ago1697658180
0x908da814...2fb9482eE
0.00090248 ETH
1138252702023-07-22 14:38:19916 days ago1690036699
0x908da814...2fb9482eE
0.00060472 ETH
1138252702023-07-22 14:38:19916 days ago1690036699
0x908da814...2fb9482eE
0.00060472 ETH
1128251782023-07-19 14:26:45919 days ago1689776805
0x908da814...2fb9482eE
0.00127052 ETH
1128251782023-07-19 14:26:45919 days ago1689776805
0x908da814...2fb9482eE
0.00127052 ETH
1020216422023-06-17 7:53:50952 days ago1686988430
0x908da814...2fb9482eE
0.0003908 ETH
1020216422023-06-17 7:53:50952 days ago1686988430
0x908da814...2fb9482eE
0.0003908 ETH
997663292023-06-10 15:41:48958 days ago1686411708
0x908da814...2fb9482eE
0.00037649 ETH
997663292023-06-10 15:41:48958 days ago1686411708
0x908da814...2fb9482eE
0.00037649 ETH
871010222023-05-04 4:59:54996 days ago1683176394
0x908da814...2fb9482eE
0.00052026 ETH
871010222023-05-04 4:59:54996 days ago1683176394
0x908da814...2fb9482eE
0.00052026 ETH
871008172023-05-04 4:59:02996 days ago1683176342
0x908da814...2fb9482eE
0.00052026 ETH
871008172023-05-04 4:59:02996 days ago1683176342
0x908da814...2fb9482eE
0.00052026 ETH
761664522023-04-02 5:15:391028 days ago1680412539
0x908da814...2fb9482eE
0.00056267 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StateHandler

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.14;

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

import {IController} from "../interface/ISource.sol";
import {StateData, CallbackType, PayloadState, TransactionType, InitData, ReturnData} from "../types/lzTypes.sol";

/**
 * @title State Handler
 * @author Zeropoint Labs.
 *
 * Contract to handle state transfer between chains using layerzero.
 */
contract StateHandler is NonblockingLzApp, AccessControl {
    /* ================ Constants =================== */
    bytes32 public constant CORE_CONTRACTS_ROLE =
        keccak256("CORE_CONTRACTS_ROLE");
    bytes32 public constant PROCESSOR_CONTRACTS_ROLE =
        keccak256("PROCESSOR_CONTRACTS_ROLE");

    /* ================ State Variables =================== */
    IController public sourceContract;
    IController public destinationContract;
    uint256 public totalPayloads;

    /// @dev maps state received to source_chain, destination_chain and txId
    mapping(uint256 => bytes) public payload;

    /// @dev maps payload to unique id
    mapping(uint256 => PayloadState) public payloadProcessed;

    /// @dev prevents layerzero relayer from replaying payload
    mapping(uint16 => mapping(uint64 => bool)) public isValid;

    /* ================ Events =================== */
    event StateReceived(
        uint16 srcChainId,
        uint16 dstChainId,
        uint256 txId,
        uint256 payloadId
    );
    event StateUpdated(uint256 payloadId);
    event StateProcessed(uint256 payloadId);

    /* ================ Constructor =================== */
    /**
     * @param endpoint_ is the layer zero endpoint for respective chain.
     */
    constructor(address endpoint_) NonblockingLzApp(endpoint_) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    /* ================ External Functions =================== */
    /**
     * @notice receive enables processing native token transfers into the smart contract.
     * @dev socket.tech fails without a native receive function.
     */
    receive() external payable {}

    /**
     * PREVILAGED ADMIN ONLY FUNCTION
     *
     * @dev would update the router and destination contracts to the state handler
     * @param source_           represents the address of super router on respective chain.
     * @param destination_      represents the super destination on respective chain.
     * @dev set source or destination contract as controller
     * @dev StateHandler doesn't care about sameChainId communication (uses directDep/With for that)
     * @dev SuperRouter needs its StateHandler and SuperDestination needs its StateHandler
     * @dev Source's StateHandler IController is SuperRouter, Destination's StateHandler IController is SuperDestination
     */
    function setHandlerController(IController source_, IController destination_)
        external
        onlyRole(DEFAULT_ADMIN_ROLE)
    {
        sourceContract = source_;
        destinationContract = destination_;
    }

    /**
     * PREVILAGED PROCESSOR ONLY FUNCTION
     * @dev updates the state_data value to the exact amounts post bridge and swap slippage.
     */
    function updateState(uint256 payloadId, uint256[] calldata finalAmounts)
        external
        onlyRole(PROCESSOR_CONTRACTS_ROLE)
    {
        require(
            payloadId <= totalPayloads &&
                payloadProcessed[payloadId] == PayloadState.STORED,
            "State Handler: Invalid Payload ID or Status"
        );
        StateData memory stateData = abi.decode(
            payload[payloadId],
            (StateData)
        );
        require(
            stateData.flag == CallbackType.INIT,
            "State Handler: Invalid Payload Flag"
        );

        InitData memory data = abi.decode(stateData.params, (InitData));

        uint256 l1 = data.amounts.length;
        uint256 l2 = finalAmounts.length;
        require(l1 == l2, "State Handler: Invalid Lengths");

        for (uint256 i = 0; i < l1; i++) {
            uint256 newAmount = finalAmounts[i];
            uint256 maxAmount = data.amounts[i];
            require(newAmount <= maxAmount, "State Handler: Negative Slippage");

            uint256 minAmount = (maxAmount * (10000 - data.maxSlippage[i])) /
                10000;
            require(
                newAmount >= minAmount,
                "State Handler: Slippage Out Of Bounds"
            );
        }

        data.amounts = finalAmounts;
        stateData.params = abi.encode(data);

        payload[payloadId] = abi.encode(stateData);
        payloadProcessed[payloadId] = PayloadState.UPDATED;

        emit StateUpdated(payloadId);
    }

    /**
     * ANYONE CAN INITATE PROCESSING
     *
     * note: update this logic to support no-state-update for withdrawals
     * @dev would execute the received state_messages from super router on source chain.
     * @param payloadId   represents the payload id.
     */
    function processPayload(uint256 payloadId, bytes memory safeGasParam)
        external
        payable
    {
        require(
            payloadId <= totalPayloads,
            "State Handler: Invalid Payload ID"
        );
        bytes memory _payload = payload[payloadId];
        StateData memory data = abi.decode(_payload, (StateData));

        if (data.txType == TransactionType.WITHDRAW) {
            if (data.flag == CallbackType.INIT) {
                require(
                    payloadProcessed[payloadId] == PayloadState.STORED,
                    "State Handler: Invalid Payload State"
                );
                try
                    destinationContract.stateSync{value: msg.value}(_payload)
                {} catch {
                    InitData memory initData = abi.decode(
                        data.params,
                        (InitData)
                    );
                    dispatchState(
                        initData.srcChainId,
                        abi.encode(
                            StateData(
                                TransactionType.WITHDRAW,
                                CallbackType.RETURN,
                                abi.encode(
                                    ReturnData(
                                        false,
                                        initData.srcChainId,
                                        initData.dstChainId,
                                        initData.txId,
                                        initData.amounts
                                    )
                                )
                            )
                        ),
                        safeGasParam
                    );
                }
            } else {
                require(
                    payloadProcessed[payloadId] == PayloadState.STORED,
                    "State Handler: Invalid Payload State"
                );
                sourceContract.stateSync{value: msg.value}(_payload);
            }
        } else {
            if (data.flag == CallbackType.INIT) {
                require(
                    payloadProcessed[payloadId] == PayloadState.UPDATED,
                    "State Handler: Invalid Payload State"
                );
                destinationContract.stateSync{value: msg.value}(_payload);
            } else {
                require(
                    payloadProcessed[payloadId] == PayloadState.STORED,
                    "State Handler: Invalid Payload State"
                );
                sourceContract.stateSync{value: msg.value}(_payload);
            }
        }

        payloadProcessed[payloadId] = PayloadState.PROCESSED;
        emit StateProcessed(payloadId);
    }

    /// @dev allows users to send state to a destination chain contract.
    /// @param dstChainId represents chain id of the destination chain.
    /// @param data represents the state info to be sent.
    /// Note: Add gas calculation to front-end
    /// Note the length of srcAmounts & vaultIds should always be equal.
    function dispatchState(
        uint16 dstChainId,
        bytes memory data,
        bytes memory adapterParam
    ) public payable onlyRole(CORE_CONTRACTS_ROLE) {
        _lzSend(
            dstChainId,
            data,
            payable(_msgSender()),
            address(0x0),
            adapterParam
        );
    }

    /* ================ Internal Functions =================== */
    function _nonblockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal override {
        StateData memory data = abi.decode(_payload, (StateData));

        if (data.flag == CallbackType.INIT) {
            InitData memory initData = abi.decode(data.params, (InitData));
            require(
                !isValid[_srcChainId][_nonce],
                "State Handler: Duplicate Payload"
            );

            totalPayloads++;
            payload[totalPayloads] = _payload;
            isValid[_srcChainId][_nonce] = true;

            emit StateReceived(
                initData.srcChainId,
                initData.dstChainId,
                initData.txId,
                totalPayloads
            );
        } else {
            ReturnData memory returnData = abi.decode(
                data.params,
                (ReturnData)
            );
            require(
                !isValid[_srcChainId][_nonce],
                "State Handler: Duplicate Payload"
            );

            totalPayloads++;
            payload[totalPayloads] = _payload;
            isValid[_srcChainId][_nonce] = true;

            emit StateReceived(_srcChainId, 0, returnData.txId, totalPayloads);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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 v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.14;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(
        uint16 _dstChainId,
        bytes calldata _destination,
        bytes calldata _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes calldata _adapterParams
    ) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        address _dstAddress,
        uint64 _nonce,
        uint256 _gasLimit,
        bytes calldata _payload
    ) external;

    // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress)
        external
        view
        returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress)
        external
        view
        returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(
        uint16 _dstChainId,
        address _userApplication,
        bytes calldata _payload,
        bool _payInZRO,
        bytes calldata _adapterParam
    ) external view returns (uint256 nativeFee, uint256 zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        bytes calldata _payload
    ) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress)
        external
        view
        returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication)
        external
        view
        returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication)
        external
        view
        returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(
        uint16 _version,
        uint16 _chainId,
        address _userApplication,
        uint256 _configType
    ) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication)
        external
        view
        returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication)
        external
        view
        returns (uint16);
}

File 11 of 16 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.14;

interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        uint64 _nonce,
        bytes calldata _payload
    ) external;
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.14;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(
        uint16 _version,
        uint16 _chainId,
        uint256 _configType,
        bytes calldata _config
    ) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress)
        external;
}

// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.14;

interface IController {
    function chainId() external returns (uint16);

    function stateSync(bytes memory _payload) external payable;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interface/ILayerZeroReceiver.sol";
import "../interface/ILayerZeroUserApplicationConfig.sol";
import "../interface/ILayerZeroEndpoint.sol";

/*
 * a generic LzReceiver implementation
 */
abstract contract LzApp is
    Ownable,
    ILayerZeroReceiver,
    ILayerZeroUserApplicationConfig
{
    ILayerZeroEndpoint public immutable lzEndpoint;

    mapping(uint16 => bytes) public trustedRemoteLookup;

    event SetTrustedRemote(uint16 _srcChainId, bytes _srcAddress);

    constructor(address _endpoint) {
        lzEndpoint = ILayerZeroEndpoint(_endpoint);
    }

    function lzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) public virtual override {
        // lzReceive must be called by the endpoint for security
        require(
            _msgSender() == address(lzEndpoint),
            "LzApp: invalid endpoint caller"
        );

        bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];
        // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.
        require(
            _srcAddress.length == trustedRemote.length &&
                keccak256(_srcAddress) == keccak256(trustedRemote),
            "LzApp: invalid source sending contract"
        );

        _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging
    function _blockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal virtual;

    function _lzSend(
        uint16 _dstChainId,
        bytes memory _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes memory _adapterParams
    ) internal virtual {
        bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];
        require(
            trustedRemote.length != 0,
            "LzApp: destination chain is not a trusted source"
        );
        lzEndpoint.send{value: msg.value}(
            _dstChainId,
            trustedRemote,
            _payload,
            _refundAddress,
            _zroPaymentAddress,
            _adapterParams
        );
    }

    //---------------------------UserApplication config----------------------------------------
    function getConfig(
        uint16 _version,
        uint16 _chainId,
        address,
        uint256 _configType
    ) external view returns (bytes memory) {
        return
            lzEndpoint.getConfig(
                _version,
                _chainId,
                address(this),
                _configType
            );
    }

    // generic config for LayerZero user Application
    function setConfig(
        uint16 _version,
        uint16 _chainId,
        uint256 _configType,
        bytes calldata _config
    ) external override onlyOwner {
        lzEndpoint.setConfig(_version, _chainId, _configType, _config);
    }

    function setSendVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setSendVersion(_version);
    }

    function setReceiveVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setReceiveVersion(_version);
    }

    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress)
        external
        override
        onlyOwner
    {
        lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);
    }

    // allow owner to set it multiple times.
    function setTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress)
        external
        onlyOwner
    {
        trustedRemoteLookup[_srcChainId] = _srcAddress;
        emit SetTrustedRemote(_srcChainId, _srcAddress);
    }

    //--------------------------- VIEW FUNCTION ----------------------------------------

    function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress)
        external
        view
        returns (bool)
    {
        bytes memory trustedSource = trustedRemoteLookup[_srcChainId];
        return keccak256(trustedSource) == keccak256(_srcAddress);
    }
}

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

import "./LzApp.sol";

/*
 * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel
 * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking
 * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)
 */
abstract contract NonblockingLzApp is LzApp {
    constructor(address _endpoint) LzApp(_endpoint) {}

    mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))
        public failedMessages;

    event MessageFailed(
        uint16 _srcChainId,
        bytes _srcAddress,
        uint64 _nonce,
        bytes _payload
    );

    // overriding the virtual function in LzReceiver
    function _blockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal virtual override {
        // try-catch all errors/exceptions
        try
            this.nonblockingLzReceive(
                _srcChainId,
                _srcAddress,
                _nonce,
                _payload
            )
        {
            // do nothing
        } catch {
            // error / exception
            failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(
                _payload
            );
            emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
        }
    }

    function nonblockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) public virtual {
        // only internal transaction
        require(
            _msgSender() == address(this),
            "NonblockingLzApp: caller must be LzApp"
        );
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    //@notice override this function
    function _nonblockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal virtual;

    function retryMessage(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) public payable virtual {
        // assert there is message to retry
        bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];
        require(
            payloadHash != bytes32(0),
            "NonblockingLzApp: no stored message"
        );
        require(
            keccak256(_payload) == payloadHash,
            "NonblockingLzApp: invalid payload"
        );
        // clear the stored message
        failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);
        // execute the message. revert if it fails again
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }
}

File 16 of 16 : lzTypes.sol
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.14;

/// @notice We should optimize those types more
enum TransactionType {
    DEPOSIT,
    WITHDRAW
}

enum CallbackType {
    INIT,
    RETURN
}

enum PayloadState {
    STORED,
    UPDATED,
    PROCESSED
}

struct StateReq {
    uint16 dstChainId;
    uint256[] amounts;
    uint256[] vaultIds;
    uint256[] maxSlippage;
    bytes adapterParam;
    uint256 msgValue;
}

/// Created during deposit by contract from Liq+StateReqs
/// @dev using this for communication between src & dst transfers
struct StateData {
    TransactionType txType;
    CallbackType flag;
    bytes params;
}

struct InitData {
    uint16 srcChainId;
    uint16 dstChainId;
    address user;
    uint256[] vaultIds;
    uint256[] amounts;
    uint256[] maxSlippage;
    uint256 txId;
    bytes liqData;
}

struct ReturnData {
    bool status;
    uint16 srcChainId;
    uint16 dstChainId;
    uint256 txId;
    uint256[] amounts;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"endpoint_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"MessageFailed","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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"SetTrustedRemote","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"payloadId","type":"uint256"}],"name":"StateProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"srcChainId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"dstChainId","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"txId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"payloadId","type":"uint256"}],"name":"StateReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"payloadId","type":"uint256"}],"name":"StateUpdated","type":"event"},{"inputs":[],"name":"CORE_CONTRACTS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROCESSOR_CONTRACTS_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"destinationContract","outputs":[{"internalType":"contract IController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"adapterParam","type":"bytes"}],"name":"dispatchState","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"isTrustedRemote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"isValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzEndpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"nonblockingLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"payload","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"payloadProcessed","outputs":[{"internalType":"enum PayloadState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"payloadId","type":"uint256"},{"internalType":"bytes","name":"safeGasParam","type":"bytes"}],"name":"processPayload","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IController","name":"source_","type":"address"},{"internalType":"contract IController","name":"destination_","type":"address"}],"name":"setHandlerController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sourceContract","outputs":[{"internalType":"contract IController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPayloads","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"payloadId","type":"uint256"},{"internalType":"uint256[]","name":"finalAmounts","type":"uint256[]"}],"name":"updateState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a06040523480156200001157600080fd5b506040516200356c3803806200356c833981016040819052620000349162000166565b8080620000413362000062565b6001600160a01b0316608052506200005b600033620000b2565b5062000198565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000be8282620000c2565b5050565b60008281526003602090815260408083206001600160a01b038516845290915290205460ff16620000be5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001223390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000602082840312156200017957600080fd5b81516001600160a01b03811681146200019157600080fd5b9392505050565b608051613387620001e56000396000818161056a015281816106ea01528181610920015281816109a201528181610baa015281816116fa01528181611a110152611df101526133876000f3fe6080604052600436106101c75760003560e01c806388435527116100f8578063bb2e1c1311610090578063bb2e1c13146105ac578063bb4e5223146105e0578063cbed8b9c14610614578063d1deba1f14610634578063d547741f14610647578063e941d69414610667578063eb8d72b714610687578063f2fde38b146106a7578063f5ecbdbc146106c757600080fd5b806388435527146104815780638da5cb5b146104bc57806391d14854146104da578063a217fddf146104fa578063a29214de1461050f578063a444ae4114610525578063b1a8f7c714610545578063b353aaa714610558578063b3c70df51461058c57600080fd5b806337e6ca021161016b57806337e6ca02146103085780633d8b38f61461031b57806342d65a8d1461033b578063596b42901461035b5780635b8c41e61461039857806366ad5c8a146103e7578063715018a6146104075780637533d7881461041c57806375bd68631461044957600080fd5b80621d3567146101d357806301ffc9a7146101f55780630302ff9e1461022a57806307e0db171461024a57806310ddb1371461026a578063248a9ca31461028a5780632f2ff15d146102c857806336568abe146102e857600080fd5b366101ce57005b600080fd5b3480156101df57600080fd5b506101f36101ee3660046125a4565b6106e7565b005b34801561020157600080fd5b5061021561021036600461262a565b61088e565b60405190151581526020015b60405180910390f35b34801561023657600080fd5b506101f3610245366004612669565b6108c5565b34801561025657600080fd5b506101f36102653660046126a2565b6108ff565b34801561027657600080fd5b506101f36102853660046126a2565b610981565b34801561029657600080fd5b506102ba6102a53660046126bf565b60009081526003602052604090206001015490565b604051908152602001610221565b3480156102d457600080fd5b506101f36102e33660046126d8565b6109d9565b3480156102f457600080fd5b506101f36103033660046126d8565b610a03565b6101f36103163660046126fd565b610a81565b34801561032757600080fd5b506102156103363660046127ba565b610abf565b34801561034757600080fd5b506101f36103563660046127ba565b610b8b565b34801561036757600080fd5b5061038b6103763660046126bf565b60086020526000908152604090205460ff1681565b6040516102219190612824565b3480156103a457600080fd5b506102ba6103b336600461283e565b6002602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156103f357600080fd5b506101f36104023660046125a4565b610c1a565b34801561041357600080fd5b506101f3610c84565b34801561042857600080fd5b5061043c6104373660046126a2565b610c98565b60405161022191906128f5565b34801561045557600080fd5b50600554610469906001600160a01b031681565b6040516001600160a01b039091168152602001610221565b34801561048d57600080fd5b5061021561049c366004612908565b600960209081526000928352604080842090915290825290205460ff1681565b3480156104c857600080fd5b506000546001600160a01b0316610469565b3480156104e657600080fd5b506102156104f53660046126d8565b610d32565b34801561050657600080fd5b506102ba600081565b34801561051b57600080fd5b506102ba60065481565b34801561053157600080fd5b50600454610469906001600160a01b031681565b6101f361055336600461293d565b610d5d565b34801561056457600080fd5b506104697f000000000000000000000000000000000000000000000000000000000000000081565b34801561059857600080fd5b506101f36105a7366004612983565b611241565b3480156105b857600080fd5b506102ba7f2030565476ef23eb21f6c1f68075f5a89b325631df98f5793acd3297f9b8012381565b3480156105ec57600080fd5b506102ba7fa42149a6471a063c55443ec2d662187b225ca21a07307f6b6510a4e432fb108381565b34801561062057600080fd5b506101f361062f366004612a01565b6116db565b6101f36106423660046125a4565b611770565b34801561065357600080fd5b506101f36106623660046126d8565b6118c2565b34801561067357600080fd5b5061043c6106823660046126bf565b6118e7565b34801561069357600080fd5b506101f36106a23660046127ba565b611900565b3480156106b357600080fd5b506101f36106c2366004612a73565b611967565b3480156106d357600080fd5b5061043c6106e2366004612a90565b6119e0565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146107645760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff84166000908152600160205260408120805461078290612ae1565b80601f01602080910402602001604051908101604052809291908181526020018280546107ae90612ae1565b80156107fb5780601f106107d0576101008083540402835291602001916107fb565b820191906000526020600020905b8154815290600101906020018083116107de57829003601f168201915b5050505050905080518451148015610820575080805190602001208480519060200120145b61087b5760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b606482015260840161075b565b61088785858585611a91565b5050505050565b60006001600160e01b03198216637965db0b60e01b14806108bf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006108d081611b82565b50600480546001600160a01b039384166001600160a01b03199182161790915560058054929093169116179055565b610907611b8c565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561096d57600080fd5b505af1158015610887573d6000803e3d6000fd5b610989611b8c565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610953565b6000828152600360205260409020600101546109f481611b82565b6109fe8383611be6565b505050565b6001600160a01b0381163314610a735760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161075b565b610a7d8282611c6c565b5050565b7fa42149a6471a063c55443ec2d662187b225ca21a07307f6b6510a4e432fb1083610aab81611b82565b610ab9848433600086611cd3565b50505050565b61ffff831660009081526001602052604081208054829190610ae090612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0c90612ae1565b8015610b595780601f10610b2e57610100808354040283529160200191610b59565b820191906000526020600020905b815481529060010190602001808311610b3c57829003601f168201915b505050505090508383604051610b70929190612b1b565b60405180910390208180519060200120149150509392505050565b610b93611b8c565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610be390869086908690600401612b54565b600060405180830381600087803b158015610bfd57600080fd5b505af1158015610c11573d6000803e3d6000fd5b50505050505050565b333014610c785760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b606482015260840161075b565b610ab984848484611e6c565b610c8c611b8c565b610c966000612100565b565b60016020526000908152604090208054610cb190612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdd90612ae1565b8015610d2a5780601f10610cff57610100808354040283529160200191610d2a565b820191906000526020600020905b815481529060010190602001808311610d0d57829003601f168201915b505050505081565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600654821115610db95760405162461bcd60e51b815260206004820152602160248201527f53746174652048616e646c65723a20496e76616c6964205061796c6f616420496044820152601160fa1b606482015260840161075b565b60008281526007602052604081208054610dd290612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfe90612ae1565b8015610e4b5780601f10610e2057610100808354040283529160200191610e4b565b820191906000526020600020905b815481529060010190602001808311610e2e57829003601f168201915b50505050509050600081806020019051810190610e689190612bcc565b9050600181516001811115610e7f57610e7f61280e565b036110b957600081602001516001811115610e9c57610e9c61280e565b036110115760008481526008602052604081205460ff166002811115610ec457610ec461280e565b14610ee15760405162461bcd60e51b815260040161075b90612c74565b600554604051636466cd2360e01b81526001600160a01b0390911690636466cd23903490610f139086906004016128f5565b6000604051808303818588803b158015610f2c57600080fd5b505af193505050508015610f3e575060015b61100c5760008160400151806020019051810190610f5c9190612d4d565b80516040805160608101909152919250611006918060018152602001600181526020016040518060a00160405280600015158152602001866000015161ffff168152602001866020015161ffff1681526020018660c0015181526020018660800151815250604051602001610fd19190612e9e565b60408051601f19818403018152918152915251610ff19190602001612efd565b60405160208183030381529060405286610a81565b506111ee565b6111ee565b60008481526008602052604081205460ff1660028111156110345761103461280e565b146110515760405162461bcd60e51b815260040161075b90612c74565b60048054604051636466cd2360e01b81526001600160a01b0390911691636466cd23913491611082918791016128f5565b6000604051808303818588803b15801561109b57600080fd5b505af11580156110af573d6000803e3d6000fd5b50505050506111ee565b6000816020015160018111156110d1576110d161280e565b0361114a57600160008581526008602052604090205460ff1660028111156110fb576110fb61280e565b146111185760405162461bcd60e51b815260040161075b90612c74565b600554604051636466cd2360e01b81526001600160a01b0390911690636466cd239034906110829086906004016128f5565b60008481526008602052604081205460ff16600281111561116d5761116d61280e565b1461118a5760405162461bcd60e51b815260040161075b90612c74565b60048054604051636466cd2360e01b81526001600160a01b0390911691636466cd239134916111bb918791016128f5565b6000604051808303818588803b1580156111d457600080fd5b505af11580156111e8573d6000803e3d6000fd5b50505050505b600084815260086020908152604091829020805460ff1916600217905590518581527f4520e0869fa7cceaccae0f3a6b500d8cfebef569873afd0ca81014d84c3d64c4910160405180910390a150505050565b7f2030565476ef23eb21f6c1f68075f5a89b325631df98f5793acd3297f9b8012361126b81611b82565b600654841115801561129d575060008481526008602052604081205460ff16600281111561129b5761129b61280e565b145b6112fd5760405162461bcd60e51b815260206004820152602b60248201527f53746174652048616e646c65723a20496e76616c6964205061796c6f6164204960448201526a44206f722053746174757360a81b606482015260840161075b565b6000848152600760205260408120805461131690612ae1565b80601f016020809104026020016040519081016040528092919081815260200182805461134290612ae1565b801561138f5780601f106113645761010080835404028352916020019161138f565b820191906000526020600020905b81548152906001019060200180831161137257829003601f168201915b50505050508060200190518101906113a79190612bcc565b90506000816020015160018111156113c1576113c161280e565b1461141a5760405162461bcd60e51b815260206004820152602360248201527f53746174652048616e646c65723a20496e76616c6964205061796c6f616420466044820152626c616760e81b606482015260840161075b565b600081604001518060200190518101906114349190612d4d565b6080810151519091508480821461148d5760405162461bcd60e51b815260206004820152601e60248201527f53746174652048616e646c65723a20496e76616c6964204c656e677468730000604482015260640161075b565b60005b828110156115e15760008888838181106114ac576114ac612f42565b9050602002013590506000856080015183815181106114cd576114cd612f42565b60200260200101519050808211156115275760405162461bcd60e51b815260206004820181905260248201527f53746174652048616e646c65723a204e6567617469766520536c697070616765604482015260640161075b565b60006127108760a00151858151811061154257611542612f42565b60200260200101516127106115579190612f6e565b6115619084612f85565b61156b9190612fa4565b9050808310156115cb5760405162461bcd60e51b815260206004820152602560248201527f53746174652048616e646c65723a20536c697070616765204f7574204f6620426044820152646f756e647360d81b606482015260840161075b565b50505080806115d990612fc6565b915050611490565b50868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050608084015260405161162b908490602001612fdf565b6040516020818303038152906040528460400181905250836040516020016116539190612efd565b60408051601f1981840301815291815260008a81526007602090815291902082516116839391929091019061235d565b50600088815260086020908152604091829020805460ff1916600117905590518981527f118f8ba10d647100925b2343f3030d110623f17b284ced4316cbe4b8f138883f910160405180910390a15050505050505050565b6116e3611b8c565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c9061173790889088908890889088906004016130a9565b600060405180830381600087803b15801561175157600080fd5b505af1158015611765573d6000803e3d6000fd5b505050505050505050565b61ffff841660009081526002602052604080822090516117919086906130d7565b90815260408051602092819003830190206001600160401b038616600090815292529020549050806118115760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b606482015260840161075b565b8151602083012081146118705760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b606482015260840161075b565b61ffff851660009081526002602052604080822090516118919087906130d7565b90815260408051602092819003830190206001600160401b0387166000908152925290205561088785858585611e6c565b6000828152600360205260409020600101546118dd81611b82565b6109fe8383611c6c565b60076020526000908152604090208054610cb190612ae1565b611908611b8c565b61ffff831660009081526001602052604090206119269083836123e1565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161195a93929190612b54565b60405180910390a1505050565b61196f611b8c565b6001600160a01b0381166119d45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161075b565b6119dd81612100565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a8891908101906130f3565b95945050505050565b604051633356ae4560e11b815230906366ad5c8a90611aba908790879087908790600401613127565b600060405180830381600087803b158015611ad457600080fd5b505af1925050508015611ae5575060015b610ab9578080519060200120600260008661ffff1661ffff16815260200190815260200160002084604051611b1a91906130d7565b9081526040805191829003602090810183206001600160401b0387166000908152915220919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90611b75908690869086908690613127565b60405180910390a1610ab9565b6119dd8133612150565b6000546001600160a01b03163314610c965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161075b565b611bf08282610d32565b610a7d5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c283390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611c768282610d32565b15610a7d5760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61ffff851660009081526001602052604081208054611cf190612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612ae1565b8015611d6a5780601f10611d3f57610100808354040283529160200191611d6a565b820191906000526020600020905b815481529060010190602001808311611d4d57829003601f168201915b505050505090508051600003611ddb5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b606482015260840161075b565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100903490611e32908a9086908b908b908b908b90600401613165565b6000604051808303818588803b158015611e4b57600080fd5b505af1158015611e5f573d6000803e3d6000fd5b5050505050505050505050565b600081806020019051810190611e829190612bcc565b9050600081602001516001811115611e9c57611e9c61280e565b03611fdc5760008160400151806020019051810190611ebb9190612d4d565b61ffff871660009081526009602090815260408083206001600160401b038916845290915290205490915060ff1615611f065760405162461bcd60e51b815260040161075b906131cc565b60068054906000611f1683612fc6565b909155505060065460009081526007602090815260409091208451611f3d9286019061235d565b5061ffff861660009081526009602090815260408083206001600160401b0388168452825291829020805460ff1916600117905582519083015160c084015160065493517fd8d8e7695b4e8636df3a2db9000f86bb231572576f51d55489a27f182071247c94611fce9493929161ffff94851681529290931660208301526040820152606081019190915260800190565b60405180910390a150610887565b60008160400151806020019051810190611ff69190613201565b61ffff871660009081526009602090815260408083206001600160401b038916845290915290205490915060ff16156120415760405162461bcd60e51b815260040161075b906131cc565b6006805490600061205183612fc6565b9091555050600654600090815260076020908152604090912084516120789286019061235d565b5061ffff861660008181526009602090815260408083206001600160401b03891684528252808320805460ff1916600117905560608581015160065483519687529386019490945290840192909252908201527fd8d8e7695b4e8636df3a2db9000f86bb231572576f51d55489a27f182071247c9060800160405180910390a1505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61215a8282610d32565b610a7d57612167816121a9565b6121728360206121bb565b6040516020016121839291906132b3565b60408051601f198184030181529082905262461bcd60e51b825261075b916004016128f5565b60606108bf6001600160a01b03831660145b606060006121ca836002612f85565b6121d5906002613322565b6001600160401b038111156121ec576121ec61247a565b6040519080825280601f01601f191660200182016040528015612216576020820181803683370190505b509050600360fc1b8160008151811061223157612231612f42565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061226057612260612f42565b60200101906001600160f81b031916908160001a9053506000612284846002612f85565b61228f906001613322565b90505b6001811115612307576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106122c3576122c3612f42565b1a60f81b8282815181106122d9576122d9612f42565b60200101906001600160f81b031916908160001a90535060049490941c936123008161333a565b9050612292565b5083156123565760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161075b565b9392505050565b82805461236990612ae1565b90600052602060002090601f01602090048101928261238b57600085556123d1565b82601f106123a457805160ff19168380011785556123d1565b828001600101855582156123d1579182015b828111156123d15782518255916020019190600101906123b6565b506123dd929150612455565b5090565b8280546123ed90612ae1565b90600052602060002090601f01602090048101928261240f57600085556123d1565b82601f106124285782800160ff198235161785556123d1565b828001600101855582156123d1579182015b828111156123d157823582559160200191906001019061243a565b5b808211156123dd5760008155600101612456565b61ffff811681146119dd57600080fd5b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b03811182821017156124b3576124b361247a565b60405290565b60405160a081016001600160401b03811182821017156124b3576124b361247a565b604051601f8201601f191681016001600160401b03811182821017156125035761250361247a565b604052919050565b60006001600160401b038211156125245761252461247a565b50601f01601f191660200190565b600082601f83011261254357600080fd5b81356125566125518261250b565b6124db565b81815284602083860101111561256b57600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160401b038116811461259f57600080fd5b919050565b600080600080608085870312156125ba57600080fd5b84356125c58161246a565b935060208501356001600160401b03808211156125e157600080fd5b6125ed88838901612532565b94506125fb60408801612588565b9350606087013591508082111561261157600080fd5b5061261e87828801612532565b91505092959194509250565b60006020828403121561263c57600080fd5b81356001600160e01b03198116811461235657600080fd5b6001600160a01b03811681146119dd57600080fd5b6000806040838503121561267c57600080fd5b823561268781612654565b9150602083013561269781612654565b809150509250929050565b6000602082840312156126b457600080fd5b81356123568161246a565b6000602082840312156126d157600080fd5b5035919050565b600080604083850312156126eb57600080fd5b82359150602083013561269781612654565b60008060006060848603121561271257600080fd5b833561271d8161246a565b925060208401356001600160401b038082111561273957600080fd5b61274587838801612532565b9350604086013591508082111561275b57600080fd5b5061276886828701612532565b9150509250925092565b60008083601f84011261278457600080fd5b5081356001600160401b0381111561279b57600080fd5b6020830191508360208285010111156127b357600080fd5b9250929050565b6000806000604084860312156127cf57600080fd5b83356127da8161246a565b925060208401356001600160401b038111156127f557600080fd5b61280186828701612772565b9497909650939450505050565b634e487b7160e01b600052602160045260246000fd5b60208101600383106128385761283861280e565b91905290565b60008060006060848603121561285357600080fd5b833561285e8161246a565b925060208401356001600160401b0381111561287957600080fd5b61288586828701612532565b92505061289460408501612588565b90509250925092565b60005b838110156128b85781810151838201526020016128a0565b83811115610ab95750506000910152565b600081518084526128e181602086016020860161289d565b601f01601f19169290920160200192915050565b60208152600061235660208301846128c9565b6000806040838503121561291b57600080fd5b82356129268161246a565b915061293460208401612588565b90509250929050565b6000806040838503121561295057600080fd5b8235915060208301356001600160401b0381111561296d57600080fd5b61297985828601612532565b9150509250929050565b60008060006040848603121561299857600080fd5b8335925060208401356001600160401b03808211156129b657600080fd5b818601915086601f8301126129ca57600080fd5b8135818111156129d957600080fd5b8760208260051b85010111156129ee57600080fd5b6020830194508093505050509250925092565b600080600080600060808688031215612a1957600080fd5b8535612a248161246a565b94506020860135612a348161246a565b93506040860135925060608601356001600160401b03811115612a5657600080fd5b612a6288828901612772565b969995985093965092949392505050565b600060208284031215612a8557600080fd5b813561235681612654565b60008060008060808587031215612aa657600080fd5b8435612ab18161246a565b93506020850135612ac18161246a565b92506040850135612ad181612654565b9396929550929360600135925050565b600181811c90821680612af557607f821691505b602082108103612b1557634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611a88604083018486612b2b565b600281106119dd57600080fd5b600082601f830112612b9057600080fd5b8151612b9e6125518261250b565b818152846020838601011115612bb357600080fd5b612bc482602083016020870161289d565b949350505050565b600060208284031215612bde57600080fd5b81516001600160401b0380821115612bf557600080fd5b9083019060608286031215612c0957600080fd5b604051606081018181108382111715612c2457612c2461247a565b6040528251612c3281612b72565b81526020830151612c4281612b72565b6020820152604083015182811115612c5957600080fd5b612c6587828601612b7f565b60408301525095945050505050565b60208082526024908201527f53746174652048616e646c65723a20496e76616c6964205061796c6f616420536040820152637461746560e01b606082015260800190565b805161259f8161246a565b805161259f81612654565b600082601f830112612cdf57600080fd5b815160206001600160401b03821115612cfa57612cfa61247a565b8160051b612d098282016124db565b9283528481018201928281019087851115612d2357600080fd5b83870192505b84831015612d4257825182529183019190830190612d29565b979650505050505050565b600060208284031215612d5f57600080fd5b81516001600160401b0380821115612d7657600080fd5b908301906101008286031215612d8b57600080fd5b612d93612490565b612d9c83612cb8565b8152612daa60208401612cb8565b6020820152612dbb60408401612cc3565b6040820152606083015182811115612dd257600080fd5b612dde87828601612cce565b606083015250608083015182811115612df657600080fd5b612e0287828601612cce565b60808301525060a083015182811115612e1a57600080fd5b612e2687828601612cce565b60a08301525060c083015160c082015260e083015182811115612e4857600080fd5b612e5487828601612b7f565b60e08301525095945050505050565b600081518084526020808501945080840160005b83811015612e9357815187529582019590820190600101612e77565b509495945050505050565b602081528151151560208201526000602083015161ffff8082166040850152806040860151166060850152505060608301516080830152608083015160a080840152612bc460c0840182612e63565b600281106119dd576119dd61280e565b6020815260008251612f0e81612eed565b806020840152506020830151612f2381612eed565b806040840152506040830151606080840152612bc460808401826128c9565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015612f8057612f80612f58565b500390565b6000816000190483118215151615612f9f57612f9f612f58565b500290565b600082612fc157634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612fd857612fd8612f58565b5060010190565b60208152612ff460208201835161ffff169052565b6000602083015161300b604084018261ffff169052565b5060408301516001600160a01b038116606084015250606083015161010080608085015261303d610120850183612e63565b91506080850151601f19808685030160a087015261305b8483612e63565b935060a08701519150808685030160c08701526130788483612e63565b935060c087015160e087015260e087015191508086850301838701525061309f83826128c9565b9695505050505050565b600061ffff808816835280871660208401525084604083015260806060830152612d42608083018486612b2b565b600082516130e981846020870161289d565b9190910192915050565b60006020828403121561310557600080fd5b81516001600160401b0381111561311b57600080fd5b612bc484828501612b7f565b61ffff8516815260806020820152600061314460808301866128c9565b6001600160401b03851660408401528281036060840152612d4281856128c9565b61ffff8716815260c06020820152600061318260c08301886128c9565b828103604084015261319481886128c9565b6001600160a01b0387811660608601528616608085015283810360a085015290506131bf81856128c9565b9998505050505050505050565b6020808252818101527f53746174652048616e646c65723a204475706c6963617465205061796c6f6164604082015260600190565b60006020828403121561321357600080fd5b81516001600160401b038082111561322a57600080fd5b9083019060a0828603121561323e57600080fd5b6132466124b9565b8251801515811461325657600080fd5b815260208301516132668161246a565b602082015261327760408401612cb8565b60408201526060830151606082015260808301518281111561329857600080fd5b6132a487828601612cce565b60808301525095945050505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516132e581601785016020880161289d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161331681602884016020880161289d565b01602801949350505050565b6000821982111561333557613335612f58565b500190565b60008161334957613349612f58565b50600019019056fea264697066735822122065e5db4db374afa3219f79073a9d88f0c997bc6638268027a1b66e3ffd4d694f64736f6c634300080e00330000000000000000000000003c2269811836af69497e5f486a85d7316753cf62

Deployed Bytecode

0x6080604052600436106101c75760003560e01c806388435527116100f8578063bb2e1c1311610090578063bb2e1c13146105ac578063bb4e5223146105e0578063cbed8b9c14610614578063d1deba1f14610634578063d547741f14610647578063e941d69414610667578063eb8d72b714610687578063f2fde38b146106a7578063f5ecbdbc146106c757600080fd5b806388435527146104815780638da5cb5b146104bc57806391d14854146104da578063a217fddf146104fa578063a29214de1461050f578063a444ae4114610525578063b1a8f7c714610545578063b353aaa714610558578063b3c70df51461058c57600080fd5b806337e6ca021161016b57806337e6ca02146103085780633d8b38f61461031b57806342d65a8d1461033b578063596b42901461035b5780635b8c41e61461039857806366ad5c8a146103e7578063715018a6146104075780637533d7881461041c57806375bd68631461044957600080fd5b80621d3567146101d357806301ffc9a7146101f55780630302ff9e1461022a57806307e0db171461024a57806310ddb1371461026a578063248a9ca31461028a5780632f2ff15d146102c857806336568abe146102e857600080fd5b366101ce57005b600080fd5b3480156101df57600080fd5b506101f36101ee3660046125a4565b6106e7565b005b34801561020157600080fd5b5061021561021036600461262a565b61088e565b60405190151581526020015b60405180910390f35b34801561023657600080fd5b506101f3610245366004612669565b6108c5565b34801561025657600080fd5b506101f36102653660046126a2565b6108ff565b34801561027657600080fd5b506101f36102853660046126a2565b610981565b34801561029657600080fd5b506102ba6102a53660046126bf565b60009081526003602052604090206001015490565b604051908152602001610221565b3480156102d457600080fd5b506101f36102e33660046126d8565b6109d9565b3480156102f457600080fd5b506101f36103033660046126d8565b610a03565b6101f36103163660046126fd565b610a81565b34801561032757600080fd5b506102156103363660046127ba565b610abf565b34801561034757600080fd5b506101f36103563660046127ba565b610b8b565b34801561036757600080fd5b5061038b6103763660046126bf565b60086020526000908152604090205460ff1681565b6040516102219190612824565b3480156103a457600080fd5b506102ba6103b336600461283e565b6002602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156103f357600080fd5b506101f36104023660046125a4565b610c1a565b34801561041357600080fd5b506101f3610c84565b34801561042857600080fd5b5061043c6104373660046126a2565b610c98565b60405161022191906128f5565b34801561045557600080fd5b50600554610469906001600160a01b031681565b6040516001600160a01b039091168152602001610221565b34801561048d57600080fd5b5061021561049c366004612908565b600960209081526000928352604080842090915290825290205460ff1681565b3480156104c857600080fd5b506000546001600160a01b0316610469565b3480156104e657600080fd5b506102156104f53660046126d8565b610d32565b34801561050657600080fd5b506102ba600081565b34801561051b57600080fd5b506102ba60065481565b34801561053157600080fd5b50600454610469906001600160a01b031681565b6101f361055336600461293d565b610d5d565b34801561056457600080fd5b506104697f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6281565b34801561059857600080fd5b506101f36105a7366004612983565b611241565b3480156105b857600080fd5b506102ba7f2030565476ef23eb21f6c1f68075f5a89b325631df98f5793acd3297f9b8012381565b3480156105ec57600080fd5b506102ba7fa42149a6471a063c55443ec2d662187b225ca21a07307f6b6510a4e432fb108381565b34801561062057600080fd5b506101f361062f366004612a01565b6116db565b6101f36106423660046125a4565b611770565b34801561065357600080fd5b506101f36106623660046126d8565b6118c2565b34801561067357600080fd5b5061043c6106823660046126bf565b6118e7565b34801561069357600080fd5b506101f36106a23660046127ba565b611900565b3480156106b357600080fd5b506101f36106c2366004612a73565b611967565b3480156106d357600080fd5b5061043c6106e2366004612a90565b6119e0565b337f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b0316146107645760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff84166000908152600160205260408120805461078290612ae1565b80601f01602080910402602001604051908101604052809291908181526020018280546107ae90612ae1565b80156107fb5780601f106107d0576101008083540402835291602001916107fb565b820191906000526020600020905b8154815290600101906020018083116107de57829003601f168201915b5050505050905080518451148015610820575080805190602001208480519060200120145b61087b5760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b606482015260840161075b565b61088785858585611a91565b5050505050565b60006001600160e01b03198216637965db0b60e01b14806108bf57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006108d081611b82565b50600480546001600160a01b039384166001600160a01b03199182161790915560058054929093169116179055565b610907611b8c565b6040516307e0db1760e01b815261ffff821660048201527f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561096d57600080fd5b505af1158015610887573d6000803e3d6000fd5b610989611b8c565b6040516310ddb13760e01b815261ffff821660048201527f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b0316906310ddb13790602401610953565b6000828152600360205260409020600101546109f481611b82565b6109fe8383611be6565b505050565b6001600160a01b0381163314610a735760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161075b565b610a7d8282611c6c565b5050565b7fa42149a6471a063c55443ec2d662187b225ca21a07307f6b6510a4e432fb1083610aab81611b82565b610ab9848433600086611cd3565b50505050565b61ffff831660009081526001602052604081208054829190610ae090612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0c90612ae1565b8015610b595780601f10610b2e57610100808354040283529160200191610b59565b820191906000526020600020905b815481529060010190602001808311610b3c57829003601f168201915b505050505090508383604051610b70929190612b1b565b60405180910390208180519060200120149150509392505050565b610b93611b8c565b6040516342d65a8d60e01b81526001600160a01b037f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf6216906342d65a8d90610be390869086908690600401612b54565b600060405180830381600087803b158015610bfd57600080fd5b505af1158015610c11573d6000803e3d6000fd5b50505050505050565b333014610c785760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b606482015260840161075b565b610ab984848484611e6c565b610c8c611b8c565b610c966000612100565b565b60016020526000908152604090208054610cb190612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054610cdd90612ae1565b8015610d2a5780601f10610cff57610100808354040283529160200191610d2a565b820191906000526020600020905b815481529060010190602001808311610d0d57829003601f168201915b505050505081565b60009182526003602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600654821115610db95760405162461bcd60e51b815260206004820152602160248201527f53746174652048616e646c65723a20496e76616c6964205061796c6f616420496044820152601160fa1b606482015260840161075b565b60008281526007602052604081208054610dd290612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054610dfe90612ae1565b8015610e4b5780601f10610e2057610100808354040283529160200191610e4b565b820191906000526020600020905b815481529060010190602001808311610e2e57829003601f168201915b50505050509050600081806020019051810190610e689190612bcc565b9050600181516001811115610e7f57610e7f61280e565b036110b957600081602001516001811115610e9c57610e9c61280e565b036110115760008481526008602052604081205460ff166002811115610ec457610ec461280e565b14610ee15760405162461bcd60e51b815260040161075b90612c74565b600554604051636466cd2360e01b81526001600160a01b0390911690636466cd23903490610f139086906004016128f5565b6000604051808303818588803b158015610f2c57600080fd5b505af193505050508015610f3e575060015b61100c5760008160400151806020019051810190610f5c9190612d4d565b80516040805160608101909152919250611006918060018152602001600181526020016040518060a00160405280600015158152602001866000015161ffff168152602001866020015161ffff1681526020018660c0015181526020018660800151815250604051602001610fd19190612e9e565b60408051601f19818403018152918152915251610ff19190602001612efd565b60405160208183030381529060405286610a81565b506111ee565b6111ee565b60008481526008602052604081205460ff1660028111156110345761103461280e565b146110515760405162461bcd60e51b815260040161075b90612c74565b60048054604051636466cd2360e01b81526001600160a01b0390911691636466cd23913491611082918791016128f5565b6000604051808303818588803b15801561109b57600080fd5b505af11580156110af573d6000803e3d6000fd5b50505050506111ee565b6000816020015160018111156110d1576110d161280e565b0361114a57600160008581526008602052604090205460ff1660028111156110fb576110fb61280e565b146111185760405162461bcd60e51b815260040161075b90612c74565b600554604051636466cd2360e01b81526001600160a01b0390911690636466cd239034906110829086906004016128f5565b60008481526008602052604081205460ff16600281111561116d5761116d61280e565b1461118a5760405162461bcd60e51b815260040161075b90612c74565b60048054604051636466cd2360e01b81526001600160a01b0390911691636466cd239134916111bb918791016128f5565b6000604051808303818588803b1580156111d457600080fd5b505af11580156111e8573d6000803e3d6000fd5b50505050505b600084815260086020908152604091829020805460ff1916600217905590518581527f4520e0869fa7cceaccae0f3a6b500d8cfebef569873afd0ca81014d84c3d64c4910160405180910390a150505050565b7f2030565476ef23eb21f6c1f68075f5a89b325631df98f5793acd3297f9b8012361126b81611b82565b600654841115801561129d575060008481526008602052604081205460ff16600281111561129b5761129b61280e565b145b6112fd5760405162461bcd60e51b815260206004820152602b60248201527f53746174652048616e646c65723a20496e76616c6964205061796c6f6164204960448201526a44206f722053746174757360a81b606482015260840161075b565b6000848152600760205260408120805461131690612ae1565b80601f016020809104026020016040519081016040528092919081815260200182805461134290612ae1565b801561138f5780601f106113645761010080835404028352916020019161138f565b820191906000526020600020905b81548152906001019060200180831161137257829003601f168201915b50505050508060200190518101906113a79190612bcc565b90506000816020015160018111156113c1576113c161280e565b1461141a5760405162461bcd60e51b815260206004820152602360248201527f53746174652048616e646c65723a20496e76616c6964205061796c6f616420466044820152626c616760e81b606482015260840161075b565b600081604001518060200190518101906114349190612d4d565b6080810151519091508480821461148d5760405162461bcd60e51b815260206004820152601e60248201527f53746174652048616e646c65723a20496e76616c6964204c656e677468730000604482015260640161075b565b60005b828110156115e15760008888838181106114ac576114ac612f42565b9050602002013590506000856080015183815181106114cd576114cd612f42565b60200260200101519050808211156115275760405162461bcd60e51b815260206004820181905260248201527f53746174652048616e646c65723a204e6567617469766520536c697070616765604482015260640161075b565b60006127108760a00151858151811061154257611542612f42565b60200260200101516127106115579190612f6e565b6115619084612f85565b61156b9190612fa4565b9050808310156115cb5760405162461bcd60e51b815260206004820152602560248201527f53746174652048616e646c65723a20536c697070616765204f7574204f6620426044820152646f756e647360d81b606482015260840161075b565b50505080806115d990612fc6565b915050611490565b50868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050608084015260405161162b908490602001612fdf565b6040516020818303038152906040528460400181905250836040516020016116539190612efd565b60408051601f1981840301815291815260008a81526007602090815291902082516116839391929091019061235d565b50600088815260086020908152604091829020805460ff1916600117905590518981527f118f8ba10d647100925b2343f3030d110623f17b284ced4316cbe4b8f138883f910160405180910390a15050505050505050565b6116e3611b8c565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62169063cbed8b9c9061173790889088908890889088906004016130a9565b600060405180830381600087803b15801561175157600080fd5b505af1158015611765573d6000803e3d6000fd5b505050505050505050565b61ffff841660009081526002602052604080822090516117919086906130d7565b90815260408051602092819003830190206001600160401b038616600090815292529020549050806118115760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b606482015260840161075b565b8151602083012081146118705760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b606482015260840161075b565b61ffff851660009081526002602052604080822090516118919087906130d7565b90815260408051602092819003830190206001600160401b0387166000908152925290205561088785858585611e6c565b6000828152600360205260409020600101546118dd81611b82565b6109fe8383611c6c565b60076020526000908152604090208054610cb190612ae1565b611908611b8c565b61ffff831660009081526001602052604090206119269083836123e1565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161195a93929190612b54565b60405180910390a1505050565b61196f611b8c565b6001600160a01b0381166119d45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161075b565b6119dd81612100565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf626001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611a8891908101906130f3565b95945050505050565b604051633356ae4560e11b815230906366ad5c8a90611aba908790879087908790600401613127565b600060405180830381600087803b158015611ad457600080fd5b505af1925050508015611ae5575060015b610ab9578080519060200120600260008661ffff1661ffff16815260200190815260200160002084604051611b1a91906130d7565b9081526040805191829003602090810183206001600160401b0387166000908152915220919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90611b75908690869086908690613127565b60405180910390a1610ab9565b6119dd8133612150565b6000546001600160a01b03163314610c965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161075b565b611bf08282610d32565b610a7d5760008281526003602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611c283390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611c768282610d32565b15610a7d5760008281526003602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b61ffff851660009081526001602052604081208054611cf190612ae1565b80601f0160208091040260200160405190810160405280929190818152602001828054611d1d90612ae1565b8015611d6a5780601f10611d3f57610100808354040283529160200191611d6a565b820191906000526020600020905b815481529060010190602001808311611d4d57829003601f168201915b505050505090508051600003611ddb5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b606482015260840161075b565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62169063c5803100903490611e32908a9086908b908b908b908b90600401613165565b6000604051808303818588803b158015611e4b57600080fd5b505af1158015611e5f573d6000803e3d6000fd5b5050505050505050505050565b600081806020019051810190611e829190612bcc565b9050600081602001516001811115611e9c57611e9c61280e565b03611fdc5760008160400151806020019051810190611ebb9190612d4d565b61ffff871660009081526009602090815260408083206001600160401b038916845290915290205490915060ff1615611f065760405162461bcd60e51b815260040161075b906131cc565b60068054906000611f1683612fc6565b909155505060065460009081526007602090815260409091208451611f3d9286019061235d565b5061ffff861660009081526009602090815260408083206001600160401b0388168452825291829020805460ff1916600117905582519083015160c084015160065493517fd8d8e7695b4e8636df3a2db9000f86bb231572576f51d55489a27f182071247c94611fce9493929161ffff94851681529290931660208301526040820152606081019190915260800190565b60405180910390a150610887565b60008160400151806020019051810190611ff69190613201565b61ffff871660009081526009602090815260408083206001600160401b038916845290915290205490915060ff16156120415760405162461bcd60e51b815260040161075b906131cc565b6006805490600061205183612fc6565b9091555050600654600090815260076020908152604090912084516120789286019061235d565b5061ffff861660008181526009602090815260408083206001600160401b03891684528252808320805460ff1916600117905560608581015160065483519687529386019490945290840192909252908201527fd8d8e7695b4e8636df3a2db9000f86bb231572576f51d55489a27f182071247c9060800160405180910390a1505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61215a8282610d32565b610a7d57612167816121a9565b6121728360206121bb565b6040516020016121839291906132b3565b60408051601f198184030181529082905262461bcd60e51b825261075b916004016128f5565b60606108bf6001600160a01b03831660145b606060006121ca836002612f85565b6121d5906002613322565b6001600160401b038111156121ec576121ec61247a565b6040519080825280601f01601f191660200182016040528015612216576020820181803683370190505b509050600360fc1b8160008151811061223157612231612f42565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061226057612260612f42565b60200101906001600160f81b031916908160001a9053506000612284846002612f85565b61228f906001613322565b90505b6001811115612307576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106122c3576122c3612f42565b1a60f81b8282815181106122d9576122d9612f42565b60200101906001600160f81b031916908160001a90535060049490941c936123008161333a565b9050612292565b5083156123565760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161075b565b9392505050565b82805461236990612ae1565b90600052602060002090601f01602090048101928261238b57600085556123d1565b82601f106123a457805160ff19168380011785556123d1565b828001600101855582156123d1579182015b828111156123d15782518255916020019190600101906123b6565b506123dd929150612455565b5090565b8280546123ed90612ae1565b90600052602060002090601f01602090048101928261240f57600085556123d1565b82601f106124285782800160ff198235161785556123d1565b828001600101855582156123d1579182015b828111156123d157823582559160200191906001019061243a565b5b808211156123dd5760008155600101612456565b61ffff811681146119dd57600080fd5b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b03811182821017156124b3576124b361247a565b60405290565b60405160a081016001600160401b03811182821017156124b3576124b361247a565b604051601f8201601f191681016001600160401b03811182821017156125035761250361247a565b604052919050565b60006001600160401b038211156125245761252461247a565b50601f01601f191660200190565b600082601f83011261254357600080fd5b81356125566125518261250b565b6124db565b81815284602083860101111561256b57600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160401b038116811461259f57600080fd5b919050565b600080600080608085870312156125ba57600080fd5b84356125c58161246a565b935060208501356001600160401b03808211156125e157600080fd5b6125ed88838901612532565b94506125fb60408801612588565b9350606087013591508082111561261157600080fd5b5061261e87828801612532565b91505092959194509250565b60006020828403121561263c57600080fd5b81356001600160e01b03198116811461235657600080fd5b6001600160a01b03811681146119dd57600080fd5b6000806040838503121561267c57600080fd5b823561268781612654565b9150602083013561269781612654565b809150509250929050565b6000602082840312156126b457600080fd5b81356123568161246a565b6000602082840312156126d157600080fd5b5035919050565b600080604083850312156126eb57600080fd5b82359150602083013561269781612654565b60008060006060848603121561271257600080fd5b833561271d8161246a565b925060208401356001600160401b038082111561273957600080fd5b61274587838801612532565b9350604086013591508082111561275b57600080fd5b5061276886828701612532565b9150509250925092565b60008083601f84011261278457600080fd5b5081356001600160401b0381111561279b57600080fd5b6020830191508360208285010111156127b357600080fd5b9250929050565b6000806000604084860312156127cf57600080fd5b83356127da8161246a565b925060208401356001600160401b038111156127f557600080fd5b61280186828701612772565b9497909650939450505050565b634e487b7160e01b600052602160045260246000fd5b60208101600383106128385761283861280e565b91905290565b60008060006060848603121561285357600080fd5b833561285e8161246a565b925060208401356001600160401b0381111561287957600080fd5b61288586828701612532565b92505061289460408501612588565b90509250925092565b60005b838110156128b85781810151838201526020016128a0565b83811115610ab95750506000910152565b600081518084526128e181602086016020860161289d565b601f01601f19169290920160200192915050565b60208152600061235660208301846128c9565b6000806040838503121561291b57600080fd5b82356129268161246a565b915061293460208401612588565b90509250929050565b6000806040838503121561295057600080fd5b8235915060208301356001600160401b0381111561296d57600080fd5b61297985828601612532565b9150509250929050565b60008060006040848603121561299857600080fd5b8335925060208401356001600160401b03808211156129b657600080fd5b818601915086601f8301126129ca57600080fd5b8135818111156129d957600080fd5b8760208260051b85010111156129ee57600080fd5b6020830194508093505050509250925092565b600080600080600060808688031215612a1957600080fd5b8535612a248161246a565b94506020860135612a348161246a565b93506040860135925060608601356001600160401b03811115612a5657600080fd5b612a6288828901612772565b969995985093965092949392505050565b600060208284031215612a8557600080fd5b813561235681612654565b60008060008060808587031215612aa657600080fd5b8435612ab18161246a565b93506020850135612ac18161246a565b92506040850135612ad181612654565b9396929550929360600135925050565b600181811c90821680612af557607f821691505b602082108103612b1557634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611a88604083018486612b2b565b600281106119dd57600080fd5b600082601f830112612b9057600080fd5b8151612b9e6125518261250b565b818152846020838601011115612bb357600080fd5b612bc482602083016020870161289d565b949350505050565b600060208284031215612bde57600080fd5b81516001600160401b0380821115612bf557600080fd5b9083019060608286031215612c0957600080fd5b604051606081018181108382111715612c2457612c2461247a565b6040528251612c3281612b72565b81526020830151612c4281612b72565b6020820152604083015182811115612c5957600080fd5b612c6587828601612b7f565b60408301525095945050505050565b60208082526024908201527f53746174652048616e646c65723a20496e76616c6964205061796c6f616420536040820152637461746560e01b606082015260800190565b805161259f8161246a565b805161259f81612654565b600082601f830112612cdf57600080fd5b815160206001600160401b03821115612cfa57612cfa61247a565b8160051b612d098282016124db565b9283528481018201928281019087851115612d2357600080fd5b83870192505b84831015612d4257825182529183019190830190612d29565b979650505050505050565b600060208284031215612d5f57600080fd5b81516001600160401b0380821115612d7657600080fd5b908301906101008286031215612d8b57600080fd5b612d93612490565b612d9c83612cb8565b8152612daa60208401612cb8565b6020820152612dbb60408401612cc3565b6040820152606083015182811115612dd257600080fd5b612dde87828601612cce565b606083015250608083015182811115612df657600080fd5b612e0287828601612cce565b60808301525060a083015182811115612e1a57600080fd5b612e2687828601612cce565b60a08301525060c083015160c082015260e083015182811115612e4857600080fd5b612e5487828601612b7f565b60e08301525095945050505050565b600081518084526020808501945080840160005b83811015612e9357815187529582019590820190600101612e77565b509495945050505050565b602081528151151560208201526000602083015161ffff8082166040850152806040860151166060850152505060608301516080830152608083015160a080840152612bc460c0840182612e63565b600281106119dd576119dd61280e565b6020815260008251612f0e81612eed565b806020840152506020830151612f2381612eed565b806040840152506040830151606080840152612bc460808401826128c9565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015612f8057612f80612f58565b500390565b6000816000190483118215151615612f9f57612f9f612f58565b500290565b600082612fc157634e487b7160e01b600052601260045260246000fd5b500490565b600060018201612fd857612fd8612f58565b5060010190565b60208152612ff460208201835161ffff169052565b6000602083015161300b604084018261ffff169052565b5060408301516001600160a01b038116606084015250606083015161010080608085015261303d610120850183612e63565b91506080850151601f19808685030160a087015261305b8483612e63565b935060a08701519150808685030160c08701526130788483612e63565b935060c087015160e087015260e087015191508086850301838701525061309f83826128c9565b9695505050505050565b600061ffff808816835280871660208401525084604083015260806060830152612d42608083018486612b2b565b600082516130e981846020870161289d565b9190910192915050565b60006020828403121561310557600080fd5b81516001600160401b0381111561311b57600080fd5b612bc484828501612b7f565b61ffff8516815260806020820152600061314460808301866128c9565b6001600160401b03851660408401528281036060840152612d4281856128c9565b61ffff8716815260c06020820152600061318260c08301886128c9565b828103604084015261319481886128c9565b6001600160a01b0387811660608601528616608085015283810360a085015290506131bf81856128c9565b9998505050505050505050565b6020808252818101527f53746174652048616e646c65723a204475706c6963617465205061796c6f6164604082015260600190565b60006020828403121561321357600080fd5b81516001600160401b038082111561322a57600080fd5b9083019060a0828603121561323e57600080fd5b6132466124b9565b8251801515811461325657600080fd5b815260208301516132668161246a565b602082015261327760408401612cb8565b60408201526060830151606082015260808301518281111561329857600080fd5b6132a487828601612cce565b60808301525095945050505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516132e581601785016020880161289d565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161331681602884016020880161289d565b01602801949350505050565b6000821982111561333557613335612f58565b500190565b60008161334957613349612f58565b50600019019056fea264697066735822122065e5db4db374afa3219f79073a9d88f0c997bc6638268027a1b66e3ffd4d694f64736f6c634300080e0033

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

0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62

-----Decoded View---------------
Arg [0] : endpoint_ (address): 0x3c2269811836af69497E5F486A85D7316753cf62

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c2269811836af69497e5f486a85d7316753cf62


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.