synapsecns/sanguine

View on GitHub
services/explorer/contracts/messagebus/testmessagebus/testmessagebus.contractinfo.json

Summary

Maintainability
Test Coverage
{"/solidity/TestMessageBusUpgradeable.sol:AddressUpgradeable":{"code":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122080a8feece8aebd5a29ba816e7ad476af307ac260e3acdf96fefde8ba65c780f564736f6c63430008000033","runtime-code":"0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122080a8feece8aebd5a29ba816e7ad476af307ac260e3acdf96fefde8ba65c780f564736f6c63430008000033","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"211:3147:0:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;211:3147:0;;;;;;;;;;;;;;;;;","srcMapRuntime":"211:3147:0:-:0;;;;;;;;","abiDefinition":[],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"AddressUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{}},"/solidity/TestMessageBusUpgradeable.sol:ContextChainIdUpgradeable":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"ContextChainIdUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{}},"/solidity/TestMessageBusUpgradeable.sol:ContextUpgradeable":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"ContextUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{}},"/solidity/TestMessageBusUpgradeable.sol:IAuthVerifier":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[{"inputs":[{"internalType":"bytes","name":"_authData","type":"bytes"}],"name":"msgAuth","outputs":[{"internalType":"bool","name":"authenticated","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nodegroup","type":"address"}],"name":"setNodeGroup","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_authData\",\"type\":\"bytes\"}],\"name\":\"msgAuth\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"authenticated\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_nodegroup\",\"type\":\"address\"}],\"name\":\"setNodeGroup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"IAuthVerifier\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"msgAuth(bytes)":"8b1b3a2d","setNodeGroup(address)":"f6ea2c90"}},"/solidity/TestMessageBusUpgradeable.sol:IGasFeePricing":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[{"inputs":[{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"estimateGasFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"uint256","name":"_gasUnitPrice","type":"uint256"},{"internalType":"uint256","name":"_gasTokenPriceRatio","type":"uint256"}],"name":"setCostPerChain","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"}],\"name\":\"estimateGasFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasUnitPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_gasTokenPriceRatio\",\"type\":\"uint256\"}],\"name\":\"setCostPerChain\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"IGasFeePricing\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"estimateGasFee(uint256,bytes)":"47feadc1","setCostPerChain(uint256,uint256,uint256)":"e32192b7"}},"/solidity/TestMessageBusUpgradeable.sol:ISynMessagingReceiver":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[{"inputs":[{"internalType":"bytes32","name":"_srcAddress","type":"bytes32"},{"internalType":"uint256","name":"_srcChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"address","name":"_executor","type":"address"}],"name":"executeMessage","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_srcAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"_executor\",\"type\":\"address\"}],\"name\":\"executeMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"ISynMessagingReceiver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"executeMessage(bytes32,uint256,bytes,address)":"a6060871"}},"/solidity/TestMessageBusUpgradeable.sol:Initializable":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"Initializable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{}},"/solidity/TestMessageBusUpgradeable.sol:MessageBusReceiverUpgradeable":{"code":"0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220cee79873fb2a09b77d4bc866527128d03b9dfc2cf18612a3e711d9dd54fce98464736f6c63430008000033","runtime-code":"0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220cee79873fb2a09b77d4bc866527128d03b9dfc2cf18612a3e711d9dd54fce98464736f6c63430008000033","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"12014:3444:0:-:0;;;;;;;;;;;;;;;;;;;","srcMapRuntime":"12014:3444:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12946:133;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;6578:84;;;:::i;:::-;;;;;;;:::i;5588:101::-;;;:::i;:::-;;5372:85;;;:::i;:::-;;;;;;;:::i;15097:141::-;;;;;;:::i;:::-;;:::i;13086:1335::-;;;;;;:::i;:::-;;:::i;15244:180::-;;;;;;:::i;:::-;;:::i;12462:27::-;;;:::i;5696:198::-;;;;;;:::i;:::-;;:::i;12946:133::-;13017:8;13044:28;;;:16;:28;;;;;;;;12946:133;;;;:::o;6578:84::-;6648:7;;;;6578:84;:::o;5588:101::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;5652:30:::1;5679:1;5652:18;:30::i;:::-;5588:101::o:0;5372:85::-;5444:6;;;;5372:85;:::o;15097:141::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;15193:28:::1;::::0;;;:16:::1;:28;::::0;;;;:38;;15224:7;;15193:28;:38;::::1;::::0;15224:7;15193:38:::1;::::0;::::1;;;;;;;;;;;;;;;;;;;15097:141:::0;;:::o;13086:1335::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;;;;;;;;;:::i;:::-;13564:13:::1;13532:28:::0;;;:16:::1;:28;::::0;;;;;::::1;;:45;::::0;::::1;;;;;;;;;;;;;;;13524:82;;;;;;;;;;;;:::i;:::-;13703:12;::::0;13725:22:::1;::::0;13703:12:::1;::::0;;::::1;::::0;13689:35:::1;::::0;13725:22:::1;::::0;13736:10:::1;::::0;13725:22:::1;;;:::i;:::-;;;;;;;;;;;;;13689:59;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;13759:15;13822:11;13800:49;;;13855:9;13883:11;13912;13941:8;;13967:10;13800:191;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;13784:490;;;::::0;;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14192:35;14205:21;14219:6;14205:13;:21::i;:::-;14192:35;;;;;;:::i;:::-;;;;;;;;14250:13;14241:22;;14102:172;13784:490;;;-1:-1:-1::0;14074:16:0::1;13784:490;14284:28;::::0;;;:16:::1;:28;::::0;;;;:37;;14315:6;;14284:28;:37;::::1;::::0;14315:6;14284:37:::1;::::0;::::1;;;;;;;;;;;;;;;;;;;14365:11;14336:78;;14345:10;14336:78;14357:6;14385:11;14406:6;14336:78;;;;;;;;:::i;:::-;;;;;;;;6752:1;13086:1335:::0;;;;;;;;:::o;15244:180::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;15332:27:::1;::::0;::::1;15324:55;;;;;;;;;;;;:::i;:::-;15389:12;:28:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;15244:180::o;12462:27::-;;;;;;:::o;5696:198::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;5784:22:::1;::::0;::::1;5776:73;;;;;;;;;;;;:::i;:::-;5859:28;5878:8;5859:18;:28::i;:::-;5696:198:::0;:::o;4713:96::-;4792:10;4713:96;:::o;5901:187::-;5993:6;;;;6009:17;;;;;;;;;;;6041:40;;5993:6;;;6009:17;5993:6;;6041:40;;5974:16;;6041:40;5901:187;;:::o;14566:523::-;14638:13;14799:2;14778:11;:18;:23;14774:67;;;-1:-1:-1;14803:38:0;;;;;;;;;;;;;;;;;;;14774:67;14977:4;14964:11;14960:22;14945:37;;15019:11;15008:33;;;;;;;;;;;;:::i;:::-;15001:40;14566:523;-1:-1:-1;;14566:523:0:o;14:198:1:-;84:20;;144:42;133:54;;123:65;;113:2;;202:1;199;192:12;217:198;;329:2;317:9;308:7;304:23;300:32;297:2;;;350:6;342;335:22;297:2;378:31;399:9;378:31;:::i;:::-;368:41;287:128;-1:-1:-1;;;287:128:1:o;420:297::-;;540:2;528:9;519:7;515:23;511:32;508:2;;;561:6;553;546:22;508:2;598:9;592:16;651:5;644:13;637:21;630:5;627:32;617:2;;678:6;670;663:22;722:190;;834:2;822:9;813:7;809:23;805:32;802:2;;;855:6;847;840:22;802:2;-1:-1:-1;883:23:1;;792:120;-1:-1:-1;792:120:1:o;917:356::-;;;1058:2;1046:9;1037:7;1033:23;1029:32;1026:2;;;1079:6;1071;1064:22;1026:2;1120:9;1107:23;1097:33;;1180:2;1169:9;1165:18;1152:32;1213:1;1206:5;1203:12;1193:2;;1234:6;1226;1219:22;1193:2;1262:5;1252:15;;;1016:257;;;;;:::o;1278:953::-;;1411:2;1399:9;1390:7;1386:23;1382:32;1379:2;;;1432:6;1424;1417:22;1379:2;1470:9;1464:16;1499:18;1540:2;1532:6;1529:14;1526:2;;;1561:6;1553;1546:22;1526:2;1604:6;1593:9;1589:22;1579:32;;1649:7;1642:4;1638:2;1634:13;1630:27;1620:2;;1676:6;1668;1661:22;1620:2;1710;1704:9;1732:2;1728;1725:10;1722:2;;;1738:18;;:::i;:::-;1787:2;1781:9;1922:2;1852:66;1845:4;1841:2;1837:13;1833:86;1825:6;1821:99;1817:108;1975:6;1963:10;1960:22;1955:2;1943:10;1940:18;1937:46;1934:2;;;1986:18;;:::i;:::-;2022:2;2015:22;2046:18;;;2083:11;;;2096:2;2079:20;2076:33;-1:-1:-1;2073:2:1;;;2127:6;2119;2112:22;2073:2;2145:55;2197:2;2192;2184:6;2180:15;2175:2;2171;2167:11;2145:55;:::i;:::-;2219:6;1369:862;-1:-1:-1;;;;;;1369:862:1:o;2236:1061::-;;;;;;;;;2469:3;2457:9;2448:7;2444:23;2440:33;2437:2;;;2491:6;2483;2476:22;2437:2;2532:9;2519:23;2509:33;;2589:2;2578:9;2574:18;2561:32;2551:42;;2612:40;2648:2;2637:9;2633:18;2612:40;:::i;:::-;2602:50;;2699:2;2688:9;2684:18;2671:32;2661:42;;2750:3;2739:9;2735:19;2722:33;2712:43;;2806:3;2795:9;2791:19;2778:33;2830:18;2871:2;2863:6;2860:14;2857:2;;;2892:6;2884;2877:22;2857:2;2935:6;2924:9;2920:22;2910:32;;2980:7;2973:4;2969:2;2965:13;2961:27;2951:2;;3007:6;2999;2992:22;2951:2;3052;3039:16;3078:2;3070:6;3067:14;3064:2;;;3099:6;3091;3084:22;3064:2;3149:7;3144:2;3135:6;3131:2;3127:15;3123:24;3120:37;3117:2;;;3175:6;3167;3160:22;3117:2;3211;3207;3203:11;3193:21;;3233:6;3223:16;;;;;3286:3;3275:9;3271:19;3258:33;3248:43;;2427:870;;;;;;;;;;;:::o;3302:318::-;;3383:5;3377:12;3410:6;3405:3;3398:19;3426:63;3482:6;3475:4;3470:3;3466:14;3459:4;3452:5;3448:16;3426:63;:::i;:::-;3534:2;3522:15;3539:66;3518:88;3509:98;;;;3609:4;3505:109;;3353:267;-1:-1:-1;;3353:267:1:o;3625:296::-;3708:1;3701:5;3698:12;3688:2;;3744:77;3741:1;3734:88;3845:4;3842:1;3835:15;3873:4;3870:1;3863:15;3688:2;3897:18;;3678:243::o;3926:226::-;4102:42;4090:55;;;;4072:74;;4060:2;4045:18;;4027:125::o;4157:187::-;4322:14;;4315:22;4297:41;;4285:2;4270:18;;4252:92::o;4349:717::-;;4590:6;4579:9;4572:25;4633:6;4628:2;4617:9;4613:18;4606:34;4676:3;4671:2;4660:9;4656:18;4649:31;4717:6;4711:3;4700:9;4696:19;4689:35;4775:6;4767;4761:3;4750:9;4746:19;4733:49;4832:4;4826:3;4817:6;4806:9;4802:22;4798:32;4791:46;4964:3;4894:66;4889:2;4881:6;4877:15;4873:88;4862:9;4858:104;4854:114;4846:122;;5016:42;5008:6;5004:55;4999:2;4988:9;4984:18;4977:83;4562:504;;;;;;;;:::o;5071:219::-;;5218:2;5207:9;5200:21;5238:46;5280:2;5269:9;5265:18;5257:6;5238:46;:::i;5295:208::-;5439:2;5424:18;;5451:46;5428:9;5479:6;5451:46;:::i;5508:401::-;5704:2;5689:18;;5716:46;5693:9;5744:6;5716:46;:::i;:::-;5781:18;5847:2;5839:6;5835:15;5830:2;5819:9;5815:18;5808:43;5899:2;5891:6;5887:15;5882:2;5871:9;5867:18;5860:43;;5671:238;;;;;;:::o;6140:402::-;6342:2;6324:21;;;6381:2;6361:18;;;6354:30;6420:34;6415:2;6400:18;;6393:62;6491:8;6486:2;6471:18;;6464:36;6532:3;6517:19;;6314:228::o;6547:339::-;6749:2;6731:21;;;6788:2;6768:18;;;6761:30;6827:17;6822:2;6807:18;;6800:45;6877:2;6862:18;;6721:165::o;6891:340::-;7093:2;7075:21;;;7132:2;7112:18;;;7105:30;7171:18;7166:2;7151:18;;7144:46;7222:2;7207:18;;7065:166::o;7236:356::-;7438:2;7420:21;;;7457:18;;;7450:30;7516:34;7511:2;7496:18;;7489:62;7583:2;7568:18;;7410:182::o;7597:348::-;7799:2;7781:21;;;7838:2;7818:18;;;7811:30;7877:26;7872:2;7857:18;;7850:54;7936:2;7921:18;;7771:174::o;7950:258::-;8022:1;8032:113;8046:6;8043:1;8040:13;8032:113;;;8122:11;;;8116:18;8103:11;;;8096:39;8068:2;8061:10;8032:113;;;8163:6;8160:1;8157:13;8154:2;;;8198:1;8189:6;8184:3;8180:16;8173:27;8154:2;;8003:205;;;:::o;8213:184::-;8265:77;8262:1;8255:88;8362:4;8359:1;8352:15;8386:4;8383:1;8376:15","abiDefinition":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"CallReverted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":false,"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"status","type":"uint8"},{"indexed":true,"internalType":"address","name":"_dstAddress","type":"address"},{"indexed":false,"internalType":"uint64","name":"srcChainId","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"srcNonce","type":"uint64"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"authVerifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_srcChainId","type":"uint256"},{"internalType":"bytes32","name":"_srcAddress","type":"bytes32"},{"internalType":"address","name":"_dstAddress","type":"address"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes32","name":"_messageId","type":"bytes32"}],"name":"executeMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageId","type":"bytes32"}],"name":"getExecutedMessage","outputs":[{"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_authVerifier","type":"address"}],"name":"updateAuthVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageId","type":"bytes32"},{"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"_status","type":"uint8"}],"name":"updateMessageStatus","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"CallReverted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_dstAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcNonce\",\"type\":\"uint64\"}],\"name\":\"Executed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_srcAddress\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_dstAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"}],\"name\":\"executeMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"}],\"name\":\"getExecutedMessage\",\"outputs\":[{\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_authVerifier\",\"type\":\"address\"}],\"name\":\"updateAuthVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"},{\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"MessageBusReceiverUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"authVerifier()":"c4087335","executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)":"a1b058d8","getExecutedMessage(bytes32)":"25b19fa3","owner()":"8da5cb5b","paused()":"5c975abb","renounceOwnership()":"715018a6","transferOwnership(address)":"f2fde38b","updateAuthVerifier(address)":"a5c0edf3","updateMessageStatus(bytes32,uint8)":"9b11079c"}},"/solidity/TestMessageBusUpgradeable.sol:MessageBusSenderUpgradeable":{"code":"0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea2646970667358221220d9b4cb52b2968bd04d9a99e5cfad1610f75b886346400d381e742051528a901964736f6c63430008000033","runtime-code":"0x6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea2646970667358221220d9b4cb52b2968bd04d9a99e5cfad1610f75b886346400d381e742051528a901964736f6c63430008000033","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"7774:3694:0:-:0;;;;;;;;;;;;;;;;;;;","srcMapRuntime":"7774:3694:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11077:165;;;;;;;;;;-1:-1:-1;11077:165:0;;;;;:::i;:::-;;:::i;:::-;;6578:84;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;8984:252;;;;;;;;;;-1:-1:-1;8984:252:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;5588:101::-;;;;;;;;;;;;;:::i;9737:295::-;;;;;;:::i;:::-;;:::i;5372:85::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;7946:19::-;;;;;;;;;;;;;:::i;11248:185::-;;;;;;;;;;-1:-1:-1;11248:185:0;;;;;:::i;:::-;;:::i;7887:28::-;;;;;;;;;;;;;:::i;9242:489::-;;;;;;:::i;:::-;;:::i;7921:19::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;10875:195::-;;;;;;;;;;-1:-1:-1;10875:195:0;;;;;:::i;:::-;;:::i;5696:198::-;;;;;;;;;;-1:-1:-1;5696:198:0;;;;;:::i;:::-;;:::i;8622:356::-;;;;;;;;;;-1:-1:-1;8622:356:0;;;;;:::i;:::-;;:::i;11077:165::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;;;;;;;;;11145:22:::1;11194:4;;11170:21;:28;;;;:::i;:::-;11208:27;::::0;11145:53;;-1:-1:-1;11208:11:0::1;::::0;::::1;::::0;:27;::::1;;;::::0;11145:53;;11208:27:::1;::::0;;;11145:53;11208:11;:27;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;5573:1;11077:165:::0;:::o;6578:84::-;6648:7;;;;6578:84;:::o;8984:252::-;9115:13;;9100:67;;;;;9067:7;;;;9115:13;;;;;9100:44;;:67;;9145:11;;9158:8;;;;9100:67;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9086:81;-1:-1:-1;9185:8:0;9177:32;;;;;;;;;;;;:::i;:::-;9226:3;8984:252;-1:-1:-1;;;;8984:252:0:o;5588:101::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;5652:30:::1;5679:1;5652:18;:30::i;:::-;5588:101::o:0;9737:295::-;9953:72;9966:9;9977:11;9990:8;;10000;;10010:14;9953:12;:72::i;:::-;9737:295;;;;;;;:::o;5372:85::-;5444:6;;;;5372:85;:::o;7946:19::-;;;;:::o;11248:185::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;11338:28:::1;::::0;::::1;11330:56;;;;;;;;;;;;:::i;:::-;11396:13;:30:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;11248:185::o;7887:28::-;;;;;;:::o;9242:489::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;;;;;;;;;:::i;:::-;9648:76:::1;9661:9;9672:11;9685:8;;9695;;9713:9;9648:12;:76::i;:::-;9242:489:::0;;;;;;:::o;7921:19::-;;;;;;;;;:::o;10875:195::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;10974:4:::1;::::0;11015:27:::1;::::0;:11:::1;::::0;::::1;::::0;:27;::::1;;;::::0;10974:4;;10949:22:::1;11015:27:::0;10949:22;11015:27;10974:4;11015:11;:27;::::1;;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;11052:11:0::1;11059:4;11052:11:::0;-1:-1:-1;10875:195:0:o;5696:198::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;;;;;;;;;:::i;:::-;5784:22:::1;::::0;::::1;5776:73;;;;;;;;;;;;:::i;:::-;5859:28;5878:8;5859:18;:28::i;:::-;5696:198:::0;:::o;8622:356::-;8851:7;8898:11;8911;8924;8937;8950:9;8961:8;;8887:83;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8877:94;;;;;;8870:101;;8622:356;;;;;;;;;:::o;4713:96::-;4792:10;4713:96;:::o;5901:187::-;5993:6;;;;6009:17;;;;;;;;;;;6041:40;;5993:6;;;6009:17;5993:6;;6041:40;;5974:16;;6041:40;5901:187;;:::o;10038:830::-;10247:18;10268:10;:8;:10::i;:::-;10247:31;;10311:10;10296:11;:25;;10288:53;;;;;;;;;;;;:::i;:::-;10351:11;10365:34;10377:11;10390:8;;10365:11;:34::i;:::-;10351:48;;10430:3;10417:9;:16;;10409:49;;;;;;;;;;;;:::i;:::-;10468:13;10484:81;10501:10;10513;10525:9;10536:11;10549:5;;;;;;;;;;;10484:81;;10556:8;;10484:16;:81::i;:::-;10468:97;;10672:5;10627:11;10592:10;10580:98;;;10604:10;10616:9;10640:8;;10650:5;;;;;;;;;;;10657:8;;10667:3;10580:98;;;;;;;;;;;;;:::i;:::-;;;;;;;;10696:3;10688:4;;:11;;;;;;;:::i;:::-;;;;-1:-1:-1;;10711:5:0;10709:7;;10711:5;;10709:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;10792:3;10780:9;:15;10776:86;;;10811:23;;;:40;10835:15;10847:3;10835:9;:15;:::i;:::-;10811:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10776:86;10038:830;;;;;;;;;;:::o;7639:97::-;7716:13;7639:97;:::o;14:377:1:-;;;131:3;124:4;116:6;112:17;108:27;98:2;;156:8;146;139:26;98:2;-1:-1:-1;186:20:1;;229:18;218:30;;215:2;;;268:8;258;251:26;215:2;312:4;304:6;300:17;288:29;;364:3;357:4;348:6;340;336:19;332:30;329:39;326:2;;;381:1;378;371:12;326:2;88:303;;;;;:::o;396:259::-;;508:2;496:9;487:7;483:23;479:32;476:2;;;529:6;521;514:22;476:2;573:9;560:23;592:33;619:5;592:33;:::i;:::-;644:5;466:189;-1:-1:-1;;;466:189:1:o;932:843::-;;;;;;;;1148:3;1136:9;1127:7;1123:23;1119:33;1116:2;;;1170:6;1162;1155:22;1116:2;1214:9;1201:23;1233:33;1260:5;1233:33;:::i;:::-;1285:5;-1:-1:-1;1337:2:1;1322:18;;1309:32;;-1:-1:-1;1388:2:1;1373:18;;1360:32;;-1:-1:-1;1439:2:1;1424:18;;1411:32;;-1:-1:-1;1490:3:1;1475:19;;1462:33;;-1:-1:-1;1546:3:1;1531:19;;1518:33;1574:18;1563:30;;1560:2;;;1611:6;1603;1596:22;1560:2;1655:60;1707:7;1698:6;1687:9;1683:22;1655:60;:::i;:::-;1106:669;;;;-1:-1:-1;1106:669:1;;-1:-1:-1;1106:669:1;;;;1629:86;;-1:-1:-1;;;1106:669:1:o;1780:888::-;;;;;;;1981:3;1969:9;1960:7;1956:23;1952:33;1949:2;;;2003:6;1995;1988:22;1949:2;2044:9;2031:23;2021:33;;2101:2;2090:9;2086:18;2073:32;2063:42;;2156:2;2145:9;2141:18;2128:32;2179:18;2220:2;2212:6;2209:14;2206:2;;;2241:6;2233;2226:22;2206:2;2285:60;2337:7;2328:6;2317:9;2313:22;2285:60;:::i;:::-;2364:8;;-1:-1:-1;2259:86:1;-1:-1:-1;2452:2:1;2437:18;;2424:32;;-1:-1:-1;2468:16:1;;;2465:2;;;2502:6;2494;2487:22;2465:2;;2546:62;2600:7;2589:8;2578:9;2574:24;2546:62;:::i;:::-;1939:729;;;;-1:-1:-1;1939:729:1;;-1:-1:-1;1939:729:1;;2627:8;;1939:729;-1:-1:-1;;;1939:729:1:o;2673:1034::-;;;;;;;;2899:3;2887:9;2878:7;2874:23;2870:33;2867:2;;;2921:6;2913;2906:22;2867:2;2962:9;2949:23;2939:33;;3019:2;3008:9;3004:18;2991:32;2981:42;;3074:2;3063:9;3059:18;3046:32;3097:18;3138:2;3130:6;3127:14;3124:2;;;3159:6;3151;3144:22;3124:2;3203:60;3255:7;3246:6;3235:9;3231:22;3203:60;:::i;:::-;3282:8;;-1:-1:-1;3177:86:1;-1:-1:-1;3370:2:1;3355:18;;3342:32;;-1:-1:-1;3386:16:1;;;3383:2;;;3420:6;3412;3405:22;3383:2;;3464:62;3518:7;3507:8;3496:9;3492:24;3464:62;:::i;:::-;3545:8;;-1:-1:-1;3438:88:1;-1:-1:-1;;3630:3:1;3615:19;;3602:33;3644;3602;3644;:::i;:::-;3696:5;3686:15;;;2857:850;;;;;;;;;;:::o;3712:194::-;;3835:2;3823:9;3814:7;3810:23;3806:32;3803:2;;;3856:6;3848;3841:22;3803:2;-1:-1:-1;3884:16:1;;3793:113;-1:-1:-1;3793:113:1:o;3911:499::-;;;;4059:2;4047:9;4038:7;4034:23;4030:32;4027:2;;;4080:6;4072;4065:22;4027:2;4121:9;4108:23;4098:33;;4182:2;4171:9;4167:18;4154:32;4209:18;4201:6;4198:30;4195:2;;;4246:6;4238;4231:22;4195:2;4290:60;4342:7;4333:6;4322:9;4318:22;4290:60;:::i;:::-;4017:393;;4369:8;;-1:-1:-1;4264:86:1;;-1:-1:-1;;;;4017:393:1:o;4415:329::-;;4505:6;4500:3;4493:19;4557:6;4550:5;4543:4;4538:3;4534:14;4521:43;4609:3;4602:4;4593:6;4588:3;4584:16;4580:27;4573:40;4733:4;4663:66;4658:2;4650:6;4646:15;4642:88;4637:3;4633:98;4629:109;4622:116;;4483:261;;;;;:::o;4749:226::-;4925:42;4913:55;;;;4895:74;;4883:2;4868:18;;4850:125::o;4980:654::-;;5289:42;5281:6;5277:55;5266:9;5259:74;5369:6;5364:2;5353:9;5349:18;5342:34;5412:6;5407:2;5396:9;5392:18;5385:34;5455:6;5450:2;5439:9;5435:18;5428:34;5499:6;5493:3;5482:9;5478:19;5471:35;5543:3;5537;5526:9;5522:19;5515:32;5564:64;5623:3;5612:9;5608:19;5600:6;5592;5564:64;:::i;:::-;5556:72;5249:385;-1:-1:-1;;;;;;;;;5249:385:1:o;5639:187::-;5804:14;;5797:22;5779:41;;5767:2;5752:18;;5734:92::o;5831:177::-;5977:25;;;5965:2;5950:18;;5932:76::o;6013:339::-;6215:2;6197:21;;;6254:2;6234:18;;;6227:30;6293:17;6288:2;6273:18;;6266:45;6343:2;6328:18;;6187:165::o;6357:335::-;6559:2;6541:21;;;6598:2;6578:18;;;6571:30;6637:13;6632:2;6617:18;;6610:41;6683:2;6668:18;;6531:161::o;6697:402::-;6899:2;6881:21;;;6938:2;6918:18;;;6911:30;6977:34;6972:2;6957:18;;6950:62;7048:8;7043:2;7028:18;;7021:36;7089:3;7074:19;;6871:228::o;7104:339::-;7306:2;7288:21;;;7345:2;7325:18;;;7318:30;7384:17;7379:2;7364:18;;7357:45;7434:2;7419:18;;7278:165::o;7448:340::-;7650:2;7632:21;;;7689:2;7669:18;;;7662:30;7728:18;7723:2;7708:18;;7701:46;7779:2;7764:18;;7622:166::o;7793:356::-;7995:2;7977:21;;;8014:18;;;8007:30;8073:34;8068:2;8053:18;;8046:62;8140:2;8125:18;;7967:182::o;8154:344::-;8356:2;8338:21;;;8395:2;8375:18;;;8368:30;8434:22;8429:2;8414:18;;8407:50;8489:2;8474:18;;8328:170::o;8685:746::-;;9008:6;8997:9;8990:25;9051:6;9046:2;9035:9;9031:18;9024:34;9094:3;9089:2;9078:9;9074:18;9067:31;9121:64;9180:3;9169:9;9165:19;9157:6;9149;9121:64;:::i;:::-;9233:18;9225:6;9221:31;9216:2;9205:9;9201:18;9194:59;9302:9;9294:6;9290:22;9284:3;9273:9;9269:19;9262:51;9330;9374:6;9366;9358;9330:51;:::i;:::-;9322:59;;;9418:6;9412:3;9401:9;9397:19;9390:35;8980:451;;;;;;;;;;;:::o;9436:317::-;;9621:6;9610:9;9603:25;9664:2;9659;9648:9;9644:18;9637:30;9684:63;9743:2;9732:9;9728:18;9720:6;9712;9684:63;:::i;:::-;9676:71;9593:160;-1:-1:-1;;;;;9593:160:1:o;9758:200::-;9932:18;9920:31;;;;9902:50;;9890:2;9875:18;;9857:101::o;9963:128::-;;10034:1;10030:6;10027:1;10024:13;10021:2;;;10040:18;;:::i;:::-;-1:-1:-1;10076:9:1;;10011:80::o;10096:125::-;;10164:1;10161;10158:8;10155:2;;;10169:18;;:::i;:::-;-1:-1:-1;10206:9:1;;10145:76::o;10226:209::-;;10292:18;10345:2;10338:5;10334:14;10372:2;10363:7;10360:15;10357:2;;;10378:18;;:::i;:::-;10427:1;10414:15;;10272:163;-1:-1:-1;;;10272:163:1:o;10440:184::-;10492:77;10489:1;10482:88;10589:4;10586:1;10579:15;10613:4;10610:1;10603:15;10629:156;10717:42;10710:5;10706:54;10699:5;10696:65;10686:2;;10775:1;10772;10765:12","abiDefinition":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcChainID","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"receiver","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"dstChainId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"options","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"}],"name":"MessageSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"_srcAddress","type":"address"},{"internalType":"uint256","name":"_srcChainId","type":"uint256"},{"internalType":"bytes32","name":"_dstAddress","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"uint256","name":"_srcNonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"computeMessageId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"estimateFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasFeePricing","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"rescueGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_receiver","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"address payable","name":"_refundAddress","type":"address"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_receiver","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gasFeePricing","type":"address"}],"name":"updateGasFeePricing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"withdrawGasFees","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"srcChainID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiver\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"dstChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"options\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_srcAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_dstAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"computeMessageId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"}],\"name\":\"estimateFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasFeePricing\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"rescueGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiver\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiver\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gasFeePricing\",\"type\":\"address\"}],\"name\":\"updateGasFeePricing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"MessageBusSenderUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)":"f44d57aa","estimateFee(uint256,bytes)":"5da6d2c4","fees()":"9af1d35a","gasFeePricing()":"aa70fc0e","nonce()":"affed0e0","owner()":"8da5cb5b","paused()":"5c975abb","renounceOwnership()":"715018a6","rescueGas(address)":"205e157b","sendMessage(bytes32,uint256,bytes,bytes)":"ac8a4c1b","sendMessage(bytes32,uint256,bytes,bytes,address)":"72177189","transferOwnership(address)":"f2fde38b","updateGasFeePricing(address)":"a66dd384","withdrawGasFees(address)":"d6b457b9"}},"/solidity/TestMessageBusUpgradeable.sol:MessageBusUpgradeable":{"code":"0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea2646970667358221220131d19f31d38b0c80dcd99484abda79d51675a25ae643279d41130dcf95e80b264736f6c63430008000033","runtime-code":"0x6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea2646970667358221220131d19f31d38b0c80dcd99484abda79d51675a25ae643279d41130dcf95e80b264736f6c63430008000033","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"15461:557:0:-:0;;;;;;;;;;;;;;;;;;;","srcMapRuntime":"15461:557:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11077:165;;;;;;;;;;-1:-1:-1;11077:165:0;;;;;:::i;:::-;;:::i;:::-;;12946:133;;;;;;;;;;-1:-1:-1;12946:133:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;15951:65;;;;;;;;;;;;;:::i;15560:287::-;;;;;;;;;;-1:-1:-1;15560:287:0;;;;;:::i;:::-;;:::i;6578:84::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;8984:252::-;;;;;;;;;;-1:-1:-1;8984:252:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;5588:101::-;;;;;;;;;;;;;:::i;9737:295::-;;;;;;:::i;:::-;;:::i;15884:61::-;;;;;;;;;;;;;:::i;5372:85::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;7946:19::-;;;;;;;;;;;;;:::i;15097:141::-;;;;;;;;;;-1:-1:-1;15097:141:0;;;;;:::i;:::-;;:::i;13086:1335::-;;;;;;;;;;-1:-1:-1;13086:1335:0;;;;;:::i;:::-;;:::i;15244:180::-;;;;;;;;;;-1:-1:-1;15244:180:0;;;;;:::i;:::-;;:::i;11248:185::-;;;;;;;;;;-1:-1:-1;11248:185:0;;;;;:::i;:::-;;:::i;7887:28::-;;;;;;;;;;;;;:::i;9242:489::-;;;;;;:::i;:::-;;:::i;7921:19::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;12462:27::-;;;;;;;;;;;;;:::i;10875:195::-;;;;;;;;;;-1:-1:-1;10875:195:0;;;;;:::i;:::-;;:::i;5696:198::-;;;;;;;;;;-1:-1:-1;5696:198:0;;;;;:::i;:::-;;:::i;8622:356::-;;;;;;;;;;-1:-1:-1;8622:356:0;;;;;:::i;:::-;;:::i;11077:165::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;;;;;;;;;11145:22:::1;11194:4;;11170:21;:28;;;;:::i;:::-;11208:27;::::0;11145:53;;-1:-1:-1;11208:11:0::1;::::0;::::1;::::0;:27;::::1;;;::::0;11145:53;;11208:27:::1;::::0;;;11145:53;11208:11;:27;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;5573:1;11077:165:::0;:::o;12946:133::-;13017:8;13044:28;;;:16;:28;;;;;;;;12946:133;;;;:::o;15951:65::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15999:10:::1;:8;:10::i;:::-;15951:65::o:0;15560:287::-;3778:13;;;;;;;:48;;3814:12;;;;3813:13;3778:48;;;3794:16;:14;:16::i;:::-;3770:107;;;;-1:-1:-1;;;3770:107:0;;;;;;;:::i;:::-;3888:19;3911:13;;;;;;3910:14;3934:98;;;;3968:13;:20;;-1:-1:-1;;3968:20:0;;;;;;4002:19;3984:4;4002:19;;;3934:98;15658:26:::1;:24;:26::i;:::-;15694:27;:25;:27::i;:::-;15731:49;15765:14;15731:33;:49::i;:::-;15790:50;15826:13;15790:35;:50::i;:::-;4058:14:::0;4054:66;;;4104:5;4088:21;;;;;;15560:287;;;:::o;6578:84::-;6648:7;;;;6578:84;:::o;8984:252::-;9115:13;;9100:67;;;;;9067:7;;;;9115:13;;;;;9100:44;;:67;;9145:11;;9158:8;;;;9100:67;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9086:81;-1:-1:-1;9185:8:0;9177:32;;;;-1:-1:-1;;;9177:32:0;;;;;;;:::i;:::-;9226:3;8984:252;-1:-1:-1;;;;8984:252:0:o;5588:101::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;5652:30:::1;5679:1;5652:18;:30::i;9737:295::-:0;9953:72;9966:9;9977:11;9990:8;;10000;;10010:14;9953:12;:72::i;:::-;9737:295;;;;;;;:::o;15884:61::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15930:8:::1;:6;:8::i;5372:85::-:0;5444:6;;;;5372:85;:::o;7946:19::-;;;;:::o;15097:141::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15193:28:::1;::::0;;;:16:::1;:28;::::0;;;;:38;;15224:7;;15193:28;-1:-1:-1;;15193:38:0::1;::::0;15224:7;15193:38:::1;::::0;::::1;;;;;;;;;;;;;;;;;;;15097:141:::0;;:::o;13086:1335::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;-1:-1:-1;;;6704:38:0;;;;;;;:::i;:::-;13564:13:::1;13532:28:::0;;;:16:::1;:28;::::0;;;;;::::1;;:45;::::0;::::1;;;;;;;;;;;;;;;13524:82;;;;-1:-1:-1::0;;;13524:82:0::1;;;;;;;:::i;:::-;13703:12;::::0;13725:22:::1;::::0;13703:12:::1;::::0;;::::1;::::0;13689:35:::1;::::0;13725:22:::1;::::0;13736:10:::1;::::0;13725:22:::1;;;:::i;:::-;;;;;;;;;;;;;13689:59;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;13759:15;13822:11;13800:49;;;13855:9;13883:11;13912;13941:8;;13967:10;13800:191;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;13784:490;;;::::0;;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14192:35;14205:21;14219:6;14205:13;:21::i;:::-;14192:35;;;;;;:::i;:::-;;;;;;;;14250:13;14241:22;;14102:172;13784:490;;;-1:-1:-1::0;14074:16:0::1;13784:490;14284:28;::::0;;;:16:::1;:28;::::0;;;;:37;;14315:6;;14284:28;-1:-1:-1;;14284:37:0::1;::::0;14315:6;14284:37:::1;::::0;::::1;;;;;;;;;;;;;;;;;;;14365:11;14336:78;;14345:10;14336:78;14357:6;14385:11;14406:6;14336:78;;;;;;;;:::i;:::-;;;;;;;;6752:1;13086:1335:::0;;;;;;;;:::o;15244:180::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15332:27:::1;::::0;::::1;15324:55;;;;-1:-1:-1::0;;;15324:55:0::1;;;;;;;:::i;:::-;15389:12;:28:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;15244:180::o;11248:185::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;11338:28:::1;::::0;::::1;11330:56;;;;-1:-1:-1::0;;;11330:56:0::1;;;;;;;:::i;:::-;11396:13;:30:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;11248:185::o;7887:28::-;;;;;;:::o;9242:489::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;-1:-1:-1;;;6704:38:0;;;;;;;:::i;:::-;9648:76:::1;9661:9;9672:11;9685:8;;9695;;9713:9;9648:12;:76::i;:::-;9242:489:::0;;;;;;:::o;7921:19::-;;;;;;;;;:::o;12462:27::-;;;;;;:::o;10875:195::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;10974:4:::1;::::0;11015:27:::1;::::0;:11:::1;::::0;::::1;::::0;:27;::::1;;;::::0;10974:4;;10949:22:::1;11015:27:::0;10949:22;11015:27;10974:4;11015:11;:27;::::1;;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;11052:11:0::1;11059:4;11052:11:::0;-1:-1:-1;10875:195:0:o;5696:198::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;5784:22:::1;::::0;::::1;5776:73;;;;-1:-1:-1::0;;;5776:73:0::1;;;;;;;:::i;:::-;5859:28;5878:8;5859:18;:28::i;:::-;5696:198:::0;:::o;8622:356::-;8851:7;8898:11;8911;8924;8937;8950:9;8961:8;;8887:83;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8877:94;;;;;;8870:101;;8622:356;;;;;;;;;:::o;4713:96::-;4792:10;4713:96;:::o;6987:117::-;6807:8;:6;:8::i;:::-;6799:41;;;;-1:-1:-1;;;6799:41:0;;;;;;;:::i;:::-;7045:7:::1;:15:::0;;-1:-1:-1;;7045:15:0::1;::::0;;7075:22:::1;7084:12;:10;:12::i;:::-;7075:22;;;;;;:::i;:::-;;;;;;;;6987:117::o:0;4264:123::-;4312:4;4336:44;4374:4;4336:29;:44::i;:::-;4335:45;4328:52;;4264:123;:::o;5254:111::-;4179:13;;;;;;;4171:69;;;;-1:-1:-1;;;4171:69:0;;;;;;;:::i;:::-;5326:32:::1;5345:12;:10;:12::i;:::-;5326:18;:32::i;6476:95::-:0;4179:13;;;;;;;4171:69;;;;-1:-1:-1;;;4171:69:0;;;;;;;:::i;:::-;6549:7:::1;:15:::0;;-1:-1:-1;;6549:15:0::1;::::0;;6476:95::o;8200:140::-;4179:13;;;;;;;4171:69;;;;-1:-1:-1;;;4171:69:0;;;;;;;:::i;5901:187::-;5993:6;;;;6009:17;;;;;;;;;;;6041:40;;5993:6;;;6009:17;5993:6;;6041:40;;5974:16;;6041:40;5901:187;;:::o;10038:830::-;10247:18;10268:10;:8;:10::i;:::-;10247:31;;10311:10;10296:11;:25;;10288:53;;;;-1:-1:-1;;;10288:53:0;;;;;;;:::i;:::-;10351:11;10365:34;10377:11;10390:8;;10365:11;:34::i;:::-;10351:48;;10430:3;10417:9;:16;;10409:49;;;;-1:-1:-1;;;10409:49:0;;;;;;;:::i;:::-;10468:13;10484:81;10501:10;10513;10525:9;10536:11;10549:5;;;;;;;;;;;10484:81;;10556:8;;10484:16;:81::i;:::-;10468:97;;10672:5;10627:11;10592:10;10580:98;;;10604:10;10616:9;10640:8;;10650:5;;;;;;;;;;;10657:8;;10667:3;10580:98;;;;;;;;;;;;;:::i;:::-;;;;;;;;10696:3;10688:4;;:11;;;;;;;:::i;:::-;;;;-1:-1:-1;;10711:5:0;10709:7;;10711:5;;10709:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;10792:3;10780:9;:15;10776:86;;;10811:23;;;:40;10835:15;10847:3;10835:9;:15;:::i;:::-;10811:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10776:86;10038:830;;;;;;;;;;:::o;6865:115::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;-1:-1:-1;;;6704:38:0;;;;;;;:::i;:::-;6924:7:::1;:14:::0;;-1:-1:-1;;6924:14:0::1;6934:4;6924:14;::::0;;6953:20:::1;6960:12;:10;:12::i;14566:523::-:0;14638:13;14799:2;14778:11;:18;:23;14774:67;;;-1:-1:-1;14803:38:0;;;;;;;;;;;;;;;;;;;14774:67;14977:4;14964:11;14960:22;14945:37;;15019:11;15008:33;;;;;;;;;;;;:::i;:::-;15001:40;14566:523;-1:-1:-1;;14566:523:0:o;245:320::-;305:4;557:1;535:7;:12;;;;;;;;;;;;;;;;;;;;;;;;;:19;:23;;245:320;-1:-1:-1;;245:320:0:o;7639:97::-;7716:13;7639:97;:::o;14:377:1:-;;;131:3;124:4;116:6;112:17;108:27;98:2;;156:8;146;139:26;98:2;-1:-1:-1;186:20:1;;229:18;218:30;;215:2;;;268:8;258;251:26;215:2;312:4;304:6;300:17;288:29;;364:3;357:4;348:6;340;336:19;332:30;329:39;326:2;;;381:1;378;371:12;326:2;88:303;;;;;:::o;396:259::-;;508:2;496:9;487:7;483:23;479:32;476:2;;;529:6;521;514:22;476:2;573:9;560:23;592:33;619:5;592:33;:::i;:::-;644:5;466:189;-1:-1:-1;;;466:189:1:o;932:402::-;;;1061:2;1049:9;1040:7;1036:23;1032:32;1029:2;;;1082:6;1074;1067:22;1029:2;1126:9;1113:23;1145:33;1172:5;1145:33;:::i;:::-;1197:5;-1:-1:-1;1254:2:1;1239:18;;1226:32;1267:35;1226:32;1267:35;:::i;:::-;1321:7;1311:17;;;1019:315;;;;;:::o;1339:843::-;;;;;;;;1555:3;1543:9;1534:7;1530:23;1526:33;1523:2;;;1577:6;1569;1562:22;1523:2;1621:9;1608:23;1640:33;1667:5;1640:33;:::i;:::-;1692:5;-1:-1:-1;1744:2:1;1729:18;;1716:32;;-1:-1:-1;1795:2:1;1780:18;;1767:32;;-1:-1:-1;1846:2:1;1831:18;;1818:32;;-1:-1:-1;1897:3:1;1882:19;;1869:33;;-1:-1:-1;1953:3:1;1938:19;;1925:33;1981:18;1970:30;;1967:2;;;2018:6;2010;2003:22;1967:2;2062:60;2114:7;2105:6;2094:9;2090:22;2062:60;:::i;:::-;1513:669;;;;-1:-1:-1;1513:669:1;;-1:-1:-1;1513:669:1;;;;2036:86;;-1:-1:-1;;;1513:669:1:o;2187:297::-;;2307:2;2295:9;2286:7;2282:23;2278:32;2275:2;;;2328:6;2320;2313:22;2275:2;2365:9;2359:16;2418:5;2411:13;2404:21;2397:5;2394:32;2384:2;;2445:6;2437;2430:22;2489:190;;2601:2;2589:9;2580:7;2576:23;2572:32;2569:2;;;2622:6;2614;2607:22;2569:2;-1:-1:-1;2650:23:1;;2559:120;-1:-1:-1;2559:120:1:o;2684:356::-;;;2825:2;2813:9;2804:7;2800:23;2796:32;2793:2;;;2846:6;2838;2831:22;2793:2;2887:9;2874:23;2864:33;;2947:2;2936:9;2932:18;2919:32;2980:1;2973:5;2970:12;2960:2;;3001:6;2993;2986:22;3045:888;;;;;;;3246:3;3234:9;3225:7;3221:23;3217:33;3214:2;;;3268:6;3260;3253:22;3214:2;3309:9;3296:23;3286:33;;3366:2;3355:9;3351:18;3338:32;3328:42;;3421:2;3410:9;3406:18;3393:32;3444:18;3485:2;3477:6;3474:14;3471:2;;;3506:6;3498;3491:22;3471:2;3550:60;3602:7;3593:6;3582:9;3578:22;3550:60;:::i;:::-;3629:8;;-1:-1:-1;3524:86:1;-1:-1:-1;3717:2:1;3702:18;;3689:32;;-1:-1:-1;3733:16:1;;;3730:2;;;3767:6;3759;3752:22;3730:2;;3811:62;3865:7;3854:8;3843:9;3839:24;3811:62;:::i;:::-;3204:729;;;;-1:-1:-1;3204:729:1;;-1:-1:-1;3204:729:1;;3892:8;;3204:729;-1:-1:-1;;;3204:729:1:o;3938:1034::-;;;;;;;;4164:3;4152:9;4143:7;4139:23;4135:33;4132:2;;;4186:6;4178;4171:22;4132:2;4227:9;4214:23;4204:33;;4284:2;4273:9;4269:18;4256:32;4246:42;;4339:2;4328:9;4324:18;4311:32;4362:18;4403:2;4395:6;4392:14;4389:2;;;4424:6;4416;4409:22;4389:2;4468:60;4520:7;4511:6;4500:9;4496:22;4468:60;:::i;:::-;4547:8;;-1:-1:-1;4442:86:1;-1:-1:-1;4635:2:1;4620:18;;4607:32;;-1:-1:-1;4651:16:1;;;4648:2;;;4685:6;4677;4670:22;4648:2;;4729:62;4783:7;4772:8;4761:9;4757:24;4729:62;:::i;:::-;4810:8;;-1:-1:-1;4703:88:1;-1:-1:-1;;4895:3:1;4880:19;;4867:33;4909;4867;4909;:::i;:::-;4961:5;4951:15;;;4122:850;;;;;;;;;;:::o;4977:953::-;;5110:2;5098:9;5089:7;5085:23;5081:32;5078:2;;;5131:6;5123;5116:22;5078:2;5169:9;5163:16;5198:18;5239:2;5231:6;5228:14;5225:2;;;5260:6;5252;5245:22;5225:2;5303:6;5292:9;5288:22;5278:32;;5348:7;5341:4;5337:2;5333:13;5329:27;5319:2;;5375:6;5367;5360:22;5319:2;5409;5403:9;5431:2;5427;5424:10;5421:2;;;5437:18;;:::i;:::-;5486:2;5480:9;5621:2;5551:66;5544:4;5540:2;5536:13;5532:86;5524:6;5520:99;5516:108;5674:6;5662:10;5659:22;5654:2;5642:10;5639:18;5636:46;5633:2;;;5685:18;;:::i;:::-;5721:2;5714:22;5745:18;;;5782:11;;;5795:2;5778:20;5775:33;-1:-1:-1;5772:2:1;;;5826:6;5818;5811:22;5772:2;5844:55;5896:2;5891;5883:6;5879:15;5874:2;5870;5866:11;5844:55;:::i;:::-;5918:6;5068:862;-1:-1:-1;;;;;;5068:862:1:o;5935:194::-;;6058:2;6046:9;6037:7;6033:23;6029:32;6026:2;;;6079:6;6071;6064:22;6026:2;-1:-1:-1;6107:16:1;;6016:113;-1:-1:-1;6016:113:1:o;6134:912::-;;;;;;;;;6367:3;6355:9;6346:7;6342:23;6338:33;6335:2;;;6389:6;6381;6374:22;6335:2;6430:9;6417:23;6407:33;;6487:2;6476:9;6472:18;6459:32;6449:42;;6541:2;6530:9;6526:18;6513:32;6554:33;6581:5;6554:33;:::i;:::-;6606:5;-1:-1:-1;6658:2:1;6643:18;;6630:32;;-1:-1:-1;6709:3:1;6694:19;;6681:33;;-1:-1:-1;6765:3:1;6750:19;;6737:33;6793:18;6782:30;;6779:2;;;6830:6;6822;6815:22;6779:2;6874:60;6926:7;6917:6;6906:9;6902:22;6874:60;:::i;:::-;6325:721;;;;-1:-1:-1;6325:721:1;;;;;;6848:86;;7035:3;7020:19;7007:33;;6325:721;-1:-1:-1;;;;6325:721:1:o;7051:499::-;;;;7199:2;7187:9;7178:7;7174:23;7170:32;7167:2;;;7220:6;7212;7205:22;7167:2;7261:9;7248:23;7238:33;;7322:2;7311:9;7307:18;7294:32;7349:18;7341:6;7338:30;7335:2;;;7386:6;7378;7371:22;7335:2;7430:60;7482:7;7473:6;7462:9;7458:22;7430:60;:::i;:::-;7157:393;;7509:8;;-1:-1:-1;7404:86:1;;-1:-1:-1;;;;7157:393:1:o;7555:329::-;;7645:6;7640:3;7633:19;7697:6;7690:5;7683:4;7678:3;7674:14;7661:43;7749:3;7742:4;7733:6;7728:3;7724:16;7720:27;7713:40;7873:4;7803:66;7798:2;7790:6;7786:15;7782:88;7777:3;7773:98;7769:109;7762:116;;7623:261;;;;;:::o;7889:318::-;;7970:5;7964:12;7997:6;7992:3;7985:19;8013:63;8069:6;8062:4;8057:3;8053:14;8046:4;8039:5;8035:16;8013:63;:::i;:::-;8121:2;8109:15;8126:66;8105:88;8096:98;;;;8196:4;8092:109;;7940:267;-1:-1:-1;;7940:267:1:o;8212:296::-;8295:1;8288:5;8285:12;8275:2;;8331:77;8328:1;8321:88;8432:4;8429:1;8422:15;8460:4;8457:1;8450:15;8275:2;8484:18;;8265:243::o;8513:226::-;8689:42;8677:55;;;;8659:74;;8647:2;8632:18;;8614:125::o;8744:654::-;;9053:42;9045:6;9041:55;9030:9;9023:74;9133:6;9128:2;9117:9;9113:18;9106:34;9176:6;9171:2;9160:9;9156:18;9149:34;9219:6;9214:2;9203:9;9199:18;9192:34;9263:6;9257:3;9246:9;9242:19;9235:35;9307:3;9301;9290:9;9286:19;9279:32;9328:64;9387:3;9376:9;9372:19;9364:6;9356;9328:64;:::i;:::-;9320:72;9013:385;-1:-1:-1;;;;;;;;;9013:385:1:o;9403:187::-;9568:14;;9561:22;9543:41;;9531:2;9516:18;;9498:92::o;9595:177::-;9741:25;;;9729:2;9714:18;;9696:76::o;9777:510::-;;10018:6;10007:9;10000:25;10061:6;10056:2;10045:9;10041:18;10034:34;10104:3;10099:2;10088:9;10084:18;10077:31;10125:64;10184:3;10173:9;10169:19;10161:6;10153;10125:64;:::i;:::-;10117:72;;10237:42;10229:6;10225:55;10220:2;10209:9;10205:18;10198:83;9990:297;;;;;;;;:::o;10292:219::-;;10439:2;10428:9;10421:21;10459:46;10501:2;10490:9;10486:18;10478:6;10459:46;:::i;10516:208::-;10660:2;10645:18;;10672:46;10649:9;10700:6;10672:46;:::i;10729:401::-;10925:2;10910:18;;10937:46;10914:9;10965:6;10937:46;:::i;:::-;11002:18;11068:2;11060:6;11056:15;11051:2;11040:9;11036:18;11029:43;11120:2;11112:6;11108:15;11103:2;11092:9;11088:18;11081:43;;10892:238;;;;;;:::o;11361:339::-;11563:2;11545:21;;;11602:2;11582:18;;;11575:30;11641:17;11636:2;11621:18;;11614:45;11691:2;11676:18;;11535:165::o;11705:344::-;11907:2;11889:21;;;11946:2;11926:18;;;11919:30;11985:22;11980:2;11965:18;;11958:50;12040:2;12025:18;;11879:170::o;12054:335::-;12256:2;12238:21;;;12295:2;12275:18;;;12268:30;12334:13;12329:2;12314:18;;12307:41;12380:2;12365:18;;12228:161::o;12394:402::-;12596:2;12578:21;;;12635:2;12615:18;;;12608:30;12674:34;12669:2;12654:18;;12647:62;12745:8;12740:2;12725:18;;12718:36;12786:3;12771:19;;12568:228::o;12801:339::-;13003:2;12985:21;;;13042:2;13022:18;;;13015:30;13081:17;13076:2;13061:18;;13054:45;13131:2;13116:18;;12975:165::o;13145:340::-;13347:2;13329:21;;;13386:2;13366:18;;;13359:30;13425:18;13420:2;13405:18;;13398:46;13476:2;13461:18;;13319:166::o;13490:410::-;13692:2;13674:21;;;13731:2;13711:18;;;13704:30;13770:34;13765:2;13750:18;;13743:62;13841:16;13836:2;13821:18;;13814:44;13890:3;13875:19;;13664:236::o;13905:356::-;14107:2;14089:21;;;14126:18;;;14119:30;14185:34;14180:2;14165:18;;14158:62;14252:2;14237:18;;14079:182::o;14266:348::-;14468:2;14450:21;;;14507:2;14487:18;;;14480:30;14546:26;14541:2;14526:18;;14519:54;14605:2;14590:18;;14440:174::o;14619:344::-;14821:2;14803:21;;;14860:2;14840:18;;;14833:30;14899:22;14894:2;14879:18;;14872:50;14954:2;14939:18;;14793:170::o;14968:407::-;15170:2;15152:21;;;15209:2;15189:18;;;15182:30;15248:34;15243:2;15228:18;;15221:62;15319:13;15314:2;15299:18;;15292:41;15365:3;15350:19;;15142:233::o;15562:746::-;;15885:6;15874:9;15867:25;15928:6;15923:2;15912:9;15908:18;15901:34;15971:3;15966:2;15955:9;15951:18;15944:31;15998:64;16057:3;16046:9;16042:19;16034:6;16026;15998:64;:::i;:::-;16110:18;16102:6;16098:31;16093:2;16082:9;16078:18;16071:59;16179:9;16171:6;16167:22;16161:3;16150:9;16146:19;16139:51;16207;16251:6;16243;16235;16207:51;:::i;:::-;16199:59;;;16295:6;16289:3;16278:9;16274:19;16267:35;15857:451;;;;;;;;;;;:::o;16313:317::-;;16498:6;16487:9;16480:25;16541:2;16536;16525:9;16521:18;16514:30;16561:63;16620:2;16609:9;16605:18;16597:6;16589;16561:63;:::i;:::-;16553:71;16470:160;-1:-1:-1;;;;;16470:160:1:o;16635:200::-;16809:18;16797:31;;;;16779:50;;16767:2;16752:18;;16734:101::o;16840:128::-;;16911:1;16907:6;16904:1;16901:13;16898:2;;;16917:18;;:::i;:::-;-1:-1:-1;16953:9:1;;16888:80::o;16973:125::-;;17041:1;17038;17035:8;17032:2;;;17046:18;;:::i;:::-;-1:-1:-1;17083:9:1;;17022:76::o;17103:258::-;17175:1;17185:113;17199:6;17196:1;17193:13;17185:113;;;17275:11;;;17269:18;17256:11;;;17249:39;17221:2;17214:10;17185:113;;;17316:6;17313:1;17310:13;17307:2;;;17351:1;17342:6;17337:3;17333:16;17326:27;17307:2;;17156:205;;;:::o;17366:209::-;;17432:18;17485:2;17478:5;17474:14;17512:2;17503:7;17500:15;17497:2;;;17518:18;;:::i;:::-;17567:1;17554:15;;17412:163;-1:-1:-1;;;17412:163:1:o;17580:184::-;17632:77;17629:1;17622:88;17729:4;17726:1;17719:15;17753:4;17750:1;17743:15;17769:184;17821:77;17818:1;17811:88;17918:4;17915:1;17908:15;17942:4;17939:1;17932:15;17958:156;18046:42;18039:5;18035:54;18028:5;18025:65;18015:2;;18104:1;18101;18094:12","abiDefinition":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"CallReverted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":false,"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"status","type":"uint8"},{"indexed":true,"internalType":"address","name":"_dstAddress","type":"address"},{"indexed":false,"internalType":"uint64","name":"srcChainId","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"srcNonce","type":"uint64"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcChainID","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"receiver","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"dstChainId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"options","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"}],"name":"MessageSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"authVerifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_srcAddress","type":"address"},{"internalType":"uint256","name":"_srcChainId","type":"uint256"},{"internalType":"bytes32","name":"_dstAddress","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"uint256","name":"_srcNonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"computeMessageId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"estimateFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_srcChainId","type":"uint256"},{"internalType":"bytes32","name":"_srcAddress","type":"bytes32"},{"internalType":"address","name":"_dstAddress","type":"address"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes32","name":"_messageId","type":"bytes32"}],"name":"executeMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasFeePricing","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageId","type":"bytes32"}],"name":"getExecutedMessage","outputs":[{"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gasFeePricing","type":"address"},{"internalType":"address","name":"_authVerifier","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"rescueGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_receiver","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"address payable","name":"_refundAddress","type":"address"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_receiver","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_authVerifier","type":"address"}],"name":"updateAuthVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gasFeePricing","type":"address"}],"name":"updateGasFeePricing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageId","type":"bytes32"},{"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"_status","type":"uint8"}],"name":"updateMessageStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"withdrawGasFees","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"CallReverted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_dstAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcNonce\",\"type\":\"uint64\"}],\"name\":\"Executed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"srcChainID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiver\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"dstChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"options\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_srcAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_dstAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"computeMessageId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"}],\"name\":\"estimateFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_srcAddress\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_dstAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"}],\"name\":\"executeMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasFeePricing\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"}],\"name\":\"getExecutedMessage\",\"outputs\":[{\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gasFeePricing\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_authVerifier\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"rescueGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiver\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiver\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_authVerifier\",\"type\":\"address\"}],\"name\":\"updateAuthVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gasFeePricing\",\"type\":\"address\"}],\"name\":\"updateGasFeePricing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"},{\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"MessageBusUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"authVerifier()":"c4087335","computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)":"f44d57aa","estimateFee(uint256,bytes)":"5da6d2c4","executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)":"a1b058d8","fees()":"9af1d35a","gasFeePricing()":"aa70fc0e","getExecutedMessage(bytes32)":"25b19fa3","initialize(address,address)":"485cc955","nonce()":"affed0e0","owner()":"8da5cb5b","pause()":"8456cb59","paused()":"5c975abb","renounceOwnership()":"715018a6","rescueGas(address)":"205e157b","sendMessage(bytes32,uint256,bytes,bytes)":"ac8a4c1b","sendMessage(bytes32,uint256,bytes,bytes,address)":"72177189","transferOwnership(address)":"f2fde38b","unpause()":"3f4ba83a","updateAuthVerifier(address)":"a5c0edf3","updateGasFeePricing(address)":"a66dd384","updateMessageStatus(bytes32,uint8)":"9b11079c","withdrawGasFees(address)":"d6b457b9"}},"/solidity/TestMessageBusUpgradeable.sol:OwnableUpgradeable":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"OwnableUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"owner()":"8da5cb5b","renounceOwnership()":"715018a6","transferOwnership(address)":"f2fde38b"}},"/solidity/TestMessageBusUpgradeable.sol:PausableUpgradeable":{"code":"0x","runtime-code":"0x","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"","srcMapRuntime":"","abiDefinition":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"PausableUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"paused()":"5c975abb"}},"/solidity/TestMessageBusUpgradeable.sol:TestMessageBusUpgradeable":{"code":"0x608060405234801561001057600080fd5b5061219e806100206000396000f3fe6080604052600436106101965760003560e01c80638da5cb5b116100e1578063aa70fc0e1161008a578063c408733511610064578063c408733514610415578063d6b457b91461042a578063f2fde38b1461044a578063f44d57aa1461046a57610196565b8063aa70fc0e146103cb578063ac8a4c1b146103e0578063affed0e0146103f357610196565b8063a1b058d8116100bb578063a1b058d81461036b578063a5c0edf31461038b578063a66dd384146103ab57610196565b80638da5cb5b146103145780639af1d35a146103365780639b11079c1461034b57610196565b8063485cc95511610143578063715018a61161011d578063715018a6146102d757806372177189146102ec5780638456cb59146102ff57610196565b8063485cc955146102685780635c975abb146102885780635da6d2c4146102aa57610196565b806336d092691161017457806336d09269146102135780633f4ba83a14610233578063446e90451461024857610196565b8063205e157b1461019b57806325b19fa3146101bd57806328cab9af146101f3575b600080fd5b3480156101a757600080fd5b506101bb6101b63660046115a8565b61048a565b005b3480156101c957600080fd5b506101dd6101d8366004611764565b610547565b6040516101ea9190611cb1565b60405180910390f35b3480156101ff57600080fd5b506101bb61020e3660046117a7565b61055f565b34801561021f57600080fd5b506101bb61022e366004611603565b6105b9565b34801561023f57600080fd5b506101bb610624565b34801561025457600080fd5b506101bb61026336600461191a565b610687565b34801561027457600080fd5b506101bb6102833660046115cb565b6106c4565b34801561029457600080fd5b5061029d6107a0565b6040516101ea9190611c42565b3480156102b657600080fd5b506102ca6102c5366004611ab5565b6107a9565b6040516101ea9190611c4d565b3480156102e357600080fd5b506101bb610881565b6101bb6102fa366004611886565b6108e4565b34801561030b57600080fd5b506101bb6108fc565b34801561032057600080fd5b5061032961095d565b6040516101ea9190611bcc565b34801561034257600080fd5b506102ca610979565b34801561035757600080fd5b506101bb61036636600461177c565b61097f565b34801561037757600080fd5b506101bb610386366004611a33565b610a33565b34801561039757600080fd5b506101bb6103a63660046115a8565b610d14565b3480156103b757600080fd5b506101bb6103c63660046115a8565b610de7565b3480156103d757600080fd5b50610329610eba565b6101bb6103ee366004611806565b610ed6565b3480156103ff57600080fd5b50610408610f12565b6040516101ea919061204c565b34801561042157600080fd5b50610329610f3a565b34801561043657600080fd5b506101bb6104453660046115a8565b610f56565b34801561045657600080fd5b506101bb6104653660046115a8565b610fff565b34801561047657600080fd5b506102ca6104853660046116c9565b611097565b6104926110d9565b73ffffffffffffffffffffffffffffffffffffffff166104b061095d565b73ffffffffffffffffffffffffffffffffffffffff16146104ec5760405162461bcd60e51b81526004016104e390611ed0565b60405180910390fd5b600060ca54476104fc9190612079565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610542573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea658685856040516105aa93929190611cbf565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c60405161060f989796959493929190611fd0565b60405180910390a45050505050505050505050565b61062c6110d9565b73ffffffffffffffffffffffffffffffffffffffff1661064a61095d565b73ffffffffffffffffffffffffffffffffffffffff161461067d5760405162461bcd60e51b81526004016104e390611ed0565b6106856110dd565b565b7fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f82826040516106b8929190611cef565b60405180910390a15050565b600054610100900460ff166106df5760005460ff16156106e7565b6106e761114b565b6107035760405162461bcd60e51b81526004016104e390611e73565b600054610100900460ff1615801561074b576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61075361115c565b61075b611193565b610764836111c6565b61076d82610da0565b801561054257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061080890889088908890600401612029565b602060405180830381600087803b15801561082257600080fd5b505af1158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a9190611a1b565b9050806108795760405162461bcd60e51b81526004016104e390611d71565b949350505050565b6108896110d9565b73ffffffffffffffffffffffffffffffffffffffff166108a761095d565b73ffffffffffffffffffffffffffffffffffffffff16146108da5760405162461bcd60e51b81526004016104e390611ed0565b61068560006111ed565b6108f387878787878787611264565b50505050505050565b6109046110d9565b73ffffffffffffffffffffffffffffffffffffffff1661092261095d565b73ffffffffffffffffffffffffffffffffffffffff16146109555760405162461bcd60e51b81526004016104e390611ed0565b610685611437565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b6109876110d9565b73ffffffffffffffffffffffffffffffffffffffff166109a561095d565b73ffffffffffffffffffffffffffffffffffffffff16146109d85760405162461bcd60e51b81526004016104e390611ed0565b600082815260fb60205260409020805482919060ff19166001836002811115610a2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610a3b6107a0565b15610a585760405162461bcd60e51b81526004016104e390611e3c565b600081815260fb602052604081205460ff166002811115610aa2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610abf5760405162461bcd60e51b81526004016104e390611f05565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610af2903390602001611bcc565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610b1d9190611c9e565b60206040518083038186803b158015610b3557600080fd5b505afa158015610b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6d9190611744565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610bb2959493929190611c56565b600060405180830381600088803b158015610bcc57600080fd5b5087f193505050508015610bde575060015b610c5b573d808015610c0c576040519150601f19603f3d011682016040523d82523d6000602084013e610c11565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610c3c82611492565b604051610c499190611c9e565b60405180910390a16002915050610c5f565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610cb1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610d0193929190611cbf565b60405180910390a3505050505050505050565b610d1c6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610d3a61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610d6d5760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff8116610da05760405162461bcd60e51b81526004016104e390611e05565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610def6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610e0d61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610e405760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff8116610e735760405162461bcd60e51b81526004016104e390611e05565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610ede6107a0565b15610efb5760405162461bcd60e51b81526004016104e390611e3c565b610f0a86868686868632611264565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610f5e6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610f7c61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610faf5760405162461bcd60e51b81526004016104e390611ed0565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610ff5573d6000803e3d6000fd5b5050600060ca5550565b6110076110d9565b73ffffffffffffffffffffffffffffffffffffffff1661102561095d565b73ffffffffffffffffffffffffffffffffffffffff16146110585760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff811661108b5760405162461bcd60e51b81526004016104e390611da8565b611094816111ed565b50565b6000878787878787876040516020016110b69796959493929190611bed565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6110e56107a0565b6111015760405162461bcd60e51b81526004016104e390611d3a565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111346110d9565b6040516111419190611bcc565b60405180910390a1565b6000611156306114f8565b15905090565b600054610100900460ff166111835760405162461bcd60e51b81526004016104e390611f73565b61068561118e6110d9565b6111ed565b600054610100900460ff166111ba5760405162461bcd60e51b81526004016104e390611f73565b6065805460ff19169055565b600054610100900460ff16610e735760405162461bcd60e51b81526004016104e390611f73565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061126e611536565b9050808714156112905760405162461bcd60e51b81526004016104e390611d03565b600061129d8886866107a9565b9050803410156112bf5760405162461bcd60e51b81526004016104e390611f3c565b60006112f033848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d611097565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c60405161135e989796959493929190611fd0565b60405180910390a48160ca60008282546113789190612061565b909155505060c980546014906113af9074010000000000000000000000000000000000000000900467ffffffffffffffff166120c0565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508134111561142b5773ffffffffffffffffffffffffffffffffffffffff84166108fc6114018434612079565b6040518115909202916000818181858888f19350505050158015611429573d6000803e3d6000fd5b505b50505050505050505050565b61143f6107a0565b1561145c5760405162461bcd60e51b81526004016104e390611e3c565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111346110d9565b60606044825110156114d8575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261055a565b600482019150818060200190518101906114f2919061195a565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f84011261154b578182fd5b50813567ffffffffffffffff811115611562578182fd5b60208301915083602082850101111561157a57600080fd5b9250929050565b80356003811061055a57600080fd5b803567ffffffffffffffff8116811461055a57600080fd5b6000602082840312156115b9578081fd5b81356115c481612146565b9392505050565b600080604083850312156115dd578081fd5b82356115e881612146565b915060208301356115f881612146565b809150509250929050565b60008060008060008060008060008060006101208c8e031215611624578687fd5b61162e8c35612146565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e01351115611660578788fd5b6116708e60808f01358f0161153a565b909850965061168160a08e01611590565b95508060c08e01351115611693578485fd5b506116a48d60c08e01358e0161153a565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a0312156116e3578283fd5b87356116ee81612146565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115611725578283fd5b6117318a828b0161153a565b989b979a50959850939692959293505050565b600060208284031215611755578081fd5b815180151581146115c4578182fd5b600060208284031215611775578081fd5b5035919050565b6000806040838503121561178e578182fd5b8235915061179e60208401611581565b90509250929050565b600080600080600060a086880312156117be578081fd5b853594506117ce60208701611581565b935060408601356117de81612146565b92506117ec60608701611590565b91506117fa60808701611590565b90509295509295909350565b6000806000806000806080878903121561181e578384fd5b8635955060208701359450604087013567ffffffffffffffff80821115611843578586fd5b61184f8a838b0161153a565b90965094506060890135915080821115611867578384fd5b5061187489828a0161153a565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156118a0578081fd5b8735965060208801359550604088013567ffffffffffffffff808211156118c5578283fd5b6118d18b838c0161153a565b909750955060608a01359150808211156118e9578283fd5b506118f68a828b0161153a565b909450925050608088013561190a81612146565b8091505092959891949750929550565b6000806020838503121561192c578182fd5b823567ffffffffffffffff811115611942578283fd5b61194e8582860161153a565b90969095509350505050565b60006020828403121561196b578081fd5b815167ffffffffffffffff80821115611982578283fd5b818401915084601f830112611995578283fd5b8151818111156119a7576119a7612117565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119e9576119e9612117565b604052818152838201602001871015611a00578485fd5b611a11826020830160208701612090565b9695505050505050565b600060208284031215611a2c578081fd5b5051919050565b60008060008060008060008060e0898b031215611a4e578182fd5b88359750602089013596506040890135611a6781612146565b9550606089013594506080890135935060a089013567ffffffffffffffff811115611a90578283fd5b611a9c8b828c0161153a565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611ac9578081fd5b83359250602084013567ffffffffffffffff811115611ae6578182fd5b611af28682870161153a565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611b5f816020860160208601612090565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611bc8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611c3560c083018486611aff565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611c76608083018587611aff565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b6000602082526115c46020830184611b47565b602081016114f28284611b91565b60608101611ccd8286611b91565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b600060208252610879602083018486611aff565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611ff060c08301888a611aff565b67ffffffffffffffff871660608401528281036080840152612013818688611aff565b9150508260a08301529998505050505050505050565b600084825260406020830152612043604083018486611aff565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115612074576120746120e8565b500190565b60008282101561208b5761208b6120e8565b500390565b60005b838110156120ab578181015183820152602001612093565b838111156120ba576000848401525b50505050565b600067ffffffffffffffff808316818114156120de576120de6120e8565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461109457600080fdfea2646970667358221220fef43194b018b6863a536385d79656e3665256ba23ebc2bf6c0f1668f830bae764736f6c63430008000033","runtime-code":"0x6080604052600436106101965760003560e01c80638da5cb5b116100e1578063aa70fc0e1161008a578063c408733511610064578063c408733514610415578063d6b457b91461042a578063f2fde38b1461044a578063f44d57aa1461046a57610196565b8063aa70fc0e146103cb578063ac8a4c1b146103e0578063affed0e0146103f357610196565b8063a1b058d8116100bb578063a1b058d81461036b578063a5c0edf31461038b578063a66dd384146103ab57610196565b80638da5cb5b146103145780639af1d35a146103365780639b11079c1461034b57610196565b8063485cc95511610143578063715018a61161011d578063715018a6146102d757806372177189146102ec5780638456cb59146102ff57610196565b8063485cc955146102685780635c975abb146102885780635da6d2c4146102aa57610196565b806336d092691161017457806336d09269146102135780633f4ba83a14610233578063446e90451461024857610196565b8063205e157b1461019b57806325b19fa3146101bd57806328cab9af146101f3575b600080fd5b3480156101a757600080fd5b506101bb6101b63660046115a8565b61048a565b005b3480156101c957600080fd5b506101dd6101d8366004611764565b610547565b6040516101ea9190611cb1565b60405180910390f35b3480156101ff57600080fd5b506101bb61020e3660046117a7565b61055f565b34801561021f57600080fd5b506101bb61022e366004611603565b6105b9565b34801561023f57600080fd5b506101bb610624565b34801561025457600080fd5b506101bb61026336600461191a565b610687565b34801561027457600080fd5b506101bb6102833660046115cb565b6106c4565b34801561029457600080fd5b5061029d6107a0565b6040516101ea9190611c42565b3480156102b657600080fd5b506102ca6102c5366004611ab5565b6107a9565b6040516101ea9190611c4d565b3480156102e357600080fd5b506101bb610881565b6101bb6102fa366004611886565b6108e4565b34801561030b57600080fd5b506101bb6108fc565b34801561032057600080fd5b5061032961095d565b6040516101ea9190611bcc565b34801561034257600080fd5b506102ca610979565b34801561035757600080fd5b506101bb61036636600461177c565b61097f565b34801561037757600080fd5b506101bb610386366004611a33565b610a33565b34801561039757600080fd5b506101bb6103a63660046115a8565b610d14565b3480156103b757600080fd5b506101bb6103c63660046115a8565b610de7565b3480156103d757600080fd5b50610329610eba565b6101bb6103ee366004611806565b610ed6565b3480156103ff57600080fd5b50610408610f12565b6040516101ea919061204c565b34801561042157600080fd5b50610329610f3a565b34801561043657600080fd5b506101bb6104453660046115a8565b610f56565b34801561045657600080fd5b506101bb6104653660046115a8565b610fff565b34801561047657600080fd5b506102ca6104853660046116c9565b611097565b6104926110d9565b73ffffffffffffffffffffffffffffffffffffffff166104b061095d565b73ffffffffffffffffffffffffffffffffffffffff16146104ec5760405162461bcd60e51b81526004016104e390611ed0565b60405180910390fd5b600060ca54476104fc9190612079565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610542573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea658685856040516105aa93929190611cbf565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c60405161060f989796959493929190611fd0565b60405180910390a45050505050505050505050565b61062c6110d9565b73ffffffffffffffffffffffffffffffffffffffff1661064a61095d565b73ffffffffffffffffffffffffffffffffffffffff161461067d5760405162461bcd60e51b81526004016104e390611ed0565b6106856110dd565b565b7fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f82826040516106b8929190611cef565b60405180910390a15050565b600054610100900460ff166106df5760005460ff16156106e7565b6106e761114b565b6107035760405162461bcd60e51b81526004016104e390611e73565b600054610100900460ff1615801561074b576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61075361115c565b61075b611193565b610764836111c6565b61076d82610da0565b801561054257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061080890889088908890600401612029565b602060405180830381600087803b15801561082257600080fd5b505af1158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a9190611a1b565b9050806108795760405162461bcd60e51b81526004016104e390611d71565b949350505050565b6108896110d9565b73ffffffffffffffffffffffffffffffffffffffff166108a761095d565b73ffffffffffffffffffffffffffffffffffffffff16146108da5760405162461bcd60e51b81526004016104e390611ed0565b61068560006111ed565b6108f387878787878787611264565b50505050505050565b6109046110d9565b73ffffffffffffffffffffffffffffffffffffffff1661092261095d565b73ffffffffffffffffffffffffffffffffffffffff16146109555760405162461bcd60e51b81526004016104e390611ed0565b610685611437565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b6109876110d9565b73ffffffffffffffffffffffffffffffffffffffff166109a561095d565b73ffffffffffffffffffffffffffffffffffffffff16146109d85760405162461bcd60e51b81526004016104e390611ed0565b600082815260fb60205260409020805482919060ff19166001836002811115610a2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610a3b6107a0565b15610a585760405162461bcd60e51b81526004016104e390611e3c565b600081815260fb602052604081205460ff166002811115610aa2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610abf5760405162461bcd60e51b81526004016104e390611f05565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610af2903390602001611bcc565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610b1d9190611c9e565b60206040518083038186803b158015610b3557600080fd5b505afa158015610b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6d9190611744565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610bb2959493929190611c56565b600060405180830381600088803b158015610bcc57600080fd5b5087f193505050508015610bde575060015b610c5b573d808015610c0c576040519150601f19603f3d011682016040523d82523d6000602084013e610c11565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610c3c82611492565b604051610c499190611c9e565b60405180910390a16002915050610c5f565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610cb1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610d0193929190611cbf565b60405180910390a3505050505050505050565b610d1c6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610d3a61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610d6d5760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff8116610da05760405162461bcd60e51b81526004016104e390611e05565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610def6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610e0d61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610e405760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff8116610e735760405162461bcd60e51b81526004016104e390611e05565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610ede6107a0565b15610efb5760405162461bcd60e51b81526004016104e390611e3c565b610f0a86868686868632611264565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610f5e6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610f7c61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610faf5760405162461bcd60e51b81526004016104e390611ed0565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610ff5573d6000803e3d6000fd5b5050600060ca5550565b6110076110d9565b73ffffffffffffffffffffffffffffffffffffffff1661102561095d565b73ffffffffffffffffffffffffffffffffffffffff16146110585760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff811661108b5760405162461bcd60e51b81526004016104e390611da8565b611094816111ed565b50565b6000878787878787876040516020016110b69796959493929190611bed565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6110e56107a0565b6111015760405162461bcd60e51b81526004016104e390611d3a565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111346110d9565b6040516111419190611bcc565b60405180910390a1565b6000611156306114f8565b15905090565b600054610100900460ff166111835760405162461bcd60e51b81526004016104e390611f73565b61068561118e6110d9565b6111ed565b600054610100900460ff166111ba5760405162461bcd60e51b81526004016104e390611f73565b6065805460ff19169055565b600054610100900460ff16610e735760405162461bcd60e51b81526004016104e390611f73565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061126e611536565b9050808714156112905760405162461bcd60e51b81526004016104e390611d03565b600061129d8886866107a9565b9050803410156112bf5760405162461bcd60e51b81526004016104e390611f3c565b60006112f033848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d611097565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c60405161135e989796959493929190611fd0565b60405180910390a48160ca60008282546113789190612061565b909155505060c980546014906113af9074010000000000000000000000000000000000000000900467ffffffffffffffff166120c0565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508134111561142b5773ffffffffffffffffffffffffffffffffffffffff84166108fc6114018434612079565b6040518115909202916000818181858888f19350505050158015611429573d6000803e3d6000fd5b505b50505050505050505050565b61143f6107a0565b1561145c5760405162461bcd60e51b81526004016104e390611e3c565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111346110d9565b60606044825110156114d8575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261055a565b600482019150818060200190518101906114f2919061195a565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f84011261154b578182fd5b50813567ffffffffffffffff811115611562578182fd5b60208301915083602082850101111561157a57600080fd5b9250929050565b80356003811061055a57600080fd5b803567ffffffffffffffff8116811461055a57600080fd5b6000602082840312156115b9578081fd5b81356115c481612146565b9392505050565b600080604083850312156115dd578081fd5b82356115e881612146565b915060208301356115f881612146565b809150509250929050565b60008060008060008060008060008060006101208c8e031215611624578687fd5b61162e8c35612146565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e01351115611660578788fd5b6116708e60808f01358f0161153a565b909850965061168160a08e01611590565b95508060c08e01351115611693578485fd5b506116a48d60c08e01358e0161153a565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a0312156116e3578283fd5b87356116ee81612146565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115611725578283fd5b6117318a828b0161153a565b989b979a50959850939692959293505050565b600060208284031215611755578081fd5b815180151581146115c4578182fd5b600060208284031215611775578081fd5b5035919050565b6000806040838503121561178e578182fd5b8235915061179e60208401611581565b90509250929050565b600080600080600060a086880312156117be578081fd5b853594506117ce60208701611581565b935060408601356117de81612146565b92506117ec60608701611590565b91506117fa60808701611590565b90509295509295909350565b6000806000806000806080878903121561181e578384fd5b8635955060208701359450604087013567ffffffffffffffff80821115611843578586fd5b61184f8a838b0161153a565b90965094506060890135915080821115611867578384fd5b5061187489828a0161153a565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156118a0578081fd5b8735965060208801359550604088013567ffffffffffffffff808211156118c5578283fd5b6118d18b838c0161153a565b909750955060608a01359150808211156118e9578283fd5b506118f68a828b0161153a565b909450925050608088013561190a81612146565b8091505092959891949750929550565b6000806020838503121561192c578182fd5b823567ffffffffffffffff811115611942578283fd5b61194e8582860161153a565b90969095509350505050565b60006020828403121561196b578081fd5b815167ffffffffffffffff80821115611982578283fd5b818401915084601f830112611995578283fd5b8151818111156119a7576119a7612117565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119e9576119e9612117565b604052818152838201602001871015611a00578485fd5b611a11826020830160208701612090565b9695505050505050565b600060208284031215611a2c578081fd5b5051919050565b60008060008060008060008060e0898b031215611a4e578182fd5b88359750602089013596506040890135611a6781612146565b9550606089013594506080890135935060a089013567ffffffffffffffff811115611a90578283fd5b611a9c8b828c0161153a565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611ac9578081fd5b83359250602084013567ffffffffffffffff811115611ae6578182fd5b611af28682870161153a565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611b5f816020860160208601612090565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611bc8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611c3560c083018486611aff565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611c76608083018587611aff565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b6000602082526115c46020830184611b47565b602081016114f28284611b91565b60608101611ccd8286611b91565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b600060208252610879602083018486611aff565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611ff060c08301888a611aff565b67ffffffffffffffff871660608401528281036080840152612013818688611aff565b9150508260a08301529998505050505050505050565b600084825260406020830152612043604083018486611aff565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115612074576120746120e8565b500190565b60008282101561208b5761208b6120e8565b500390565b60005b838110156120ab578181015183820152602001612093565b838111156120ba576000848401525b50505050565b600067ffffffffffffffff808316818114156120de576120de6120e8565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461109457600080fdfea2646970667358221220fef43194b018b6863a536385d79656e3665256ba23ebc2bf6c0f1668f830bae764736f6c63430008000033","info":{"source":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\n\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\n\n\n\nlibrary AddressUpgradeable {\n\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length \u003e 0;\n    }\n\n\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance \u003e= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance \u003e= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length \u003e 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n\nabstract contract Initializable {\n\n    bool private _initialized;\n\n\n    bool private _initializing;\n\n\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n\n\n\n\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\n\n\n\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\n\n\n\n\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\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\n    uint256[50] private __gap;\n}\n\n\n\n\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    function __Ownable_init() internal onlyInitializing {\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\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    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n\n\n    uint256[49] private __gap;\n}\n\n\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\n\n\n\n\n\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n\n    event Paused(address account);\n\n    event Unpaused(address account);\n\n    bool private _paused;\n\n\n    function __Pausable_init() internal onlyInitializing {\n        __Pausable_init_unchained();\n    }\n\n    function __Pausable_init_unchained() internal onlyInitializing {\n        _paused = false;\n    }\n\n\n    function paused() public view virtual returns (bool) {\n        return _paused;\n    }\n\n\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n\n    modifier whenPaused() {\n        require(paused(), \"Pausable: not paused\");\n        _;\n    }\n\n\n    function _pause() internal virtual whenNotPaused {\n        _paused = true;\n        emit Paused(_msgSender());\n    }\n\n\n    function _unpause() internal virtual whenPaused {\n        _paused = false;\n        emit Unpaused(_msgSender());\n    }\n\n    uint256[49] private __gap;\n}\n\n\n\n\n\n\ninterface IGasFeePricing {\n\n    function setCostPerChain(\n        uint256 _dstChainId,\n        uint256 _gasUnitPrice,\n        uint256 _gasTokenPriceRatio\n    ) external;\n\n\n    function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256);\n}\n\n\n\n\n\n\n\nabstract contract ContextChainIdUpgradeable is Initializable {\n    function __ContextChainId_init() internal onlyInitializing {}\n\n    function __ContextChainId_init_unchained() internal onlyInitializing {}\n\n    function _chainId() internal view virtual returns (uint256) {\n        return block.chainid;\n    }\n\n\n    uint256[50] private __gap;\n}\n\n\ncontract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable {\n    address public gasFeePricing;\n    uint64 public nonce;\n    uint256 public fees;\n\n    function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n    }\n\n    function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing {\n        gasFeePricing = _gasFeePricing;\n    }\n\n    event MessageSent(\n        address indexed sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 indexed dstChainId,\n        bytes message,\n        uint64 nonce,\n        bytes options,\n        uint256 fee,\n        bytes32 indexed messageId\n    );\n\n    function computeMessageId(\n        address _srcAddress,\n        uint256 _srcChainId,\n        bytes32 _dstAddress,\n        uint256 _dstChainId,\n        uint256 _srcNonce,\n        bytes calldata _message\n    ) public pure returns (bytes32) {\n        return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message));\n    }\n\n    function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) {\n        uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options);\n        require(fee != 0, \"Fee not set\");\n        return fee;\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options\n    ) external payable whenNotPaused {\n        // use tx.origin for gas refund by default, so that older contracts,\n        // interacting with MessageBus that don't have a fallback/receive\n        // (i.e. not able to receive gas), will continue to work\n        _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin));\n    }\n\n    function sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) external payable {\n        _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress);\n    }\n\n    function _sendMessage(\n        bytes32 _receiver,\n        uint256 _dstChainId,\n        bytes calldata _message,\n        bytes calldata _options,\n        address payable _refundAddress\n    ) internal {\n        uint256 srcChainId = _chainId();\n        require(_dstChainId != srcChainId, \"Invalid chainId\");\n        uint256 fee = estimateFee(_dstChainId, _options);\n        require(msg.value \u003e= fee, \"Insufficient gas fee\");\n        bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message);\n        emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId);\n        fees += fee;\n        ++nonce;\n        // refund gas fees in case of overpayment\n        if (msg.value \u003e fee) {\n            _refundAddress.transfer(msg.value - fee);\n        }\n    }\n\n\n    function withdrawGasFees(address payable to) external onlyOwner {\n        uint256 withdrawAmount = fees;\n        // Reset fees to 0\n        to.transfer(withdrawAmount);\n        delete fees;\n    }\n\n\n    function rescueGas(address payable to) external onlyOwner {\n        uint256 withdrawAmount = address(this).balance - fees;\n        to.transfer(withdrawAmount);\n    }\n\n    function updateGasFeePricing(address _gasFeePricing) external onlyOwner {\n        require(_gasFeePricing != address(0), \"Cannot set to 0\");\n        gasFeePricing = _gasFeePricing;\n    }\n\n\n    uint256[47] private __gap;\n}\n\n\n\n\n\n\n\n\n\n\n\n\ninterface IAuthVerifier {\n\n    function msgAuth(bytes calldata _authData) external view returns (bool authenticated);\n\n\n    function setNodeGroup(address _nodegroup) external;\n}\n\n\n\n\n\ninterface ISynMessagingReceiver {\n    // Maps chain ID to the bytes32 trusted addresses allowed to be source senders\n    // mapping(uint256 =\u003e bytes32) internal trustedRemoteLookup;\n\n\n    function executeMessage(\n        bytes32 _srcAddress,\n        uint256 _srcChainId,\n        bytes calldata _message,\n        address _executor\n    ) external;\n}\n\n\ncontract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable {\n    enum TxStatus {\n        Null,\n        Success,\n        Fail\n    }\n\n    // TODO: Rename to follow one standard convention -\u003e Send -\u003e Receive?\n    event Executed(\n        bytes32 indexed messageId,\n        TxStatus status,\n        address indexed _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    );\n    event CallReverted(string reason);\n\n    address public authVerifier;\n\n    // Store all successfully executed messages\n    mapping(bytes32 =\u003e TxStatus) internal executedMessages;\n\n    function __MessageBusReceiver_init(address _authVerifier) internal {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    function __MessageBusReceiver_init_unchained(address _authVerifier) internal {\n        authVerifier = _authVerifier;\n    }\n\n    function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) {\n        return executedMessages[_messageId];\n    }\n\n\n    function executeMessage(\n        uint256 _srcChainId,\n        bytes32 _srcAddress,\n        address _dstAddress,\n        uint256 _gasLimit,\n        uint256 _nonce,\n        bytes calldata _message,\n        bytes32 _messageId\n    ) external whenNotPaused {\n        // In order to guarantee that an individual message is only executed once, a messageId is passed\n        // enforce that this message ID hasn't already been tried ever\n        require(executedMessages[_messageId] == TxStatus.Null, \"Message already executed\");\n        // Authenticate executeMessage, will revert if not authenticated\n        IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender));\n\n        TxStatus status;\n        try\n            ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}(\n                _srcAddress,\n                _srcChainId,\n                _message,\n                msg.sender\n            )\n        {\n            // Assuming success state if no revert\n            status = TxStatus.Success;\n        } catch (bytes memory reason) {\n            // call hard reverted \u0026 failed\n            emit CallReverted(_getRevertMsg(reason));\n            status = TxStatus.Fail;\n        }\n\n        executedMessages[_messageId] = status;\n        emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce));\n    }\n\n\n    // https://ethereum.stackexchange.com/a/83577\n    // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol\n    function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) {\n        // If the _res length is less than 68, then the transaction failed silently (without a revert message)\n        if (_returnData.length \u003c 68) return \"Transaction reverted silently\";\n        // solhint-disable-next-line\n        assembly {\n            // Slice the sighash.\n            _returnData := add(_returnData, 0x04)\n        }\n        return abi.decode(_returnData, (string)); // All that remains is the revert string\n    }\n\n\n\n    function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner {\n        executedMessages[_messageId] = _status;\n    }\n\n    function updateAuthVerifier(address _authVerifier) external onlyOwner {\n        require(_authVerifier != address(0), \"Cannot set to 0\");\n        authVerifier = _authVerifier;\n    }\n\n    uint256[48] private __gap;\n}\n\n\ncontract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable {\n    function initialize(address _gasFeePricing, address _authVerifier) external initializer {\n        __Ownable_init_unchained();\n        __Pausable_init_unchained();\n        __MessageBusSender_init_unchained(_gasFeePricing);\n        __MessageBusReceiver_init_unchained(_authVerifier);\n    }\n\n    // PAUSABLE FUNCTIONS ***/\n    function pause() external onlyOwner {\n        _pause();\n    }\n\n    function unpause() external onlyOwner {\n        _unpause();\n    }\n}\n\n\n\n\n\ncontract TestMessageBusUpgradeable is MessageBusUpgradeable {\n\n    function testExecuted(\n        bytes32 messageId,\n        TxStatus status,\n        address  _dstAddress,\n        uint64 srcChainId,\n        uint64 srcNonce\n    ) external {\n        emit Executed(\n            messageId,\n            status,\n            _dstAddress,\n            srcChainId,\n            srcNonce\n        );\n    }\n    function testMessageSent(\n        address sender,\n        uint256 srcChainID,\n        bytes32 receiver,\n        uint256 dstChainId,\n        bytes calldata message,\n        uint64 nonce,\n        bytes calldata options,\n        uint256 fee,\n        bytes32 messageId\n    ) external {\n        emit MessageSent(\n            sender,\n            srcChainID,\n            receiver,\n            dstChainId,\n            message,\n            nonce,\n            options,\n            fee,\n            messageId\n        );\n    }\n    function testCallReverted(\n        string calldata reason\n    ) external {\n        emit CallReverted(\n            reason\n        );\n    }\n}\n\n\n\n","language":"Solidity","languageVersion":"0.8.0","compilerVersion":"0.8.0","compilerOptions":"--combined-json bin,bin-runtime,srcmap,srcmap-runtime,abi,userdoc,devdoc,metadata,hashes --optimize --optimize-runs 10000 --allow-paths ., ./, ../","srcMap":"16024:1055:0:-:0;;;;;;;;;;;;;;;;;;;","srcMapRuntime":"16024:1055:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11077:165;;;;;;;;;;-1:-1:-1;11077:165:0;;;;;:::i;:::-;;:::i;:::-;;12946:133;;;;;;;;;;-1:-1:-1;12946:133:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16091:325;;;;;;;;;;-1:-1:-1;16091:325:0;;;;;:::i;:::-;;:::i;16421:514::-;;;;;;;;;;-1:-1:-1;16421:514:0;;;;;:::i;:::-;;:::i;15951:65::-;;;;;;;;;;;;;:::i;16940:137::-;;;;;;;;;;-1:-1:-1;16940:137:0;;;;;:::i;:::-;;:::i;15560:287::-;;;;;;;;;;-1:-1:-1;15560:287:0;;;;;:::i;:::-;;:::i;6578:84::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;8984:252::-;;;;;;;;;;-1:-1:-1;8984:252:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;5588:101::-;;;;;;;;;;;;;:::i;9737:295::-;;;;;;:::i;:::-;;:::i;15884:61::-;;;;;;;;;;;;;:::i;5372:85::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;7946:19::-;;;;;;;;;;;;;:::i;15097:141::-;;;;;;;;;;-1:-1:-1;15097:141:0;;;;;:::i;:::-;;:::i;13086:1335::-;;;;;;;;;;-1:-1:-1;13086:1335:0;;;;;:::i;:::-;;:::i;15244:180::-;;;;;;;;;;-1:-1:-1;15244:180:0;;;;;:::i;:::-;;:::i;11248:185::-;;;;;;;;;;-1:-1:-1;11248:185:0;;;;;:::i;:::-;;:::i;7887:28::-;;;;;;;;;;;;;:::i;9242:489::-;;;;;;:::i;:::-;;:::i;7921:19::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;12462:27::-;;;;;;;;;;;;;:::i;10875:195::-;;;;;;;;;;-1:-1:-1;10875:195:0;;;;;:::i;:::-;;:::i;5696:198::-;;;;;;;;;;-1:-1:-1;5696:198:0;;;;;:::i;:::-;;:::i;8622:356::-;;;;;;;;;;-1:-1:-1;8622:356:0;;;;;:::i;:::-;;:::i;11077:165::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;;;;;;;;;11145:22:::1;11194:4;;11170:21;:28;;;;:::i;:::-;11208:27;::::0;11145:53;;-1:-1:-1;11208:11:0::1;::::0;::::1;::::0;:27;::::1;;;::::0;11145:53;;11208:27:::1;::::0;;;11145:53;11208:11;:27;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;5573:1;11077:165:::0;:::o;12946:133::-;13017:8;13044:28;;;:16;:28;;;;;;;;12946:133;;;;:::o;16091:325::-;16342:11;16277:132;;16299:9;16277:132;16322:6;16367:10;16391:8;16277:132;;;;;;;;:::i;:::-;;;;;;;;16091:325;;;;;:::o;16421:514::-;16909:9;16807:10;16741:6;16716:212;;;16761:10;16785:8;16831:7;;16852:5;16871:7;;16892:3;16716:212;;;;;;;;;;;;;:::i;:::-;;;;;;;;16421:514;;;;;;;;;;;:::o;15951:65::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15999:10:::1;:8;:10::i;:::-;15951:65::o:0;16940:137::-;17028:42;17054:6;;17028:42;;;;;;;:::i;:::-;;;;;;;;16940:137;;:::o;15560:287::-;3778:13;;;;;;;:48;;3814:12;;;;3813:13;3778:48;;;3794:16;:14;:16::i;:::-;3770:107;;;;-1:-1:-1;;;3770:107:0;;;;;;;:::i;:::-;3888:19;3911:13;;;;;;3910:14;3934:98;;;;3968:13;:20;;-1:-1:-1;;3968:20:0;;;;;;4002:19;3984:4;4002:19;;;3934:98;15658:26:::1;:24;:26::i;:::-;15694:27;:25;:27::i;:::-;15731:49;15765:14;15731:33;:49::i;:::-;15790:50;15826:13;15790:35;:50::i;:::-;4058:14:::0;4054:66;;;4104:5;4088:21;;;;;;15560:287;;;:::o;6578:84::-;6648:7;;;;6578:84;:::o;8984:252::-;9115:13;;9100:67;;;;;9067:7;;;;9115:13;;;;;9100:44;;:67;;9145:11;;9158:8;;;;9100:67;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;9086:81;-1:-1:-1;9185:8:0;9177:32;;;;-1:-1:-1;;;9177:32:0;;;;;;;:::i;:::-;9226:3;8984:252;-1:-1:-1;;;;8984:252:0:o;5588:101::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;5652:30:::1;5679:1;5652:18;:30::i;9737:295::-:0;9953:72;9966:9;9977:11;9990:8;;10000;;10010:14;9953:12;:72::i;:::-;9737:295;;;;;;;:::o;15884:61::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15930:8:::1;:6;:8::i;5372:85::-:0;5444:6;;;;5372:85;:::o;7946:19::-;;;;:::o;15097:141::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15193:28:::1;::::0;;;:16:::1;:28;::::0;;;;:38;;15224:7;;15193:28;-1:-1:-1;;15193:38:0::1;::::0;15224:7;15193:38:::1;::::0;::::1;;;;;;;;;;;;;;;;;;;15097:141:::0;;:::o;13086:1335::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;-1:-1:-1;;;6704:38:0;;;;;;;:::i;:::-;13564:13:::1;13532:28:::0;;;:16:::1;:28;::::0;;;;;::::1;;:45;::::0;::::1;;;;;;;;;;;;;;;13524:82;;;;-1:-1:-1::0;;;13524:82:0::1;;;;;;;:::i;:::-;13703:12;::::0;13725:22:::1;::::0;13703:12:::1;::::0;;::::1;::::0;13689:35:::1;::::0;13725:22:::1;::::0;13736:10:::1;::::0;13725:22:::1;;;:::i;:::-;;;;;;;;;;;;;13689:59;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;13759:15;13822:11;13800:49;;;13855:9;13883:11;13912;13941:8;;13967:10;13800:191;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;13784:490;;;::::0;;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14192:35;14205:21;14219:6;14205:13;:21::i;:::-;14192:35;;;;;;:::i;:::-;;;;;;;;14250:13;14241:22;;14102:172;13784:490;;;-1:-1:-1::0;14074:16:0::1;13784:490;14284:28;::::0;;;:16:::1;:28;::::0;;;;:37;;14315:6;;14284:28;-1:-1:-1;;14284:37:0::1;::::0;14315:6;14284:37:::1;::::0;::::1;;;;;;;;;;;;;;;;;;;14365:11;14336:78;;14345:10;14336:78;14357:6;14385:11;14406:6;14336:78;;;;;;;;:::i;:::-;;;;;;;;6752:1;13086:1335:::0;;;;;;;;:::o;15244:180::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;15332:27:::1;::::0;::::1;15324:55;;;;-1:-1:-1::0;;;15324:55:0::1;;;;;;;:::i;:::-;15389:12;:28:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;15244:180::o;11248:185::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;11338:28:::1;::::0;::::1;11330:56;;;;-1:-1:-1::0;;;11330:56:0::1;;;;;;;:::i;:::-;11396:13;:30:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;11248:185::o;7887:28::-;;;;;;:::o;9242:489::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;-1:-1:-1;;;6704:38:0;;;;;;;:::i;:::-;9648:76:::1;9661:9;9672:11;9685:8;;9695;;9713:9;9648:12;:76::i;:::-;9242:489:::0;;;;;;:::o;7921:19::-;;;;;;;;;:::o;12462:27::-;;;;;;:::o;10875:195::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;10974:4:::1;::::0;11015:27:::1;::::0;:11:::1;::::0;::::1;::::0;:27;::::1;;;::::0;10974:4;;10949:22:::1;11015:27:::0;10949:22;11015:27;10974:4;11015:11;:27;::::1;;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;11052:11:0::1;11059:4;11052:11:::0;-1:-1:-1;10875:195:0:o;5696:198::-;5514:12;:10;:12::i;:::-;5503:23;;:7;:5;:7::i;:::-;:23;;;5495:68;;;;-1:-1:-1;;;5495:68:0;;;;;;;:::i;:::-;5784:22:::1;::::0;::::1;5776:73;;;;-1:-1:-1::0;;;5776:73:0::1;;;;;;;:::i;:::-;5859:28;5878:8;5859:18;:28::i;:::-;5696:198:::0;:::o;8622:356::-;8851:7;8898:11;8911;8924;8937;8950:9;8961:8;;8887:83;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8877:94;;;;;;8870:101;;8622:356;;;;;;;;;:::o;4713:96::-;4792:10;4713:96;:::o;6987:117::-;6807:8;:6;:8::i;:::-;6799:41;;;;-1:-1:-1;;;6799:41:0;;;;;;;:::i;:::-;7045:7:::1;:15:::0;;-1:-1:-1;;7045:15:0::1;::::0;;7075:22:::1;7084:12;:10;:12::i;:::-;7075:22;;;;;;:::i;:::-;;;;;;;;6987:117::o:0;4264:123::-;4312:4;4336:44;4374:4;4336:29;:44::i;:::-;4335:45;4328:52;;4264:123;:::o;5254:111::-;4179:13;;;;;;;4171:69;;;;-1:-1:-1;;;4171:69:0;;;;;;;:::i;:::-;5326:32:::1;5345:12;:10;:12::i;:::-;5326:18;:32::i;6476:95::-:0;4179:13;;;;;;;4171:69;;;;-1:-1:-1;;;4171:69:0;;;;;;;:::i;:::-;6549:7:::1;:15:::0;;-1:-1:-1;;6549:15:0::1;::::0;;6476:95::o;8200:140::-;4179:13;;;;;;;4171:69;;;;-1:-1:-1;;;4171:69:0;;;;;;;:::i;5901:187::-;5993:6;;;;6009:17;;;;;;;;;;;6041:40;;5993:6;;;6009:17;5993:6;;6041:40;;5974:16;;6041:40;5901:187;;:::o;10038:830::-;10247:18;10268:10;:8;:10::i;:::-;10247:31;;10311:10;10296:11;:25;;10288:53;;;;-1:-1:-1;;;10288:53:0;;;;;;;:::i;:::-;10351:11;10365:34;10377:11;10390:8;;10365:11;:34::i;:::-;10351:48;;10430:3;10417:9;:16;;10409:49;;;;-1:-1:-1;;;10409:49:0;;;;;;;:::i;:::-;10468:13;10484:81;10501:10;10513;10525:9;10536:11;10549:5;;;;;;;;;;;10484:81;;10556:8;;10484:16;:81::i;:::-;10468:97;;10672:5;10627:11;10592:10;10580:98;;;10604:10;10616:9;10640:8;;10650:5;;;;;;;;;;;10657:8;;10667:3;10580:98;;;;;;;;;;;;;:::i;:::-;;;;;;;;10696:3;10688:4;;:11;;;;;;;:::i;:::-;;;;-1:-1:-1;;10711:5:0;10709:7;;10711:5;;10709:7;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;10792:3;10780:9;:15;10776:86;;;10811:23;;;:40;10835:15;10847:3;10835:9;:15;:::i;:::-;10811:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10776:86;10038:830;;;;;;;;;;:::o;6865:115::-;6713:8;:6;:8::i;:::-;6712:9;6704:38;;;;-1:-1:-1;;;6704:38:0;;;;;;;:::i;:::-;6924:7:::1;:14:::0;;-1:-1:-1;;6924:14:0::1;6934:4;6924:14;::::0;;6953:20:::1;6960:12;:10;:12::i;14566:523::-:0;14638:13;14799:2;14778:11;:18;:23;14774:67;;;-1:-1:-1;14803:38:0;;;;;;;;;;;;;;;;;;;14774:67;14977:4;14964:11;14960:22;14945:37;;15019:11;15008:33;;;;;;;;;;;;:::i;:::-;15001:40;14566:523;-1:-1:-1;;14566:523:0:o;245:320::-;305:4;557:1;535:7;:12;;;;;;;;;;;;;;;;;;;;;;;;;:19;:23;;245:320;-1:-1:-1;;245:320:0:o;7639:97::-;7716:13;7639:97;:::o;14:377:1:-;;;131:3;124:4;116:6;112:17;108:27;98:2;;156:8;146;139:26;98:2;-1:-1:-1;186:20:1;;229:18;218:30;;215:2;;;268:8;258;251:26;215:2;312:4;304:6;300:17;288:29;;364:3;357:4;348:6;340;336:19;332:30;329:39;326:2;;;381:1;378;371:12;326:2;88:303;;;;;:::o;396:152::-;473:20;;522:1;512:12;;502:2;;538:1;535;528:12;553:173;622:20;;682:18;671:30;;661:41;;651:2;;716:1;713;706:12;731:259;;843:2;831:9;822:7;818:23;814:32;811:2;;;864:6;856;849:22;811:2;908:9;895:23;927:33;954:5;927:33;:::i;:::-;979:5;801:189;-1:-1:-1;;;801:189:1:o;1267:402::-;;;1396:2;1384:9;1375:7;1371:23;1367:32;1364:2;;;1417:6;1409;1402:22;1364:2;1461:9;1448:23;1480:33;1507:5;1480:33;:::i;:::-;1532:5;-1:-1:-1;1589:2:1;1574:18;;1561:32;1602:35;1561:32;1602:35;:::i;:::-;1656:7;1646:17;;;1354:315;;;;;:::o;1674:1291::-;;;;;;;;;;;;1960:3;1948:9;1939:7;1935:23;1931:33;1928:2;;;1982:6;1974;1967:22;1928:2;2000:51;2040:9;2027:23;2000:51;:::i;:::-;2083:9;2070:23;2060:33;;2140:2;2129:9;2125:18;2112:32;2102:42;;2191:2;2180:9;2176:18;2163:32;2153:42;;2242:2;2231:9;2227:18;2214:32;2204:42;;2265:18;2333:2;2326:3;2315:9;2311:19;2298:33;2295:41;2292:2;;;2354:6;2346;2339:22;2292:2;2398:87;2477:7;2469:3;2458:9;2454:19;2441:33;2430:9;2426:49;2398:87;:::i;:::-;2504:8;;-1:-1:-1;2531:8:1;-1:-1:-1;2558:40:1;2593:3;2578:19;;2558:40;:::i;:::-;2548:50;;2648:2;2641:3;2630:9;2626:19;2613:33;2610:41;2607:2;;;2669:6;2661;2654:22;2607:2;;2713:87;2792:7;2784:3;2773:9;2769:19;2756:33;2745:9;2741:49;2713:87;:::i;:::-;1918:1047;;;;-1:-1:-1;1918:1047:1;;;;;;;;;;2819:8;;2846;2901:3;2886:19;;2873:33;;2954:3;2939:19;2926:33;;-1:-1:-1;1918:1047:1;-1:-1:-1;;;1918:1047:1:o;2970:843::-;;;;;;;;3186:3;3174:9;3165:7;3161:23;3157:33;3154:2;;;3208:6;3200;3193:22;3154:2;3252:9;3239:23;3271:33;3298:5;3271:33;:::i;:::-;3323:5;-1:-1:-1;3375:2:1;3360:18;;3347:32;;-1:-1:-1;3426:2:1;3411:18;;3398:32;;-1:-1:-1;3477:2:1;3462:18;;3449:32;;-1:-1:-1;3528:3:1;3513:19;;3500:33;;-1:-1:-1;3584:3:1;3569:19;;3556:33;3612:18;3601:30;;3598:2;;;3649:6;3641;3634:22;3598:2;3693:60;3745:7;3736:6;3725:9;3721:22;3693:60;:::i;:::-;3144:669;;;;-1:-1:-1;3144:669:1;;-1:-1:-1;3144:669:1;;;;3667:86;;-1:-1:-1;;;3144:669:1:o;3818:297::-;;3938:2;3926:9;3917:7;3913:23;3909:32;3906:2;;;3959:6;3951;3944:22;3906:2;3996:9;3990:16;4049:5;4042:13;4035:21;4028:5;4025:32;4015:2;;4076:6;4068;4061:22;4120:190;;4232:2;4220:9;4211:7;4207:23;4203:32;4200:2;;;4253:6;4245;4238:22;4200:2;-1:-1:-1;4281:23:1;;4190:120;-1:-1:-1;4190:120:1:o;4315:285::-;;;4456:2;4444:9;4435:7;4431:23;4427:32;4424:2;;;4477:6;4469;4462:22;4424:2;4518:9;4505:23;4495:33;;4547:47;4590:2;4579:9;4575:18;4547:47;:::i;:::-;4537:57;;4414:186;;;;;:::o;4605:572::-;;;;;;4795:3;4783:9;4774:7;4770:23;4766:33;4763:2;;;4817:6;4809;4802:22;4763:2;4858:9;4845:23;4835:33;;4887:47;4930:2;4919:9;4915:18;4887:47;:::i;:::-;4877:57;;4984:2;4973:9;4969:18;4956:32;4997:33;5024:5;4997:33;:::i;:::-;5049:5;-1:-1:-1;5073:39:1;5108:2;5093:18;;5073:39;:::i;:::-;5063:49;;5131:40;5166:3;5155:9;5151:19;5131:40;:::i;:::-;5121:50;;4753:424;;;;;;;;:::o;5182:888::-;;;;;;;5383:3;5371:9;5362:7;5358:23;5354:33;5351:2;;;5405:6;5397;5390:22;5351:2;5446:9;5433:23;5423:33;;5503:2;5492:9;5488:18;5475:32;5465:42;;5558:2;5547:9;5543:18;5530:32;5581:18;5622:2;5614:6;5611:14;5608:2;;;5643:6;5635;5628:22;5608:2;5687:60;5739:7;5730:6;5719:9;5715:22;5687:60;:::i;:::-;5766:8;;-1:-1:-1;5661:86:1;-1:-1:-1;5854:2:1;5839:18;;5826:32;;-1:-1:-1;5870:16:1;;;5867:2;;;5904:6;5896;5889:22;5867:2;;5948:62;6002:7;5991:8;5980:9;5976:24;5948:62;:::i;:::-;5341:729;;;;-1:-1:-1;5341:729:1;;-1:-1:-1;5341:729:1;;6029:8;;5341:729;-1:-1:-1;;;5341:729:1:o;6075:1034::-;;;;;;;;6301:3;6289:9;6280:7;6276:23;6272:33;6269:2;;;6323:6;6315;6308:22;6269:2;6364:9;6351:23;6341:33;;6421:2;6410:9;6406:18;6393:32;6383:42;;6476:2;6465:9;6461:18;6448:32;6499:18;6540:2;6532:6;6529:14;6526:2;;;6561:6;6553;6546:22;6526:2;6605:60;6657:7;6648:6;6637:9;6633:22;6605:60;:::i;:::-;6684:8;;-1:-1:-1;6579:86:1;-1:-1:-1;6772:2:1;6757:18;;6744:32;;-1:-1:-1;6788:16:1;;;6785:2;;;6822:6;6814;6807:22;6785:2;;6866:62;6920:7;6909:8;6898:9;6894:24;6866:62;:::i;:::-;6947:8;;-1:-1:-1;6840:88:1;-1:-1:-1;;7032:3:1;7017:19;;7004:33;7046;7004;7046;:::i;:::-;7098:5;7088:15;;;6259:850;;;;;;;;;;:::o;7114:432::-;;;7246:2;7234:9;7225:7;7221:23;7217:32;7214:2;;;7267:6;7259;7252:22;7214:2;7312:9;7299:23;7345:18;7337:6;7334:30;7331:2;;;7382:6;7374;7367:22;7331:2;7426:60;7478:7;7469:6;7458:9;7454:22;7426:60;:::i;:::-;7505:8;;7400:86;;-1:-1:-1;7204:342:1;-1:-1:-1;;;;7204:342:1:o;7551:953::-;;7684:2;7672:9;7663:7;7659:23;7655:32;7652:2;;;7705:6;7697;7690:22;7652:2;7743:9;7737:16;7772:18;7813:2;7805:6;7802:14;7799:2;;;7834:6;7826;7819:22;7799:2;7877:6;7866:9;7862:22;7852:32;;7922:7;7915:4;7911:2;7907:13;7903:27;7893:2;;7949:6;7941;7934:22;7893:2;7983;7977:9;8005:2;8001;7998:10;7995:2;;;8011:18;;:::i;:::-;8060:2;8054:9;8195:2;8125:66;8118:4;8114:2;8110:13;8106:86;8098:6;8094:99;8090:108;8248:6;8236:10;8233:22;8228:2;8216:10;8213:18;8210:46;8207:2;;;8259:18;;:::i;:::-;8295:2;8288:22;8319:18;;;8356:11;;;8369:2;8352:20;8349:33;-1:-1:-1;8346:2:1;;;8400:6;8392;8385:22;8346:2;8418:55;8470:2;8465;8457:6;8453:15;8448:2;8444;8440:11;8418:55;:::i;:::-;8492:6;7642:862;-1:-1:-1;;;;;;7642:862:1:o;8509:194::-;;8632:2;8620:9;8611:7;8607:23;8603:32;8600:2;;;8653:6;8645;8638:22;8600:2;-1:-1:-1;8681:16:1;;8590:113;-1:-1:-1;8590:113:1:o;8708:912::-;;;;;;;;;8941:3;8929:9;8920:7;8916:23;8912:33;8909:2;;;8963:6;8955;8948:22;8909:2;9004:9;8991:23;8981:33;;9061:2;9050:9;9046:18;9033:32;9023:42;;9115:2;9104:9;9100:18;9087:32;9128:33;9155:5;9128:33;:::i;:::-;9180:5;-1:-1:-1;9232:2:1;9217:18;;9204:32;;-1:-1:-1;9283:3:1;9268:19;;9255:33;;-1:-1:-1;9339:3:1;9324:19;;9311:33;9367:18;9356:30;;9353:2;;;9404:6;9396;9389:22;9353:2;9448:60;9500:7;9491:6;9480:9;9476:22;9448:60;:::i;:::-;8899:721;;;;-1:-1:-1;8899:721:1;;;;;;9422:86;;9609:3;9594:19;9581:33;;8899:721;-1:-1:-1;;;;8899:721:1:o;9625:499::-;;;;9773:2;9761:9;9752:7;9748:23;9744:32;9741:2;;;9794:6;9786;9779:22;9741:2;9835:9;9822:23;9812:33;;9896:2;9885:9;9881:18;9868:32;9923:18;9915:6;9912:30;9909:2;;;9960:6;9952;9945:22;9909:2;10004:60;10056:7;10047:6;10036:9;10032:22;10004:60;:::i;:::-;9731:393;;10083:8;;-1:-1:-1;9978:86:1;;-1:-1:-1;;;;9731:393:1:o;10129:329::-;;10219:6;10214:3;10207:19;10271:6;10264:5;10257:4;10252:3;10248:14;10235:43;10323:3;10316:4;10307:6;10302:3;10298:16;10294:27;10287:40;10447:4;10377:66;10372:2;10364:6;10360:15;10356:88;10351:3;10347:98;10343:109;10336:116;;10197:261;;;;;:::o;10463:318::-;;10544:5;10538:12;10571:6;10566:3;10559:19;10587:63;10643:6;10636:4;10631:3;10627:14;10620:4;10613:5;10609:16;10587:63;:::i;:::-;10695:2;10683:15;10700:66;10679:88;10670:98;;;;10770:4;10666:109;;10514:267;-1:-1:-1;;10514:267:1:o;10786:296::-;10869:1;10862:5;10859:12;10849:2;;10905:77;10902:1;10895:88;11006:4;11003:1;10996:15;11034:4;11031:1;11024:15;10849:2;11058:18;;10839:243::o;11087:226::-;11263:42;11251:55;;;;11233:74;;11221:2;11206:18;;11188:125::o;11318:654::-;;11627:42;11619:6;11615:55;11604:9;11597:74;11707:6;11702:2;11691:9;11687:18;11680:34;11750:6;11745:2;11734:9;11730:18;11723:34;11793:6;11788:2;11777:9;11773:18;11766:34;11837:6;11831:3;11820:9;11816:19;11809:35;11881:3;11875;11864:9;11860:19;11853:32;11902:64;11961:3;11950:9;11946:19;11938:6;11930;11902:64;:::i;:::-;11894:72;11587:385;-1:-1:-1;;;;;;;;;11587:385:1:o;11977:187::-;12142:14;;12135:22;12117:41;;12105:2;12090:18;;12072:92::o;12169:177::-;12315:25;;;12303:2;12288:18;;12270:76::o;12351:510::-;;12592:6;12581:9;12574:25;12635:6;12630:2;12619:9;12615:18;12608:34;12678:3;12673:2;12662:9;12658:18;12651:31;12699:64;12758:3;12747:9;12743:19;12735:6;12727;12699:64;:::i;:::-;12691:72;;12811:42;12803:6;12799:55;12794:2;12783:9;12779:18;12772:83;12564:297;;;;;;;;:::o;12866:219::-;;13013:2;13002:9;12995:21;13033:46;13075:2;13064:9;13060:18;13052:6;13033:46;:::i;13090:208::-;13234:2;13219:18;;13246:46;13223:9;13274:6;13246:46;:::i;13303:401::-;13499:2;13484:18;;13511:46;13488:9;13539:6;13511:46;:::i;:::-;13576:18;13642:2;13634:6;13630:15;13625:2;13614:9;13610:18;13603:43;13694:2;13686:6;13682:15;13677:2;13666:9;13662:18;13655:43;;13466:238;;;;;;:::o;13709:248::-;;13868:2;13857:9;13850:21;13888:63;13947:2;13936:9;13932:18;13924:6;13916;13888:63;:::i;14188:339::-;14390:2;14372:21;;;14429:2;14409:18;;;14402:30;14468:17;14463:2;14448:18;;14441:45;14518:2;14503:18;;14362:165::o;14532:344::-;14734:2;14716:21;;;14773:2;14753:18;;;14746:30;14812:22;14807:2;14792:18;;14785:50;14867:2;14852:18;;14706:170::o;14881:335::-;15083:2;15065:21;;;15122:2;15102:18;;;15095:30;15161:13;15156:2;15141:18;;15134:41;15207:2;15192:18;;15055:161::o;15221:402::-;15423:2;15405:21;;;15462:2;15442:18;;;15435:30;15501:34;15496:2;15481:18;;15474:62;15572:8;15567:2;15552:18;;15545:36;15613:3;15598:19;;15395:228::o;15628:339::-;15830:2;15812:21;;;15869:2;15849:18;;;15842:30;15908:17;15903:2;15888:18;;15881:45;15958:2;15943:18;;15802:165::o;15972:340::-;16174:2;16156:21;;;16213:2;16193:18;;;16186:30;16252:18;16247:2;16232:18;;16225:46;16303:2;16288:18;;16146:166::o;16317:410::-;16519:2;16501:21;;;16558:2;16538:18;;;16531:30;16597:34;16592:2;16577:18;;16570:62;16668:16;16663:2;16648:18;;16641:44;16717:3;16702:19;;16491:236::o;16732:356::-;16934:2;16916:21;;;16953:18;;;16946:30;17012:34;17007:2;16992:18;;16985:62;17079:2;17064:18;;16906:182::o;17093:348::-;17295:2;17277:21;;;17334:2;17314:18;;;17307:30;17373:26;17368:2;17353:18;;17346:54;17432:2;17417:18;;17267:174::o;17446:344::-;17648:2;17630:21;;;17687:2;17667:18;;;17660:30;17726:22;17721:2;17706:18;;17699:50;17781:2;17766:18;;17620:170::o;17795:407::-;17997:2;17979:21;;;18036:2;18016:18;;;18009:30;18075:34;18070:2;18055:18;;18048:62;18146:13;18141:2;18126:18;;18119:41;18192:3;18177:19;;17969:233::o;18389:746::-;;18712:6;18701:9;18694:25;18755:6;18750:2;18739:9;18735:18;18728:34;18798:3;18793:2;18782:9;18778:18;18771:31;18825:64;18884:3;18873:9;18869:19;18861:6;18853;18825:64;:::i;:::-;18937:18;18929:6;18925:31;18920:2;18909:9;18905:18;18898:59;19006:9;18998:6;18994:22;18988:3;18977:9;18973:19;18966:51;19034;19078:6;19070;19062;19034:51;:::i;:::-;19026:59;;;19122:6;19116:3;19105:9;19101:19;19094:35;18684:451;;;;;;;;;;;:::o;19140:317::-;;19325:6;19314:9;19307:25;19368:2;19363;19352:9;19348:18;19341:30;19388:63;19447:2;19436:9;19432:18;19424:6;19416;19388:63;:::i;:::-;19380:71;19297:160;-1:-1:-1;;;;;19297:160:1:o;19462:200::-;19636:18;19624:31;;;;19606:50;;19594:2;19579:18;;19561:101::o;19667:128::-;;19738:1;19734:6;19731:1;19728:13;19725:2;;;19744:18;;:::i;:::-;-1:-1:-1;19780:9:1;;19715:80::o;19800:125::-;;19868:1;19865;19862:8;19859:2;;;19873:18;;:::i;:::-;-1:-1:-1;19910:9:1;;19849:76::o;19930:258::-;20002:1;20012:113;20026:6;20023:1;20020:13;20012:113;;;20102:11;;;20096:18;20083:11;;;20076:39;20048:2;20041:10;20012:113;;;20143:6;20140:1;20137:13;20134:2;;;20178:1;20169:6;20164:3;20160:16;20153:27;20134:2;;19983:205;;;:::o;20193:209::-;;20259:18;20312:2;20305:5;20301:14;20339:2;20330:7;20327:15;20324:2;;;20345:18;;:::i;:::-;20394:1;20381:15;;20239:163;-1:-1:-1;;;20239:163:1:o;20407:184::-;20459:77;20456:1;20449:88;20556:4;20553:1;20546:15;20580:4;20577:1;20570:15;20596:184;20648:77;20645:1;20638:88;20745:4;20742:1;20735:15;20769:4;20766:1;20759:15;20785:156;20873:42;20866:5;20862:54;20855:5;20852:65;20842:2;;20931:1;20928;20921:12","abiDefinition":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"CallReverted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":false,"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"status","type":"uint8"},{"indexed":true,"internalType":"address","name":"_dstAddress","type":"address"},{"indexed":false,"internalType":"uint64","name":"srcChainId","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"srcNonce","type":"uint64"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcChainID","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"receiver","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"dstChainId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"message","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"options","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"}],"name":"MessageSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"authVerifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_srcAddress","type":"address"},{"internalType":"uint256","name":"_srcChainId","type":"uint256"},{"internalType":"bytes32","name":"_dstAddress","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"uint256","name":"_srcNonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"computeMessageId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"estimateFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_srcChainId","type":"uint256"},{"internalType":"bytes32","name":"_srcAddress","type":"bytes32"},{"internalType":"address","name":"_dstAddress","type":"address"},{"internalType":"uint256","name":"_gasLimit","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes32","name":"_messageId","type":"bytes32"}],"name":"executeMessage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasFeePricing","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageId","type":"bytes32"}],"name":"getExecutedMessage","outputs":[{"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gasFeePricing","type":"address"},{"internalType":"address","name":"_authVerifier","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"rescueGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_receiver","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_options","type":"bytes"},{"internalType":"address payable","name":"_refundAddress","type":"address"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_receiver","type":"bytes32"},{"internalType":"uint256","name":"_dstChainId","type":"uint256"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_options","type":"bytes"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"reason","type":"string"}],"name":"testCallReverted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"messageId","type":"bytes32"},{"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"status","type":"uint8"},{"internalType":"address","name":"_dstAddress","type":"address"},{"internalType":"uint64","name":"srcChainId","type":"uint64"},{"internalType":"uint64","name":"srcNonce","type":"uint64"}],"name":"testExecuted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"srcChainID","type":"uint256"},{"internalType":"bytes32","name":"receiver","type":"bytes32"},{"internalType":"uint256","name":"dstChainId","type":"uint256"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"uint64","name":"nonce","type":"uint64"},{"internalType":"bytes","name":"options","type":"bytes"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"bytes32","name":"messageId","type":"bytes32"}],"name":"testMessageSent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_authVerifier","type":"address"}],"name":"updateAuthVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gasFeePricing","type":"address"}],"name":"updateGasFeePricing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageId","type":"bytes32"},{"internalType":"enum MessageBusReceiverUpgradeable.TxStatus","name":"_status","type":"uint8"}],"name":"updateMessageStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"withdrawGasFees","outputs":[],"stateMutability":"nonpayable","type":"function"}],"userDoc":{"kind":"user","methods":{},"version":1},"developerDoc":{"kind":"dev","methods":{},"version":1},"metadata":"{\"compiler\":{\"version\":\"0.8.0+commit.c7dfd78e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"CallReverted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_dstAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"srcNonce\",\"type\":\"uint64\"}],\"name\":\"Executed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"srcChainID\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"receiver\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"dstChainId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"options\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"MessageSent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"authVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_srcAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_dstAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_srcNonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"}],\"name\":\"computeMessageId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"}],\"name\":\"estimateFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_srcChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_srcAddress\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_dstAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"}],\"name\":\"executeMessage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasFeePricing\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"}],\"name\":\"getExecutedMessage\",\"outputs\":[{\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gasFeePricing\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_authVerifier\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"rescueGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiver\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_receiver\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_options\",\"type\":\"bytes\"}],\"name\":\"sendMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"testCallReverted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"_dstAddress\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"srcChainId\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"srcNonce\",\"type\":\"uint64\"}],\"name\":\"testExecuted\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"srcChainID\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"receiver\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"dstChainId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"options\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"testMessageSent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_authVerifier\",\"type\":\"address\"}],\"name\":\"updateAuthVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gasFeePricing\",\"type\":\"address\"}],\"name\":\"updateGasFeePricing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_messageId\",\"type\":\"bytes32\"},{\"internalType\":\"enum MessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/solidity/TestMessageBusUpgradeable.sol\":\"TestMessageBusUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/TestMessageBusUpgradeable.sol\":{\"keccak256\":\"0xeda9aefb9403c7cd0f33595c8d0c179efc9bdd80161dad2ed11dc3a416f5d5e5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4471f68335870d11115ab0c5e7f55da7e907488078d78a8bf12d8165b75b9e78\",\"dweb:/ipfs/QmbDrr3KYwFZVhc5aQfJbCqMmyDdgMDcoqkRjHMeAfzZZL\"]}},\"version\":1}"},"hashes":{"authVerifier()":"c4087335","computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)":"f44d57aa","estimateFee(uint256,bytes)":"5da6d2c4","executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)":"a1b058d8","fees()":"9af1d35a","gasFeePricing()":"aa70fc0e","getExecutedMessage(bytes32)":"25b19fa3","initialize(address,address)":"485cc955","nonce()":"affed0e0","owner()":"8da5cb5b","pause()":"8456cb59","paused()":"5c975abb","renounceOwnership()":"715018a6","rescueGas(address)":"205e157b","sendMessage(bytes32,uint256,bytes,bytes)":"ac8a4c1b","sendMessage(bytes32,uint256,bytes,bytes,address)":"72177189","testCallReverted(string)":"446e9045","testExecuted(bytes32,uint8,address,uint64,uint64)":"28cab9af","testMessageSent(address,uint256,bytes32,uint256,bytes,uint64,bytes,uint256,bytes32)":"36d09269","transferOwnership(address)":"f2fde38b","unpause()":"3f4ba83a","updateAuthVerifier(address)":"a5c0edf3","updateGasFeePricing(address)":"a66dd384","updateMessageStatus(bytes32,uint8)":"9b11079c","withdrawGasFees(address)":"d6b457b9"}}}