{"sources":{"contracts/uln/UlnBase.sol":{"content":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\n\n// the formal properties are documented in the setter functions\nstruct UlnConfig {\n    uint64 confirmations;\n    // we store the length of required DVNs and optional DVNs instead of using DVN.length directly to save gas\n    uint8 requiredDVNCount; // 0 indicate DEFAULT, NIL_DVN_COUNT indicate NONE (to override the value of default)\n    uint8 optionalDVNCount; // 0 indicate DEFAULT, NIL_DVN_COUNT indicate NONE (to override the value of default)\n    uint8 optionalDVNThreshold; // (0, optionalDVNCount]\n    address[] requiredDVNs; // no duplicates. sorted an an ascending order. allowed overlap with optionalDVNs\n    address[] optionalDVNs; // no duplicates. sorted an an ascending order. allowed overlap with requiredDVNs\n}\n\nstruct SetDefaultUlnConfigParam {\n    uint32 eid;\n    UlnConfig config;\n}\n\n/// @dev includes the utility functions for checking ULN states and logics\nabstract contract UlnBase is Ownable {\n    address private constant DEFAULT_CONFIG = address(0);\n    // reserved values for\n    uint8 internal constant DEFAULT = 0;\n    uint8 internal constant NIL_DVN_COUNT = type(uint8).max;\n    uint64 internal constant NIL_CONFIRMATIONS = type(uint64).max;\n    // 127 to prevent total number of DVNs (127 * 2) exceeding uint8.max (255)\n    // by limiting the total size, it would help constraint the design of DVNOptions\n    uint8 private constant MAX_COUNT = (type(uint8).max - 1) / 2;\n\n    mapping(address oapp => mapping(uint32 eid => UlnConfig)) internal ulnConfigs;\n\n    error LZ_ULN_Unsorted();\n    error LZ_ULN_InvalidRequiredDVNCount();\n    error LZ_ULN_InvalidOptionalDVNCount();\n    error LZ_ULN_AtLeastOneDVN();\n    error LZ_ULN_InvalidOptionalDVNThreshold();\n    error LZ_ULN_InvalidConfirmations();\n    error LZ_ULN_UnsupportedEid(uint32 eid);\n\n    event DefaultUlnConfigsSet(SetDefaultUlnConfigParam[] params);\n    event UlnConfigSet(address oapp, uint32 eid, UlnConfig config);\n\n    // ============================ OnlyOwner ===================================\n\n    /// @dev about the DEFAULT ULN config\n    /// 1) its values are all LITERAL (e.g. 0 is 0). whereas in the oapp ULN config, 0 (default value) points to the default ULN config\n    ///     this design enables the oapp to point to DEFAULT config without explicitly setting the config\n    /// 2) its configuration is more restrictive than the oapp ULN config that\n    ///     a) it must not use NIL value, where NIL is used only by oapps to indicate the LITERAL 0\n    ///     b) it must have at least one DVN\n    function setDefaultUlnConfigs(SetDefaultUlnConfigParam[] calldata _params) external onlyOwner {\n        for (uint256 i = 0; i < _params.length; ++i) {\n            SetDefaultUlnConfigParam calldata param = _params[i];\n\n            // 2.a must not use NIL\n            if (param.config.requiredDVNCount == NIL_DVN_COUNT) revert LZ_ULN_InvalidRequiredDVNCount();\n            if (param.config.optionalDVNCount == NIL_DVN_COUNT) revert LZ_ULN_InvalidOptionalDVNCount();\n            if (param.config.confirmations == NIL_CONFIRMATIONS) revert LZ_ULN_InvalidConfirmations();\n\n            // 2.b must have at least one dvn\n            _assertAtLeastOneDVN(param.config);\n\n            _setConfig(DEFAULT_CONFIG, param.eid, param.config);\n        }\n        emit DefaultUlnConfigsSet(_params);\n    }\n\n    // ============================ View ===================================\n    // @dev assuming most oapps use default, we get default as memory and custom as storage to save gas\n    function getUlnConfig(address _oapp, uint32 _remoteEid) public view returns (UlnConfig memory rtnConfig) {\n        UlnConfig storage defaultConfig = ulnConfigs[DEFAULT_CONFIG][_remoteEid];\n        UlnConfig storage customConfig = ulnConfigs[_oapp][_remoteEid];\n\n        // if confirmations is 0, use default\n        uint64 confirmations = customConfig.confirmations;\n        if (confirmations == DEFAULT) {\n            rtnConfig.confirmations = defaultConfig.confirmations;\n        } else if (confirmations != NIL_CONFIRMATIONS) {\n            // if confirmations is uint64.max, no block confirmations required\n            rtnConfig.confirmations = confirmations;\n        } // else do nothing, rtnConfig.confirmation is 0\n\n        if (customConfig.requiredDVNCount == DEFAULT) {\n            if (defaultConfig.requiredDVNCount > 0) {\n                // copy only if count > 0. save gas\n                rtnConfig.requiredDVNs = defaultConfig.requiredDVNs;\n                rtnConfig.requiredDVNCount = defaultConfig.requiredDVNCount;\n            } // else, do nothing\n        } else {\n            if (customConfig.requiredDVNCount != NIL_DVN_COUNT) {\n                rtnConfig.requiredDVNs = customConfig.requiredDVNs;\n                rtnConfig.requiredDVNCount = customConfig.requiredDVNCount;\n            } // else, do nothing\n        }\n\n        if (customConfig.optionalDVNCount == DEFAULT) {\n            if (defaultConfig.optionalDVNCount > 0) {\n                // copy only if count > 0. save gas\n                rtnConfig.optionalDVNs = defaultConfig.optionalDVNs;\n                rtnConfig.optionalDVNCount = defaultConfig.optionalDVNCount;\n                rtnConfig.optionalDVNThreshold = defaultConfig.optionalDVNThreshold;\n            }\n        } else {\n            if (customConfig.optionalDVNCount != NIL_DVN_COUNT) {\n                rtnConfig.optionalDVNs = customConfig.optionalDVNs;\n                rtnConfig.optionalDVNCount = customConfig.optionalDVNCount;\n                rtnConfig.optionalDVNThreshold = customConfig.optionalDVNThreshold;\n            }\n        }\n\n        // the final value must have at least one dvn\n        // it is possible that some default config result into 0 dvns\n        _assertAtLeastOneDVN(rtnConfig);\n    }\n\n    /// @dev Get the uln config without the default config for the given remoteEid.\n    function getAppUlnConfig(address _oapp, uint32 _remoteEid) external view returns (UlnConfig memory) {\n        return ulnConfigs[_oapp][_remoteEid];\n    }\n\n    // ============================ Internal ===================================\n    function _setUlnConfig(uint32 _remoteEid, address _oapp, UlnConfig memory _param) internal {\n        _setConfig(_oapp, _remoteEid, _param);\n\n        // get ULN config again as a catch all to ensure the config is valid\n        getUlnConfig(_oapp, _remoteEid);\n        emit UlnConfigSet(_oapp, _remoteEid, _param);\n    }\n\n    /// @dev a supported Eid must have a valid default uln config, which has at least one dvn\n    function _isSupportedEid(uint32 _remoteEid) internal view returns (bool) {\n        UlnConfig storage defaultConfig = ulnConfigs[DEFAULT_CONFIG][_remoteEid];\n        return defaultConfig.requiredDVNCount > 0 || defaultConfig.optionalDVNThreshold > 0;\n    }\n\n    function _assertSupportedEid(uint32 _remoteEid) internal view {\n        if (!_isSupportedEid(_remoteEid)) revert LZ_ULN_UnsupportedEid(_remoteEid);\n    }\n\n    // ============================ Private ===================================\n\n    function _assertAtLeastOneDVN(UlnConfig memory _config) private pure {\n        if (_config.requiredDVNCount == 0 && _config.optionalDVNThreshold == 0) revert LZ_ULN_AtLeastOneDVN();\n    }\n\n    /// @dev this private function is used in both setDefaultUlnConfigs and setUlnConfig\n    function _setConfig(address _oapp, uint32 _eid, UlnConfig memory _param) private {\n        // @dev required dvns\n        // if dvnCount == NONE, dvns list must be empty\n        // if dvnCount == DEFAULT, dvn list must be empty\n        // otherwise, dvnList.length == dvnCount and assert the list is valid\n        if (_param.requiredDVNCount == NIL_DVN_COUNT || _param.requiredDVNCount == DEFAULT) {\n            if (_param.requiredDVNs.length != 0) revert LZ_ULN_InvalidRequiredDVNCount();\n        } else {\n            if (_param.requiredDVNs.length != _param.requiredDVNCount || _param.requiredDVNCount > MAX_COUNT)\n                revert LZ_ULN_InvalidRequiredDVNCount();\n            _assertNoDuplicates(_param.requiredDVNs);\n        }\n\n        // @dev optional dvns\n        // if optionalDVNCount == NONE, optionalDVNs list must be empty and threshold must be 0\n        // if optionalDVNCount == DEFAULT, optionalDVNs list must be empty and threshold must be 0\n        // otherwise, optionalDVNs.length == optionalDVNCount, threshold > 0 && threshold <= optionalDVNCount and assert the list is valid\n\n        // example use case: an oapp uses the DEFAULT 'required' but\n        //     a) use a custom 1/1 dvn (practically a required dvn), or\n        //     b) use a custom 2/3 dvn\n        if (_param.optionalDVNCount == NIL_DVN_COUNT || _param.optionalDVNCount == DEFAULT) {\n            if (_param.optionalDVNs.length != 0) revert LZ_ULN_InvalidOptionalDVNCount();\n            if (_param.optionalDVNThreshold != 0) revert LZ_ULN_InvalidOptionalDVNThreshold();\n        } else {\n            if (_param.optionalDVNs.length != _param.optionalDVNCount || _param.optionalDVNCount > MAX_COUNT)\n                revert LZ_ULN_InvalidOptionalDVNCount();\n            if (_param.optionalDVNThreshold == 0 || _param.optionalDVNThreshold > _param.optionalDVNCount)\n                revert LZ_ULN_InvalidOptionalDVNThreshold();\n            _assertNoDuplicates(_param.optionalDVNs);\n        }\n        // don't assert valid count here, as it needs to be validated along side default config\n\n        ulnConfigs[_oapp][_eid] = _param;\n    }\n\n    function _assertNoDuplicates(address[] memory _dvns) private pure {\n        address lastDVN = address(0);\n        for (uint256 i = 0; i < _dvns.length; i++) {\n            address dvn = _dvns[i];\n            if (dvn <= lastDVN) revert LZ_ULN_Unsorted(); // to ensure no duplicates\n            lastDVN = dvn;\n        }\n    }\n}\n"},"contracts/MessageLibBase.sol":{"content":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\n/// @dev simply a container of endpoint address and local eid\nabstract contract MessageLibBase {\n    address internal immutable endpoint;\n    uint32 internal immutable localEid;\n\n    error LZ_MessageLib_OnlyEndpoint();\n\n    modifier onlyEndpoint() {\n        if (endpoint != msg.sender) revert LZ_MessageLib_OnlyEndpoint();\n        _;\n    }\n\n    constructor(address _endpoint, uint32 _localEid) {\n        endpoint = _endpoint;\n        localEid = _localEid;\n    }\n}\n"},"contracts/ReceiveLibBaseE2.sol":{"content":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nimport { IERC165 } from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport { ERC165 } from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nimport { ILayerZeroEndpointV2, Origin } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\";\nimport { IMessageLib, MessageLibType } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLib.sol\";\nimport { PacketV1Codec } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol\";\n\nimport { MessageLibBase } from \"./MessageLibBase.sol\";\n\n/// @dev receive-side message library base contract on endpoint v2.\n/// it does not have the complication as the one of endpoint v1, such as nonce, executor whitelist, etc.\nabstract contract ReceiveLibBaseE2 is MessageLibBase, ERC165, IMessageLib {\n    using PacketV1Codec for bytes;\n\n    constructor(address _endpoint) MessageLibBase(_endpoint, ILayerZeroEndpointV2(_endpoint).eid()) {}\n\n    function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n        return _interfaceId == type(IMessageLib).interfaceId || super.supportsInterface(_interfaceId);\n    }\n\n    function messageLibType() external pure virtual override returns (MessageLibType) {\n        return MessageLibType.Receive;\n    }\n}\n"},"contracts/uln/ReceiveUlnBase.sol":{"content":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nimport { PacketV1Codec } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol\";\n\nimport { UlnBase, UlnConfig } from \"./UlnBase.sol\";\n\nstruct Verification {\n    bool submitted;\n    uint64 confirmations;\n}\n\n/// @dev includes the utility functions for checking ULN states and logics\nabstract contract ReceiveUlnBase is UlnBase {\n    using PacketV1Codec for bytes;\n\n    mapping(bytes32 headerHash => mapping(bytes32 payloadHash => mapping(address dvn => Verification)))\n        public hashLookup;\n\n    event PayloadVerified(address dvn, bytes header, uint256 confirmations, bytes32 proofHash);\n\n    error LZ_ULN_InvalidPacketHeader();\n    error LZ_ULN_InvalidPacketVersion();\n    error LZ_ULN_InvalidEid();\n    error LZ_ULN_Verifying();\n\n    // ============================ External ===================================\n    function verifiable(\n        UlnConfig memory _config,\n        bytes32 _headerHash,\n        bytes32 _payloadHash\n    ) external view returns (bool) {\n        return _checkVerifiable(_config, _headerHash, _payloadHash);\n    }\n\n    function assertHeader(bytes calldata _packetHeader, uint32 _localEid) external pure {\n        _assertHeader(_packetHeader, _localEid);\n    }\n\n    // ============================ Internal ===================================\n    /// @dev per DVN signing function\n    function _verify(bytes calldata _packetHeader, bytes32 _payloadHash, uint64 _confirmations) internal {\n        hashLookup[keccak256(_packetHeader)][_payloadHash][msg.sender] = Verification(true, _confirmations);\n        emit PayloadVerified(msg.sender, _packetHeader, _confirmations, _payloadHash);\n    }\n\n    function _verified(\n        address _dvn,\n        bytes32 _headerHash,\n        bytes32 _payloadHash,\n        uint64 _requiredConfirmation\n    ) internal view returns (bool verified) {\n        Verification memory verification = hashLookup[_headerHash][_payloadHash][_dvn];\n        // return true if the dvn has signed enough confirmations\n        verified = verification.submitted && verification.confirmations >= _requiredConfirmation;\n    }\n\n    function _verifyAndReclaimStorage(UlnConfig memory _config, bytes32 _headerHash, bytes32 _payloadHash) internal {\n        if (!_checkVerifiable(_config, _headerHash, _payloadHash)) {\n            revert LZ_ULN_Verifying();\n        }\n\n        // iterate the required DVNs\n        if (_config.requiredDVNCount > 0) {\n            for (uint8 i = 0; i < _config.requiredDVNCount; ++i) {\n                delete hashLookup[_headerHash][_payloadHash][_config.requiredDVNs[i]];\n            }\n        }\n\n        // iterate the optional DVNs\n        if (_config.optionalDVNCount > 0) {\n            for (uint8 i = 0; i < _config.optionalDVNCount; ++i) {\n                delete hashLookup[_headerHash][_payloadHash][_config.optionalDVNs[i]];\n            }\n        }\n    }\n\n    function _assertHeader(bytes calldata _packetHeader, uint32 _localEid) internal pure {\n        // assert packet header is of right size 81\n        if (_packetHeader.length != 81) revert LZ_ULN_InvalidPacketHeader();\n        // assert packet header version is the same as ULN\n        if (_packetHeader.version() != PacketV1Codec.PACKET_VERSION) revert LZ_ULN_InvalidPacketVersion();\n        // assert the packet is for this endpoint\n        if (_packetHeader.dstEid() != _localEid) revert LZ_ULN_InvalidEid();\n    }\n\n    /// @dev for verifiable view function\n    /// @dev checks if this verification is ready to be committed to the endpoint\n    function _checkVerifiable(\n        UlnConfig memory _config,\n        bytes32 _headerHash,\n        bytes32 _payloadHash\n    ) internal view returns (bool) {\n        // iterate the required DVNs\n        if (_config.requiredDVNCount > 0) {\n            for (uint8 i = 0; i < _config.requiredDVNCount; ++i) {\n                if (!_verified(_config.requiredDVNs[i], _headerHash, _payloadHash, _config.confirmations)) {\n                    // return if any of the required DVNs haven't signed\n                    return false;\n                }\n            }\n            if (_config.optionalDVNCount == 0) {\n                // returns early if all required DVNs have signed and there are no optional DVNs\n                return true;\n            }\n        }\n\n        // then it must require optional validations\n        uint8 threshold = _config.optionalDVNThreshold;\n        for (uint8 i = 0; i < _config.optionalDVNCount; ++i) {\n            if (_verified(_config.optionalDVNs[i], _headerHash, _payloadHash, _config.confirmations)) {\n                // increment the optional count if the optional DVN has signed\n                threshold--;\n                if (threshold == 0) {\n                    // early return if the optional threshold has hit\n                    return true;\n                }\n            }\n        }\n\n        // return false as a catch-all\n        return false;\n    }\n}\n"},"contracts/uln/uln302/ReceiveUln302.sol":{"content":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nimport { PacketV1Codec } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol\";\nimport { SetConfigParam } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol\";\nimport { ILayerZeroEndpointV2, Origin } from \"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol\";\n\nimport { IReceiveUlnE2 } from \"../interfaces/IReceiveUlnE2.sol\";\nimport { ReceiveUlnBase } from \"../ReceiveUlnBase.sol\";\nimport { ReceiveLibBaseE2 } from \"../../ReceiveLibBaseE2.sol\";\nimport { UlnConfig } from \"../UlnBase.sol\";\n\n/// @dev This is a gluing contract. It simply parses the requests and forward to the super.impl() accordingly.\n/// @dev In this case, it combines the logic of ReceiveUlnBase and ReceiveLibBaseE2\ncontract ReceiveUln302 is IReceiveUlnE2, ReceiveUlnBase, ReceiveLibBaseE2 {\n    using PacketV1Codec for bytes;\n\n    /// @dev CONFIG_TYPE_ULN=2 here to align with SendUln302/ReceiveUln302/ReceiveUln301\n    uint32 internal constant CONFIG_TYPE_ULN = 2;\n\n    error LZ_ULN_InvalidConfigType(uint32 configType);\n\n    constructor(address _endpoint) ReceiveLibBaseE2(_endpoint) {}\n\n    function supportsInterface(bytes4 _interfaceId) public view override returns (bool) {\n        return _interfaceId == type(IReceiveUlnE2).interfaceId || super.supportsInterface(_interfaceId);\n    }\n\n    // ============================ OnlyEndpoint ===================================\n\n    // only the ULN config on the receive side\n    function setConfig(address _oapp, SetConfigParam[] calldata _params) external override onlyEndpoint {\n        for (uint256 i = 0; i < _params.length; i++) {\n            SetConfigParam calldata param = _params[i];\n            _assertSupportedEid(param.eid);\n            if (param.configType == CONFIG_TYPE_ULN) {\n                _setUlnConfig(param.eid, _oapp, abi.decode(param.config, (UlnConfig)));\n            } else {\n                revert LZ_ULN_InvalidConfigType(param.configType);\n            }\n        }\n    }\n\n    // ============================ External ===================================\n\n    /// @dev dont need to check endpoint verifiable here to save gas, as it will reverts if not verifiable.\n    function commitVerification(bytes calldata _packetHeader, bytes32 _payloadHash) external {\n        _assertHeader(_packetHeader, localEid);\n\n        // cache these values to save gas\n        address receiver = _packetHeader.receiverB20();\n        uint32 srcEid = _packetHeader.srcEid();\n\n        UlnConfig memory config = getUlnConfig(receiver, srcEid);\n        _verifyAndReclaimStorage(config, keccak256(_packetHeader), _payloadHash);\n\n        Origin memory origin = Origin(srcEid, _packetHeader.sender(), _packetHeader.nonce());\n        // endpoint will revert if nonce <= lazyInboundNonce\n        ILayerZeroEndpointV2(endpoint).verify(origin, receiver, _payloadHash);\n    }\n\n    /// @dev for dvn to verify the payload\n    function verify(bytes calldata _packetHeader, bytes32 _payloadHash, uint64 _confirmations) external {\n        _verify(_packetHeader, _payloadHash, _confirmations);\n    }\n\n    // ============================ View ===================================\n\n    function getConfig(uint32 _eid, address _oapp, uint32 _configType) external view override returns (bytes memory) {\n        if (_configType == CONFIG_TYPE_ULN) {\n            return abi.encode(getUlnConfig(_oapp, _eid));\n        } else {\n            revert LZ_ULN_InvalidConfigType(_configType);\n        }\n    }\n\n    function isSupportedEid(uint32 _eid) external view override returns (bool) {\n        return _isSupportedEid(_eid);\n    }\n\n    function version() external pure override returns (uint64 major, uint8 minor, uint8 endpointVersion) {\n        return (3, 0, 2);\n    }\n}\n"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"@openzeppelin/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},"contracts/uln/interfaces/IReceiveUlnE2.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\n/// @dev should be implemented by the ReceiveUln302 contract and future ReceiveUln contracts on EndpointV2\ninterface IReceiveUlnE2 {\n    /// @notice for each dvn to verify the payload\n    /// @dev this function signature 0x0223536e\n    function verify(bytes calldata _packetHeader, bytes32 _payloadHash, uint64 _confirmations) external;\n\n    /// @notice verify the payload at endpoint, will check if all DVNs verified\n    function commitVerification(bytes calldata _packetHeader, bytes32 _payloadHash) external;\n}\n"},"@openzeppelin/contracts/utils/introspection/ERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n    /**\n     * @dev See {IERC165-supportsInterface}.\n     */\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n        return interfaceId == type(IERC165).interfaceId;\n    }\n}\n"},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n    /**\n     * @dev Returns true if this contract implements the interface defined by\n     * `interfaceId`. See the corresponding\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n     * to learn more about how these ids are created.\n     *\n     * This function call must use less than 30 000 gas.\n     */\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/libs/AddressCast.sol":{"content":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nlibrary AddressCast {\n    error AddressCast_InvalidSizeForAddress();\n    error AddressCast_InvalidAddress();\n\n    function toBytes32(bytes calldata _addressBytes) internal pure returns (bytes32 result) {\n        if (_addressBytes.length > 32) revert AddressCast_InvalidAddress();\n        result = bytes32(_addressBytes);\n        unchecked {\n            uint256 offset = 32 - _addressBytes.length;\n            result = result >> (offset * 8);\n        }\n    }\n\n    function toBytes32(address _address) internal pure returns (bytes32 result) {\n        result = bytes32(uint256(uint160(_address)));\n    }\n\n    function toBytes(bytes32 _addressBytes32, uint256 _size) internal pure returns (bytes memory result) {\n        if (_size == 0 || _size > 32) revert AddressCast_InvalidSizeForAddress();\n        result = new bytes(_size);\n        unchecked {\n            uint256 offset = 256 - _size * 8;\n            assembly {\n                mstore(add(result, 32), shl(offset, _addressBytes32))\n            }\n        }\n    }\n\n    function toAddress(bytes32 _addressBytes32) internal pure returns (address result) {\n        result = address(uint160(uint256(_addressBytes32)));\n    }\n\n    function toAddress(bytes calldata _addressBytes) internal pure returns (address result) {\n        if (_addressBytes.length != 20) revert AddressCast_InvalidAddress();\n        result = address(bytes20(_addressBytes));\n    }\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nimport { MessagingFee } from \"./ILayerZeroEndpointV2.sol\";\nimport { IMessageLib } from \"./IMessageLib.sol\";\n\nstruct Packet {\n    uint64 nonce;\n    uint32 srcEid;\n    address sender;\n    uint32 dstEid;\n    bytes32 receiver;\n    bytes32 guid;\n    bytes message;\n}\n\ninterface ISendLib is IMessageLib {\n    function send(\n        Packet calldata _packet,\n        bytes calldata _options,\n        bool _payInLzToken\n    ) external returns (MessagingFee memory, bytes memory encodedPacket);\n\n    function quote(\n        Packet calldata _packet,\n        bytes calldata _options,\n        bool _payInLzToken\n    ) external view returns (MessagingFee memory);\n\n    function setTreasury(address _treasury) external;\n\n    function withdrawFee(address _to, uint256 _amount) external;\n\n    function withdrawLzTokenFee(address _lzToken, address _to, uint256 _amount) external;\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLib.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nimport { IERC165 } from \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\n\nimport { SetConfigParam } from \"./IMessageLibManager.sol\";\n\nenum MessageLibType {\n    Send,\n    Receive,\n    SendAndReceive\n}\n\ninterface IMessageLib is IERC165 {\n    function setConfig(address _oapp, SetConfigParam[] calldata _config) external;\n\n    function getConfig(uint32 _eid, address _oapp, uint32 _configType) external view returns (bytes memory config);\n\n    function isSupportedEid(uint32 _eid) external view returns (bool);\n\n    // message libs of same major version are compatible\n    function version() external view returns (uint64 major, uint8 minor, uint8 endpointVersion);\n\n    function messageLibType() external view returns (MessageLibType);\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingChannel.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\ninterface IMessagingChannel {\n    event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);\n    event PacketNilified(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\n    event PacketBurnt(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce, bytes32 payloadHash);\n\n    function eid() external view returns (uint32);\n\n    // this is an emergency function if a message cannot be verified for some reasons\n    // required to provide _nextNonce to avoid race condition\n    function skip(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;\n\n    function nilify(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\n\n    function burn(address _oapp, uint32 _srcEid, bytes32 _sender, uint64 _nonce, bytes32 _payloadHash) external;\n\n    function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);\n\n    function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\n\n    function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);\n\n    function inboundPayloadHash(\n        address _receiver,\n        uint32 _srcEid,\n        bytes32 _sender,\n        uint64 _nonce\n    ) external view returns (bytes32);\n\n    function lazyInboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingContext.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\ninterface IMessagingContext {\n    function isSendingMessage() external view returns (bool);\n\n    function getSendContext() external view returns (uint32 dstEid, address sender);\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nstruct SetConfigParam {\n    uint32 eid;\n    uint32 configType;\n    bytes config;\n}\n\ninterface IMessageLibManager {\n    struct Timeout {\n        address lib;\n        uint256 expiry;\n    }\n\n    event LibraryRegistered(address newLib);\n    event DefaultSendLibrarySet(uint32 eid, address newLib);\n    event DefaultReceiveLibrarySet(uint32 eid, address newLib);\n    event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint256 expiry);\n    event SendLibrarySet(address sender, uint32 eid, address newLib);\n    event ReceiveLibrarySet(address receiver, uint32 eid, address newLib);\n    event ReceiveLibraryTimeoutSet(address receiver, uint32 eid, address oldLib, uint256 timeout);\n\n    function registerLibrary(address _lib) external;\n\n    function isRegisteredLibrary(address _lib) external view returns (bool);\n\n    function getRegisteredLibraries() external view returns (address[] memory);\n\n    function setDefaultSendLibrary(uint32 _eid, address _newLib) external;\n\n    function defaultSendLibrary(uint32 _eid) external view returns (address);\n\n    function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint256 _timeout) external;\n\n    function defaultReceiveLibrary(uint32 _eid) external view returns (address);\n\n    function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint256 _expiry) external;\n\n    function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint256 expiry);\n\n    function isSupportedEid(uint32 _eid) external view returns (bool);\n\n    function isValidReceiveLibrary(address _receiver, uint32 _eid, address _lib) external view returns (bool);\n\n    /// ------------------- OApp interfaces -------------------\n    function setSendLibrary(address _oapp, uint32 _eid, address _newLib) external;\n\n    function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);\n\n    function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);\n\n    function setReceiveLibrary(address _oapp, uint32 _eid, address _newLib, uint256 _gracePeriod) external;\n\n    function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);\n\n    function setReceiveLibraryTimeout(address _oapp, uint32 _eid, address _lib, uint256 _gracePeriod) external;\n\n    function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint256 expiry);\n\n    function setConfig(address _oapp, address _lib, SetConfigParam[] calldata _params) external;\n\n    function getConfig(\n        address _oapp,\n        address _lib,\n        uint32 _eid,\n        uint32 _configType\n    ) external view returns (bytes memory config);\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessagingComposer.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\ninterface IMessagingComposer {\n    event ComposeSent(address from, address to, bytes32 guid, uint16 index, bytes message);\n    event ComposeDelivered(address from, address to, bytes32 guid, uint16 index);\n    event LzComposeAlert(\n        address indexed from,\n        address indexed to,\n        address indexed executor,\n        bytes32 guid,\n        uint16 index,\n        uint256 gas,\n        uint256 value,\n        bytes message,\n        bytes extraData,\n        bytes reason\n    );\n\n    function composeQueue(\n        address _from,\n        address _to,\n        bytes32 _guid,\n        uint16 _index\n    ) external view returns (bytes32 messageHash);\n\n    function sendCompose(address _to, bytes32 _guid, uint16 _index, bytes calldata _message) external;\n\n    function lzCompose(\n        address _from,\n        address _to,\n        bytes32 _guid,\n        uint16 _index,\n        bytes calldata _message,\n        bytes calldata _extraData\n    ) external payable;\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/messagelib/libs/PacketV1Codec.sol":{"content":"// SPDX-License-Identifier: LZBL-1.2\n\npragma solidity ^0.8.20;\n\nimport { Packet } from \"../../interfaces/ISendLib.sol\";\nimport { AddressCast } from \"../../libs/AddressCast.sol\";\n\nlibrary PacketV1Codec {\n    using AddressCast for address;\n    using AddressCast for bytes32;\n\n    uint8 internal constant PACKET_VERSION = 1;\n\n    // header (version + nonce + path)\n    // version\n    uint256 private constant PACKET_VERSION_OFFSET = 0;\n    //    nonce\n    uint256 private constant NONCE_OFFSET = 1;\n    //    path\n    uint256 private constant SRC_EID_OFFSET = 9;\n    uint256 private constant SENDER_OFFSET = 13;\n    uint256 private constant DST_EID_OFFSET = 45;\n    uint256 private constant RECEIVER_OFFSET = 49;\n    // payload (guid + message)\n    uint256 private constant GUID_OFFSET = 81; // keccak256(nonce + path)\n    uint256 private constant MESSAGE_OFFSET = 113;\n\n    function encode(Packet memory _packet) internal pure returns (bytes memory encodedPacket) {\n        encodedPacket = abi.encodePacked(\n            PACKET_VERSION,\n            _packet.nonce,\n            _packet.srcEid,\n            _packet.sender.toBytes32(),\n            _packet.dstEid,\n            _packet.receiver,\n            _packet.guid,\n            _packet.message\n        );\n    }\n\n    function encodePacketHeader(Packet memory _packet) internal pure returns (bytes memory) {\n        return\n            abi.encodePacked(\n                PACKET_VERSION,\n                _packet.nonce,\n                _packet.srcEid,\n                _packet.sender.toBytes32(),\n                _packet.dstEid,\n                _packet.receiver\n            );\n    }\n\n    function encodePayload(Packet memory _packet) internal pure returns (bytes memory) {\n        return abi.encodePacked(_packet.guid, _packet.message);\n    }\n\n    function header(bytes calldata _packet) internal pure returns (bytes calldata) {\n        return _packet[0:GUID_OFFSET];\n    }\n\n    function version(bytes calldata _packet) internal pure returns (uint8) {\n        return uint8(bytes1(_packet[PACKET_VERSION_OFFSET:NONCE_OFFSET]));\n    }\n\n    function nonce(bytes calldata _packet) internal pure returns (uint64) {\n        return uint64(bytes8(_packet[NONCE_OFFSET:SRC_EID_OFFSET]));\n    }\n\n    function srcEid(bytes calldata _packet) internal pure returns (uint32) {\n        return uint32(bytes4(_packet[SRC_EID_OFFSET:SENDER_OFFSET]));\n    }\n\n    function sender(bytes calldata _packet) internal pure returns (bytes32) {\n        return bytes32(_packet[SENDER_OFFSET:DST_EID_OFFSET]);\n    }\n\n    function senderAddressB20(bytes calldata _packet) internal pure returns (address) {\n        return sender(_packet).toAddress();\n    }\n\n    function dstEid(bytes calldata _packet) internal pure returns (uint32) {\n        return uint32(bytes4(_packet[DST_EID_OFFSET:RECEIVER_OFFSET]));\n    }\n\n    function receiver(bytes calldata _packet) internal pure returns (bytes32) {\n        return bytes32(_packet[RECEIVER_OFFSET:GUID_OFFSET]);\n    }\n\n    function receiverB20(bytes calldata _packet) internal pure returns (address) {\n        return receiver(_packet).toAddress();\n    }\n\n    function guid(bytes calldata _packet) internal pure returns (bytes32) {\n        return bytes32(_packet[GUID_OFFSET:MESSAGE_OFFSET]);\n    }\n\n    function message(bytes calldata _packet) internal pure returns (bytes calldata) {\n        return bytes(_packet[MESSAGE_OFFSET:]);\n    }\n\n    function payload(bytes calldata _packet) internal pure returns (bytes calldata) {\n        return bytes(_packet[GUID_OFFSET:]);\n    }\n\n    function payloadHash(bytes calldata _packet) internal pure returns (bytes32) {\n        return keccak256(payload(_packet));\n    }\n}\n"},"@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.8.0;\n\nimport { IMessageLibManager } from \"./IMessageLibManager.sol\";\nimport { IMessagingComposer } from \"./IMessagingComposer.sol\";\nimport { IMessagingChannel } from \"./IMessagingChannel.sol\";\nimport { IMessagingContext } from \"./IMessagingContext.sol\";\n\nstruct MessagingParams {\n    uint32 dstEid;\n    bytes32 receiver;\n    bytes message;\n    bytes options;\n    bool payInLzToken;\n}\n\nstruct MessagingReceipt {\n    bytes32 guid;\n    uint64 nonce;\n    MessagingFee fee;\n}\n\nstruct MessagingFee {\n    uint256 nativeFee;\n    uint256 lzTokenFee;\n}\n\nstruct Origin {\n    uint32 srcEid;\n    bytes32 sender;\n    uint64 nonce;\n}\n\ninterface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {\n    event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);\n\n    event PacketVerified(Origin origin, address receiver, bytes32 payloadHash);\n\n    event PacketDelivered(Origin origin, address receiver);\n\n    event LzReceiveAlert(\n        address indexed receiver,\n        address indexed executor,\n        Origin origin,\n        bytes32 guid,\n        uint256 gas,\n        uint256 value,\n        bytes message,\n        bytes extraData,\n        bytes reason\n    );\n\n    event LzTokenSet(address token);\n\n    event DelegateSet(address sender, address delegate);\n\n    function quote(MessagingParams calldata _params, address _sender) external view returns (MessagingFee memory);\n\n    function send(\n        MessagingParams calldata _params,\n        address _refundAddress\n    ) external payable returns (MessagingReceipt memory);\n\n    function verify(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;\n\n    function verifiable(Origin calldata _origin, address _receiver) external view returns (bool);\n\n    function initializable(Origin calldata _origin, address _receiver) external view returns (bool);\n\n    function lzReceive(\n        Origin calldata _origin,\n        address _receiver,\n        bytes32 _guid,\n        bytes calldata _message,\n        bytes calldata _extraData\n    ) external payable;\n\n    // oapp can burn messages partially by calling this function with its own business logic if messages are verified in order\n    function clear(address _oapp, Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;\n\n    function setLzToken(address _lzToken) external;\n\n    function lzToken() external view returns (address);\n\n    function nativeToken() external view returns (address);\n\n    function setDelegate(address _delegate) external;\n}\n"}},"abi":[{"type":"constructor","inputs":[{"name":"_endpoint","type":"address","internalType":"address"}],"stateMutability":"nonpayable"},{"name":"LZ_MessageLib_OnlyEndpoint","type":"error","inputs":[]},{"name":"LZ_ULN_AtLeastOneDVN","type":"error","inputs":[]},{"name":"LZ_ULN_InvalidConfigType","type":"error","inputs":[{"name":"configType","type":"uint32","internalType":"uint32"}]},{"name":"LZ_ULN_InvalidConfirmations","type":"error","inputs":[]},{"name":"LZ_ULN_InvalidEid","type":"error","inputs":[]},{"name":"LZ_ULN_InvalidOptionalDVNCount","type":"error","inputs":[]},{"name":"LZ_ULN_InvalidOptionalDVNThreshold","type":"error","inputs":[]},{"name":"LZ_ULN_InvalidPacketHeader","type":"error","inputs":[]},{"name":"LZ_ULN_InvalidPacketVersion","type":"error","inputs":[]},{"name":"LZ_ULN_InvalidRequiredDVNCount","type":"error","inputs":[]},{"name":"LZ_ULN_Unsorted","type":"error","inputs":[]},{"name":"LZ_ULN_UnsupportedEid","type":"error","inputs":[{"name":"eid","type":"uint32","internalType":"uint32"}]},{"name":"LZ_ULN_Verifying","type":"error","inputs":[]},{"name":"DefaultUlnConfigsSet","type":"event","inputs":[{"name":"params","type":"tuple[]","indexed":false,"components":[{"name":"eid","type":"uint32","internalType":"uint32"},{"name":"config","type":"tuple","components":[{"name":"confirmations","type":"uint64","internalType":"uint64"},{"name":"requiredDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNThreshold","type":"uint8","internalType":"uint8"},{"name":"requiredDVNs","type":"address[]","internalType":"address[]"},{"name":"optionalDVNs","type":"address[]","internalType":"address[]"}],"internalType":"struct UlnConfig"}],"internalType":"struct SetDefaultUlnConfigParam[]"}],"anonymous":false},{"name":"OwnershipTransferred","type":"event","inputs":[{"name":"previousOwner","type":"address","indexed":true,"internalType":"address"},{"name":"newOwner","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"PayloadVerified","type":"event","inputs":[{"name":"dvn","type":"address","indexed":false,"internalType":"address"},{"name":"header","type":"bytes","indexed":false,"internalType":"bytes"},{"name":"confirmations","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"proofHash","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"name":"UlnConfigSet","type":"event","inputs":[{"name":"oapp","type":"address","indexed":false,"internalType":"address"},{"name":"eid","type":"uint32","indexed":false,"internalType":"uint32"},{"name":"config","type":"tuple","indexed":false,"components":[{"name":"confirmations","type":"uint64","internalType":"uint64"},{"name":"requiredDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNThreshold","type":"uint8","internalType":"uint8"},{"name":"requiredDVNs","type":"address[]","internalType":"address[]"},{"name":"optionalDVNs","type":"address[]","internalType":"address[]"}],"internalType":"struct UlnConfig"}],"anonymous":false},{"name":"assertHeader","type":"function","inputs":[{"name":"_packetHeader","type":"bytes","internalType":"bytes"},{"name":"_localEid","type":"uint32","internalType":"uint32"}],"outputs":[],"stateMutability":"pure"},{"name":"commitVerification","type":"function","inputs":[{"name":"_packetHeader","type":"bytes","internalType":"bytes"},{"name":"_payloadHash","type":"bytes32","internalType":"bytes32"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"getAppUlnConfig","type":"function","inputs":[{"name":"_oapp","type":"address","internalType":"address"},{"name":"_remoteEid","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"","type":"tuple","components":[{"name":"confirmations","type":"uint64","internalType":"uint64"},{"name":"requiredDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNThreshold","type":"uint8","internalType":"uint8"},{"name":"requiredDVNs","type":"address[]","internalType":"address[]"},{"name":"optionalDVNs","type":"address[]","internalType":"address[]"}],"internalType":"struct UlnConfig"}],"stateMutability":"view"},{"name":"getConfig","type":"function","inputs":[{"name":"_eid","type":"uint32","internalType":"uint32"},{"name":"_oapp","type":"address","internalType":"address"},{"name":"_configType","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"","type":"bytes","internalType":"bytes"}],"stateMutability":"view"},{"name":"getUlnConfig","type":"function","inputs":[{"name":"_oapp","type":"address","internalType":"address"},{"name":"_remoteEid","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"rtnConfig","type":"tuple","components":[{"name":"confirmations","type":"uint64","internalType":"uint64"},{"name":"requiredDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNThreshold","type":"uint8","internalType":"uint8"},{"name":"requiredDVNs","type":"address[]","internalType":"address[]"},{"name":"optionalDVNs","type":"address[]","internalType":"address[]"}],"internalType":"struct UlnConfig"}],"stateMutability":"view"},{"name":"hashLookup","type":"function","inputs":[{"name":"headerHash","type":"bytes32","internalType":"bytes32"},{"name":"payloadHash","type":"bytes32","internalType":"bytes32"},{"name":"dvn","type":"address","internalType":"address"}],"outputs":[{"name":"submitted","type":"bool","internalType":"bool"},{"name":"confirmations","type":"uint64","internalType":"uint64"}],"stateMutability":"view"},{"name":"isSupportedEid","type":"function","inputs":[{"name":"_eid","type":"uint32","internalType":"uint32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"messageLibType","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"enum MessageLibType"}],"stateMutability":"pure"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"renounceOwnership","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"setConfig","type":"function","inputs":[{"name":"_oapp","type":"address","internalType":"address"},{"name":"_params","type":"tuple[]","components":[{"name":"eid","type":"uint32","internalType":"uint32"},{"name":"configType","type":"uint32","internalType":"uint32"},{"name":"config","type":"bytes","internalType":"bytes"}],"internalType":"struct SetConfigParam[]"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"setDefaultUlnConfigs","type":"function","inputs":[{"name":"_params","type":"tuple[]","components":[{"name":"eid","type":"uint32","internalType":"uint32"},{"name":"config","type":"tuple","components":[{"name":"confirmations","type":"uint64","internalType":"uint64"},{"name":"requiredDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNThreshold","type":"uint8","internalType":"uint8"},{"name":"requiredDVNs","type":"address[]","internalType":"address[]"},{"name":"optionalDVNs","type":"address[]","internalType":"address[]"}],"internalType":"struct UlnConfig"}],"internalType":"struct SetDefaultUlnConfigParam[]"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"supportsInterface","type":"function","inputs":[{"name":"_interfaceId","type":"bytes4","internalType":"bytes4"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"transferOwnership","type":"function","inputs":[{"name":"newOwner","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"verifiable","type":"function","inputs":[{"name":"_config","type":"tuple","components":[{"name":"confirmations","type":"uint64","internalType":"uint64"},{"name":"requiredDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNCount","type":"uint8","internalType":"uint8"},{"name":"optionalDVNThreshold","type":"uint8","internalType":"uint8"},{"name":"requiredDVNs","type":"address[]","internalType":"address[]"},{"name":"optionalDVNs","type":"address[]","internalType":"address[]"}],"internalType":"struct UlnConfig"},{"name":"_headerHash","type":"bytes32","internalType":"bytes32"},{"name":"_payloadHash","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"verify","type":"function","inputs":[{"name":"_packetHeader","type":"bytes","internalType":"bytes"},{"name":"_payloadHash","type":"bytes32","internalType":"bytes32"},{"name":"_confirmations","type":"uint64","internalType":"uint64"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"version","type":"function","inputs":[],"outputs":[{"name":"major","type":"uint64","internalType":"uint64"},{"name":"minor","type":"uint8","internalType":"uint8"},{"name":"endpointVersion","type":"uint8","internalType":"uint8"}],"stateMutability":"pure"}],"matchId":"36220778","creationMatch":"match","runtimeMatch":"match","verifiedAt":"2026-06-25T16:30:26Z","match":"match","chainId":"137","address":"0x1322871e4ab09Bc7f5717189434f97bBD9546e95"}