From 34b6314cda2ff394c6fb44fdad732e6b89c70af2 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 13 Oct 2022 19:21:03 -0400 Subject: [PATCH 01/10] stash --- .../explorer/contracts/messaging/generate.go | 6 + .../explorer/contracts/messaging/helpers.go | 34 + .../MessageBusUpgradeable_flat.sol | 891 ++++++++++++++++++ 3 files changed, 931 insertions(+) create mode 100644 services/explorer/contracts/messaging/generate.go create mode 100644 services/explorer/contracts/messaging/helpers.go create mode 100644 services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol diff --git a/services/explorer/contracts/messaging/generate.go b/services/explorer/contracts/messaging/generate.go new file mode 100644 index 0000000000..21b549a312 --- /dev/null +++ b/services/explorer/contracts/messaging/generate.go @@ -0,0 +1,6 @@ +// Package messaging Go interface for synapse-contracts/.../BridgeConfigV3.sol +package messaging + +//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../external/flattened-contracts/BridgeConfigV3_flat.sol --pkg bridgeconfig --sol-version 0.6.12 --filename bridgeconfig + +// ignore this line: go:generate cannot be the last line of a file diff --git a/services/explorer/contracts/messaging/helpers.go b/services/explorer/contracts/messaging/helpers.go new file mode 100644 index 0000000000..437169a83c --- /dev/null +++ b/services/explorer/contracts/messaging/helpers.go @@ -0,0 +1,34 @@ +package messaging + +import ( + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" +) + +// BridgeConfigRef is a bound synapse bridge config v2 contract that returns the address of that contract +// nolint: golint +type BridgeConfigRef struct { + *BridgeConfigV3 + address common.Address +} + +// Address is the contract address. +func (s BridgeConfigRef) Address() common.Address { + return s.address +} + +// NewBridgeConfigRef gets a bound synapse bridge config contract that returns the address of the contract +// nolint: golint +func NewBridgeConfigRef(address common.Address, backend bind.ContractBackend) (*BridgeConfigRef, error) { + bridgeConfigSwap, err := NewBridgeConfigV3(address, backend) + if err != nil { + return nil, err + } + return &BridgeConfigRef{ + BridgeConfigV3: bridgeConfigSwap, + address: address, + }, nil +} + +var _ vm.ContractRef = &BridgeConfigRef{} diff --git a/services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol b/services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol new file mode 100644 index 0000000000..eec824f3a0 --- /dev/null +++ b/services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol @@ -0,0 +1,891 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) + +pragma solidity ^0.8.0; + + +// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) + + + +/** + * @dev Collection of functions related to the address type + */ +library AddressUpgradeable { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + * + * [IMPORTANT] + * ==== + * You shouldn't rely on `isContract` to protect against flash loan attacks! + * + * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets + * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract + * constructor. + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize/address.code.length, which returns 0 + // for contracts in construction, since the code is only stored at the end + // of the constructor execution. + + return account.code.length > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + (bool success, ) = recipient.call{value: amount}(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain `call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value, + string memory errorMessage + ) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + require(isContract(target), "Address: call to non-contract"); + + (bool success, bytes memory returndata) = target.call{value: value}(data); + return verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall( + address target, + bytes memory data, + string memory errorMessage + ) internal view returns (bytes memory) { + require(isContract(target), "Address: static call to non-contract"); + + (bool success, bytes memory returndata) = target.staticcall(data); + return verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the + * revert reason using the provided one. + * + * _Available since v4.3._ + */ + function verifyCallResult( + bool success, + bytes memory returndata, + string memory errorMessage + ) internal pure returns (bytes memory) { + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} + + +/** + * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed + * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an + * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer + * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. + * + * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as + * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. + * + * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure + * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. + * + * [CAUTION] + * ==== + * Avoid leaving a contract uninitialized. + * + * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation + * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the + * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: + * + * [.hljs-theme-light.nopadding] + * ``` + * /// @custom:oz-upgrades-unsafe-allow constructor + * constructor() initializer {} + * ``` + * ==== + */ +abstract contract Initializable { + /** + * @dev Indicates that the contract has been initialized. + */ + bool private _initialized; + + /** + * @dev Indicates that the contract is in the process of being initialized. + */ + bool private _initializing; + + /** + * @dev Modifier to protect an initializer function from being invoked twice. + */ + modifier initializer() { + // If the contract is initializing we ignore whether _initialized is set in order to support multiple + // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the + // contract may have been reentered. + require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); + + bool isTopLevelCall = !_initializing; + if (isTopLevelCall) { + _initializing = true; + _initialized = true; + } + + _; + + if (isTopLevelCall) { + _initializing = false; + } + } + + /** + * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the + * {initializer} modifier, directly or indirectly. + */ + modifier onlyInitializing() { + require(_initializing, "Initializable: contract is not initializing"); + _; + } + + function _isConstructor() private view returns (bool) { + return !AddressUpgradeable.isContract(address(this)); + } +} + + + + + + + + +// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) + + + + +// OpenZeppelin Contracts v4.4.1 (utils/Context.sol) + + + + +/** + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract ContextUpgradeable is Initializable { + function __Context_init() internal onlyInitializing { + } + + function __Context_init_unchained() internal onlyInitializing { + } + function _msgSender() internal view virtual returns (address) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes calldata) { + return msg.data; + } + + /** + * This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} + + + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + function __Ownable_init() internal onlyInitializing { + __Ownable_init_unchained(); + } + + function __Ownable_init_unchained() internal onlyInitializing { + _transferOwnership(_msgSender()); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + _transferOwnership(address(0)); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual { + address oldOwner = _owner; + _owner = newOwner; + emit OwnershipTransferred(oldOwner, newOwner); + } + + /** + * This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} + + +// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) + + + + + + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + function __Pausable_init() internal onlyInitializing { + __Pausable_init_unchained(); + } + + function __Pausable_init_unchained() internal onlyInitializing { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view virtual returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + require(!paused(), "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + require(paused(), "Pausable: not paused"); + _; + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } + + /** + * This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[49] private __gap; +} + + + + + + +interface IGasFeePricing { + /** + * @notice Permissioned method to allow an off-chain party to set what each dstChain's + * gas cost is priced in the srcChain's native gas currency. + * Example: call on ETH, setCostPerChain(43114, 30000000000, 25180000000000000) + * chain ID 43114 + * Average of 30 gwei cost to transaction on 43114 + * AVAX/ETH = 0.02518, scaled to gas in wei = 25180000000000000 + * @param _dstChainId The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains + * @param _gasUnitPrice The estimated current gas price in wei of the destination chain + * @param _gasTokenPriceRatio Gas ratio of dstGasToken / srcGasToken + */ + function setCostPerChain( + uint256 _dstChainId, + uint256 _gasUnitPrice, + uint256 _gasTokenPriceRatio + ) external; + + /** + * @notice Returns srcGasToken fee to charge in wei for the cross-chain message based on the gas limit + * @param _options Versioned struct used to instruct relayer on how to proceed with gas limits. Contains data on gas limit to submit tx with. + */ + function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256); +} + + + + + + + +abstract contract ContextChainIdUpgradeable is Initializable { + function __ContextChainId_init() internal onlyInitializing {} + + function __ContextChainId_init_unchained() internal onlyInitializing {} + + function _chainId() internal view virtual returns (uint256) { + return block.chainid; + } + + /** + * This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[50] private __gap; +} + + +contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable { + address public gasFeePricing; + uint64 public nonce; + uint256 public fees; + + function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing { + __Ownable_init_unchained(); + __Pausable_init_unchained(); + __MessageBusSender_init_unchained(_gasFeePricing); + } + + function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing { + gasFeePricing = _gasFeePricing; + } + + event MessageSent( + address indexed sender, + uint256 srcChainID, + bytes32 receiver, + uint256 indexed dstChainId, + bytes message, + uint64 nonce, + bytes options, + uint256 fee, + bytes32 indexed messageId + ); + + function computeMessageId( + address _srcAddress, + uint256 _srcChainId, + bytes32 _dstAddress, + uint256 _dstChainId, + uint256 _srcNonce, + bytes calldata _message + ) public pure returns (bytes32) { + return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message)); + } + + function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) { + uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options); + require(fee != 0, "Fee not set"); + return fee; + } + + /** + * @notice Sends a message to a receiving contract address on another chain. + * Sender must make sure that the message is unique and not a duplicate message. + * Unspent gas fees would be transferred back to tx.origin. + * @param _receiver The bytes32 address of the destination contract to be called + * @param _dstChainId The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains + * @param _message The arbitrary payload to pass to the destination chain receiver + * @param _options Versioned struct used to instruct relayer on how to proceed with gas limits + */ + function sendMessage( + bytes32 _receiver, + uint256 _dstChainId, + bytes calldata _message, + bytes calldata _options + ) external payable whenNotPaused { + // use tx.origin for gas refund by default, so that older contracts, + // interacting with MessageBus that don't have a fallback/receive + // (i.e. not able to receive gas), will continue to work + _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin)); + } + + /** + * @notice Sends a message to a receiving contract address on another chain. + * Sender must make sure that the message is unique and not a duplicate message. + * Unspent gas fees will be refunded to specified address. + * @param _receiver The bytes32 address of the destination contract to be called + * @param _dstChainId The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains + * @param _message The arbitrary payload to pass to the destination chain receiver + * @param _options Versioned struct used to instruct relayer on how to proceed with gas limits + * @param _refundAddress Address that will receive unspent gas fees + */ + function sendMessage( + bytes32 _receiver, + uint256 _dstChainId, + bytes calldata _message, + bytes calldata _options, + address payable _refundAddress + ) external payable { + _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress); + } + + function _sendMessage( + bytes32 _receiver, + uint256 _dstChainId, + bytes calldata _message, + bytes calldata _options, + address payable _refundAddress + ) internal { + uint256 srcChainId = _chainId(); + require(_dstChainId != srcChainId, "Invalid chainId"); + uint256 fee = estimateFee(_dstChainId, _options); + require(msg.value >= fee, "Insufficient gas fee"); + bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message); + emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId); + fees += fee; + ++nonce; + // refund gas fees in case of overpayment + if (msg.value > fee) { + _refundAddress.transfer(msg.value - fee); + } + } + + /** + * @notice Withdraws accumulated fees in native gas token, based on fees variable. + * @param to Address to withdraw gas fees to, which can be specified in the event owner() can't receive native gas + */ + function withdrawGasFees(address payable to) external onlyOwner { + uint256 withdrawAmount = fees; + // Reset fees to 0 + to.transfer(withdrawAmount); + delete fees; + } + + /** + * @notice Rescues any gas in contract, aside from fees + * @param to Address to which to rescue gas to + */ + function rescueGas(address payable to) external onlyOwner { + uint256 withdrawAmount = address(this).balance - fees; + to.transfer(withdrawAmount); + } + + function updateGasFeePricing(address _gasFeePricing) external onlyOwner { + require(_gasFeePricing != address(0), "Cannot set to 0"); + gasFeePricing = _gasFeePricing; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[47] private __gap; +} + + + + + + + + + + + + +interface IAuthVerifier { + /** + * @notice Authentication library to allow the validator network to execute cross-chain messages. + * @param _authData A bytes32 address encoded via abi.encode(address) + * @return authenticated returns true if bytes data submitted and decoded to the address is correct + */ + function msgAuth(bytes calldata _authData) external view returns (bool authenticated); + + /** + * @notice Permissioned method to support upgrades to the library + * @param _nodegroup address which has authentication to execute messages + */ + function setNodeGroup(address _nodegroup) external; +} + + + + + +interface ISynMessagingReceiver { + // Maps chain ID to the bytes32 trusted addresses allowed to be source senders + // mapping(uint256 => bytes32) internal trustedRemoteLookup; + + /** + * @notice Called by MessageBus + * @dev MUST be permissioned to trusted source apps via trustedRemote + * @param _srcAddress The bytes32 address of the source app contract + * @param _srcChainId The source chain ID where the transfer is originated from + * @param _message Arbitrary message bytes originated from and encoded by the source app contract + * @param _executor Address who called the MessageBus execution function + */ + function executeMessage( + bytes32 _srcAddress, + uint256 _srcChainId, + bytes calldata _message, + address _executor + ) external; +} + + +contract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable { + enum TxStatus { + Null, + Success, + Fail + } + + // TODO: Rename to follow one standard convention -> Send -> Receive? + event Executed( + bytes32 indexed messageId, + TxStatus status, + address indexed _dstAddress, + uint64 srcChainId, + uint64 srcNonce + ); + event CallReverted(string reason); + + address public authVerifier; + + // Store all successfully executed messages + mapping(bytes32 => TxStatus) internal executedMessages; + + function __MessageBusReceiver_init(address _authVerifier) internal { + __Ownable_init_unchained(); + __Pausable_init_unchained(); + __MessageBusReceiver_init_unchained(_authVerifier); + } + + function __MessageBusReceiver_init_unchained(address _authVerifier) internal { + authVerifier = _authVerifier; + } + + function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) { + return executedMessages[_messageId]; + } + + /** + * @notice Relayer executes messages through an authenticated method to the destination receiver + based on the originating transaction on source chain + * @param _srcChainId Originating chain ID - typically a standard EVM chain ID, but may refer to a Synapse-specific chain ID on nonEVM chains + * @param _srcAddress Originating bytes32 address of the message sender on the srcChain + * @param _dstAddress Destination address that the arbitrary message will be passed to + * @param _gasLimit Gas limit to be passed alongside the message, depending on the fee paid on srcChain + * @param _message Arbitrary message payload to pass to the destination chain receiver + */ + function executeMessage( + uint256 _srcChainId, + bytes32 _srcAddress, + address _dstAddress, + uint256 _gasLimit, + uint256 _nonce, + bytes calldata _message, + bytes32 _messageId + ) external whenNotPaused { + // In order to guarantee that an individual message is only executed once, a messageId is passed + // enforce that this message ID hasn't already been tried ever + require(executedMessages[_messageId] == TxStatus.Null, "Message already executed"); + // Authenticate executeMessage, will revert if not authenticated + IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender)); + + TxStatus status; + try + ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}( + _srcAddress, + _srcChainId, + _message, + msg.sender + ) + { + // Assuming success state if no revert + status = TxStatus.Success; + } catch (bytes memory reason) { + // call hard reverted & failed + emit CallReverted(_getRevertMsg(reason)); + status = TxStatus.Fail; + } + + executedMessages[_messageId] = status; + emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce)); + } + + /** HELPER VIEW FUNCTION */ + // https://ethereum.stackexchange.com/a/83577 + // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol + function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { + // If the _res length is less than 68, then the transaction failed silently (without a revert message) + if (_returnData.length < 68) return "Transaction reverted silently"; + // solhint-disable-next-line + assembly { + // Slice the sighash. + _returnData := add(_returnData, 0x04) + } + return abi.decode(_returnData, (string)); // All that remains is the revert string + } + + /** CONTRACT CONFIG */ + + function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner { + executedMessages[_messageId] = _status; + } + + function updateAuthVerifier(address _authVerifier) external onlyOwner { + require(_authVerifier != address(0), "Cannot set to 0"); + authVerifier = _authVerifier; + } + + /** + * @dev This empty reserved space is put in place to allow future versions to add new + * variables without shifting down storage in the inheritance chain. + * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps + */ + uint256[48] private __gap; +} + + +contract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable { + function initialize(address _gasFeePricing, address _authVerifier) external initializer { + __Ownable_init_unchained(); + __Pausable_init_unchained(); + __MessageBusSender_init_unchained(_gasFeePricing); + __MessageBusReceiver_init_unchained(_authVerifier); + } + + // PAUSABLE FUNCTIONS ***/ + function pause() external onlyOwner { + _pause(); + } + + function unpause() external onlyOwner { + _unpause(); + } +} + + + From fc09715ed2f75cf5df86277f04a45fe8df2acb5f Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 13 Oct 2022 22:37:13 -0400 Subject: [PATCH 02/10] abigen --- .../explorer/contracts/messaging/generate.go | 4 +- .../explorer/contracts/messaging/helpers.go | 22 +- .../contracts/messaging/messaging.abigen.go | 5987 +++++++++++++++++ .../messaging/messaging.contractinfo.json | 1 + .../contracts/messaging/messaging.metadata.go | 25 + .../MessageBusUpgradeable_flat.sol | 381 +- services/explorer/go.mod | 9 + services/explorer/go.sum | 4 + 8 files changed, 6080 insertions(+), 353 deletions(-) create mode 100644 services/explorer/contracts/messaging/messaging.abigen.go create mode 100644 services/explorer/contracts/messaging/messaging.contractinfo.json create mode 100644 services/explorer/contracts/messaging/messaging.metadata.go diff --git a/services/explorer/contracts/messaging/generate.go b/services/explorer/contracts/messaging/generate.go index 21b549a312..f99de17b4d 100644 --- a/services/explorer/contracts/messaging/generate.go +++ b/services/explorer/contracts/messaging/generate.go @@ -1,6 +1,6 @@ -// Package messaging Go interface for synapse-contracts/.../BridgeConfigV3.sol +// Package messaging Go interface for synapse-contracts/.../MessageBusUpgradeable.sol package messaging -//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../external/flattened-contracts/BridgeConfigV3_flat.sol --pkg bridgeconfig --sol-version 0.6.12 --filename bridgeconfig +//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../external/flattened-contracts/MessageBusUpgradeable_flat.sol --pkg messaging --sol-version 0.8.0 --filename messaging // ignore this line: go:generate cannot be the last line of a file diff --git a/services/explorer/contracts/messaging/helpers.go b/services/explorer/contracts/messaging/helpers.go index 437169a83c..df0f3ac992 100644 --- a/services/explorer/contracts/messaging/helpers.go +++ b/services/explorer/contracts/messaging/helpers.go @@ -6,29 +6,29 @@ import ( "github.com/ethereum/go-ethereum/core/vm" ) -// BridgeConfigRef is a bound synapse bridge config v2 contract that returns the address of that contract +// MessagingRef isa bound Message Bus Upgradeable contract and the address of the contract // nolint: golint -type BridgeConfigRef struct { - *BridgeConfigV3 +type MessagingRef struct { + *MessageBusUpgradeable address common.Address } // Address is the contract address. -func (s BridgeConfigRef) Address() common.Address { +func (s MessagingRef) Address() common.Address { return s.address } -// NewBridgeConfigRef gets a bound synapse bridge config contract that returns the address of the contract +// NewMessagingRef gets a bound Message Bus Upgradeable contract and the address of the contract // nolint: golint -func NewBridgeConfigRef(address common.Address, backend bind.ContractBackend) (*BridgeConfigRef, error) { - bridgeConfigSwap, err := NewBridgeConfigV3(address, backend) +func NewMessagingRef(address common.Address, backend bind.ContractBackend) (*MessagingRef, error) { + messageBusUpgradeable, err := NewMessageBusUpgradeable(address, backend) if err != nil { return nil, err } - return &BridgeConfigRef{ - BridgeConfigV3: bridgeConfigSwap, - address: address, + return &MessagingRef{ + MessageBusUpgradeable: messageBusUpgradeable, + address: address, }, nil } -var _ vm.ContractRef = &BridgeConfigRef{} +var _ vm.ContractRef = &MessagingRef{} diff --git a/services/explorer/contracts/messaging/messaging.abigen.go b/services/explorer/contracts/messaging/messaging.abigen.go new file mode 100644 index 0000000000..3d87c93f5c --- /dev/null +++ b/services/explorer/contracts/messaging/messaging.abigen.go @@ -0,0 +1,5987 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package messaging + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// AddressUpgradeableMetaData contains all meta data concerning the AddressUpgradeable contract. +var AddressUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2fac4daf10abfc9803be0dc26670a44125d423de53f7ee57599504b3d2eab3264736f6c63430008000033", +} + +// AddressUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use AddressUpgradeableMetaData.ABI instead. +var AddressUpgradeableABI = AddressUpgradeableMetaData.ABI + +// AddressUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use AddressUpgradeableMetaData.Bin instead. +var AddressUpgradeableBin = AddressUpgradeableMetaData.Bin + +// DeployAddressUpgradeable deploys a new Ethereum contract, binding an instance of AddressUpgradeable to it. +func DeployAddressUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *AddressUpgradeable, error) { + parsed, err := AddressUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AddressUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &AddressUpgradeable{AddressUpgradeableCaller: AddressUpgradeableCaller{contract: contract}, AddressUpgradeableTransactor: AddressUpgradeableTransactor{contract: contract}, AddressUpgradeableFilterer: AddressUpgradeableFilterer{contract: contract}}, nil +} + +// AddressUpgradeable is an auto generated Go binding around an Ethereum contract. +type AddressUpgradeable struct { + AddressUpgradeableCaller // Read-only binding to the contract + AddressUpgradeableTransactor // Write-only binding to the contract + AddressUpgradeableFilterer // Log filterer for contract events +} + +// AddressUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type AddressUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AddressUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AddressUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AddressUpgradeableSession struct { + Contract *AddressUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AddressUpgradeableCallerSession struct { + Contract *AddressUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AddressUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AddressUpgradeableTransactorSession struct { + Contract *AddressUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type AddressUpgradeableRaw struct { + Contract *AddressUpgradeable // Generic contract binding to access the raw methods on +} + +// AddressUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AddressUpgradeableCallerRaw struct { + Contract *AddressUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// AddressUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AddressUpgradeableTransactorRaw struct { + Contract *AddressUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAddressUpgradeable creates a new instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeable(address common.Address, backend bind.ContractBackend) (*AddressUpgradeable, error) { + contract, err := bindAddressUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &AddressUpgradeable{AddressUpgradeableCaller: AddressUpgradeableCaller{contract: contract}, AddressUpgradeableTransactor: AddressUpgradeableTransactor{contract: contract}, AddressUpgradeableFilterer: AddressUpgradeableFilterer{contract: contract}}, nil +} + +// NewAddressUpgradeableCaller creates a new read-only instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*AddressUpgradeableCaller, error) { + contract, err := bindAddressUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AddressUpgradeableCaller{contract: contract}, nil +} + +// NewAddressUpgradeableTransactor creates a new write-only instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressUpgradeableTransactor, error) { + contract, err := bindAddressUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AddressUpgradeableTransactor{contract: contract}, nil +} + +// NewAddressUpgradeableFilterer creates a new log filterer instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressUpgradeableFilterer, error) { + contract, err := bindAddressUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AddressUpgradeableFilterer{contract: contract}, nil +} + +// bindAddressUpgradeable binds a generic wrapper to an already deployed contract. +func bindAddressUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AddressUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_AddressUpgradeable *AddressUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressUpgradeable.Contract.AddressUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_AddressUpgradeable *AddressUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.AddressUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressUpgradeable *AddressUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.AddressUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_AddressUpgradeable *AddressUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_AddressUpgradeable *AddressUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressUpgradeable *AddressUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ContextChainIdUpgradeableMetaData contains all meta data concerning the ContextChainIdUpgradeable contract. +var ContextChainIdUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", +} + +// ContextChainIdUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ContextChainIdUpgradeableMetaData.ABI instead. +var ContextChainIdUpgradeableABI = ContextChainIdUpgradeableMetaData.ABI + +// ContextChainIdUpgradeable is an auto generated Go binding around an Ethereum contract. +type ContextChainIdUpgradeable struct { + ContextChainIdUpgradeableCaller // Read-only binding to the contract + ContextChainIdUpgradeableTransactor // Write-only binding to the contract + ContextChainIdUpgradeableFilterer // Log filterer for contract events +} + +// ContextChainIdUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextChainIdUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextChainIdUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextChainIdUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextChainIdUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextChainIdUpgradeableSession struct { + Contract *ContextChainIdUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextChainIdUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextChainIdUpgradeableCallerSession struct { + Contract *ContextChainIdUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextChainIdUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextChainIdUpgradeableTransactorSession struct { + Contract *ContextChainIdUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextChainIdUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextChainIdUpgradeableRaw struct { + Contract *ContextChainIdUpgradeable // Generic contract binding to access the raw methods on +} + +// ContextChainIdUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableCallerRaw struct { + Contract *ContextChainIdUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextChainIdUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableTransactorRaw struct { + Contract *ContextChainIdUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContextChainIdUpgradeable creates a new instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeable(address common.Address, backend bind.ContractBackend) (*ContextChainIdUpgradeable, error) { + contract, err := bindContextChainIdUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeable{ContextChainIdUpgradeableCaller: ContextChainIdUpgradeableCaller{contract: contract}, ContextChainIdUpgradeableTransactor: ContextChainIdUpgradeableTransactor{contract: contract}, ContextChainIdUpgradeableFilterer: ContextChainIdUpgradeableFilterer{contract: contract}}, nil +} + +// NewContextChainIdUpgradeableCaller creates a new read-only instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ContextChainIdUpgradeableCaller, error) { + contract, err := bindContextChainIdUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeableCaller{contract: contract}, nil +} + +// NewContextChainIdUpgradeableTransactor creates a new write-only instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextChainIdUpgradeableTransactor, error) { + contract, err := bindContextChainIdUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeableTransactor{contract: contract}, nil +} + +// NewContextChainIdUpgradeableFilterer creates a new log filterer instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextChainIdUpgradeableFilterer, error) { + contract, err := bindContextChainIdUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeableFilterer{contract: contract}, nil +} + +// bindContextChainIdUpgradeable binds a generic wrapper to an already deployed contract. +func bindContextChainIdUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextChainIdUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextChainIdUpgradeable.Contract.ContextChainIdUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.ContextChainIdUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.ContextChainIdUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextChainIdUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ContextUpgradeableMetaData contains all meta data concerning the ContextUpgradeable contract. +var ContextUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", +} + +// ContextUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ContextUpgradeableMetaData.ABI instead. +var ContextUpgradeableABI = ContextUpgradeableMetaData.ABI + +// ContextUpgradeable is an auto generated Go binding around an Ethereum contract. +type ContextUpgradeable struct { + ContextUpgradeableCaller // Read-only binding to the contract + ContextUpgradeableTransactor // Write-only binding to the contract + ContextUpgradeableFilterer // Log filterer for contract events +} + +// ContextUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextUpgradeableSession struct { + Contract *ContextUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextUpgradeableCallerSession struct { + Contract *ContextUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextUpgradeableTransactorSession struct { + Contract *ContextUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextUpgradeableRaw struct { + Contract *ContextUpgradeable // Generic contract binding to access the raw methods on +} + +// ContextUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextUpgradeableCallerRaw struct { + Contract *ContextUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextUpgradeableTransactorRaw struct { + Contract *ContextUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContextUpgradeable creates a new instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeable(address common.Address, backend bind.ContractBackend) (*ContextUpgradeable, error) { + contract, err := bindContextUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContextUpgradeable{ContextUpgradeableCaller: ContextUpgradeableCaller{contract: contract}, ContextUpgradeableTransactor: ContextUpgradeableTransactor{contract: contract}, ContextUpgradeableFilterer: ContextUpgradeableFilterer{contract: contract}}, nil +} + +// NewContextUpgradeableCaller creates a new read-only instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ContextUpgradeableCaller, error) { + contract, err := bindContextUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextUpgradeableCaller{contract: contract}, nil +} + +// NewContextUpgradeableTransactor creates a new write-only instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextUpgradeableTransactor, error) { + contract, err := bindContextUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextUpgradeableTransactor{contract: contract}, nil +} + +// NewContextUpgradeableFilterer creates a new log filterer instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextUpgradeableFilterer, error) { + contract, err := bindContextUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextUpgradeableFilterer{contract: contract}, nil +} + +// bindContextUpgradeable binds a generic wrapper to an already deployed contract. +func bindContextUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextUpgradeable *ContextUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextUpgradeable.Contract.ContextUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextUpgradeable *ContextUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.ContextUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextUpgradeable *ContextUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.ContextUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextUpgradeable *ContextUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextUpgradeable *ContextUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextUpgradeable *ContextUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// IAuthVerifierMetaData contains all meta data concerning the IAuthVerifier contract. +var IAuthVerifierMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "8b1b3a2d": "msgAuth(bytes)", + "f6ea2c90": "setNodeGroup(address)", + }, +} + +// IAuthVerifierABI is the input ABI used to generate the binding from. +// Deprecated: Use IAuthVerifierMetaData.ABI instead. +var IAuthVerifierABI = IAuthVerifierMetaData.ABI + +// Deprecated: Use IAuthVerifierMetaData.Sigs instead. +// IAuthVerifierFuncSigs maps the 4-byte function signature to its string representation. +var IAuthVerifierFuncSigs = IAuthVerifierMetaData.Sigs + +// IAuthVerifier is an auto generated Go binding around an Ethereum contract. +type IAuthVerifier struct { + IAuthVerifierCaller // Read-only binding to the contract + IAuthVerifierTransactor // Write-only binding to the contract + IAuthVerifierFilterer // Log filterer for contract events +} + +// IAuthVerifierCaller is an auto generated read-only Go binding around an Ethereum contract. +type IAuthVerifierCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAuthVerifierTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IAuthVerifierTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAuthVerifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IAuthVerifierFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAuthVerifierSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IAuthVerifierSession struct { + Contract *IAuthVerifier // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IAuthVerifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IAuthVerifierCallerSession struct { + Contract *IAuthVerifierCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IAuthVerifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IAuthVerifierTransactorSession struct { + Contract *IAuthVerifierTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IAuthVerifierRaw is an auto generated low-level Go binding around an Ethereum contract. +type IAuthVerifierRaw struct { + Contract *IAuthVerifier // Generic contract binding to access the raw methods on +} + +// IAuthVerifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IAuthVerifierCallerRaw struct { + Contract *IAuthVerifierCaller // Generic read-only contract binding to access the raw methods on +} + +// IAuthVerifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IAuthVerifierTransactorRaw struct { + Contract *IAuthVerifierTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIAuthVerifier creates a new instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifier(address common.Address, backend bind.ContractBackend) (*IAuthVerifier, error) { + contract, err := bindIAuthVerifier(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IAuthVerifier{IAuthVerifierCaller: IAuthVerifierCaller{contract: contract}, IAuthVerifierTransactor: IAuthVerifierTransactor{contract: contract}, IAuthVerifierFilterer: IAuthVerifierFilterer{contract: contract}}, nil +} + +// NewIAuthVerifierCaller creates a new read-only instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifierCaller(address common.Address, caller bind.ContractCaller) (*IAuthVerifierCaller, error) { + contract, err := bindIAuthVerifier(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IAuthVerifierCaller{contract: contract}, nil +} + +// NewIAuthVerifierTransactor creates a new write-only instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifierTransactor(address common.Address, transactor bind.ContractTransactor) (*IAuthVerifierTransactor, error) { + contract, err := bindIAuthVerifier(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IAuthVerifierTransactor{contract: contract}, nil +} + +// NewIAuthVerifierFilterer creates a new log filterer instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifierFilterer(address common.Address, filterer bind.ContractFilterer) (*IAuthVerifierFilterer, error) { + contract, err := bindIAuthVerifier(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IAuthVerifierFilterer{contract: contract}, nil +} + +// bindIAuthVerifier binds a generic wrapper to an already deployed contract. +func bindIAuthVerifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IAuthVerifierABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IAuthVerifier *IAuthVerifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAuthVerifier.Contract.IAuthVerifierCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IAuthVerifier *IAuthVerifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAuthVerifier.Contract.IAuthVerifierTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IAuthVerifier *IAuthVerifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAuthVerifier.Contract.IAuthVerifierTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IAuthVerifier *IAuthVerifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAuthVerifier.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IAuthVerifier *IAuthVerifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAuthVerifier.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IAuthVerifier *IAuthVerifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAuthVerifier.Contract.contract.Transact(opts, method, params...) +} + +// MsgAuth is a free data retrieval call binding the contract method 0x8b1b3a2d. +// +// Solidity: function msgAuth(bytes _authData) view returns(bool authenticated) +func (_IAuthVerifier *IAuthVerifierCaller) MsgAuth(opts *bind.CallOpts, _authData []byte) (bool, error) { + var out []interface{} + err := _IAuthVerifier.contract.Call(opts, &out, "msgAuth", _authData) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// MsgAuth is a free data retrieval call binding the contract method 0x8b1b3a2d. +// +// Solidity: function msgAuth(bytes _authData) view returns(bool authenticated) +func (_IAuthVerifier *IAuthVerifierSession) MsgAuth(_authData []byte) (bool, error) { + return _IAuthVerifier.Contract.MsgAuth(&_IAuthVerifier.CallOpts, _authData) +} + +// MsgAuth is a free data retrieval call binding the contract method 0x8b1b3a2d. +// +// Solidity: function msgAuth(bytes _authData) view returns(bool authenticated) +func (_IAuthVerifier *IAuthVerifierCallerSession) MsgAuth(_authData []byte) (bool, error) { + return _IAuthVerifier.Contract.MsgAuth(&_IAuthVerifier.CallOpts, _authData) +} + +// SetNodeGroup is a paid mutator transaction binding the contract method 0xf6ea2c90. +// +// Solidity: function setNodeGroup(address _nodegroup) returns() +func (_IAuthVerifier *IAuthVerifierTransactor) SetNodeGroup(opts *bind.TransactOpts, _nodegroup common.Address) (*types.Transaction, error) { + return _IAuthVerifier.contract.Transact(opts, "setNodeGroup", _nodegroup) +} + +// SetNodeGroup is a paid mutator transaction binding the contract method 0xf6ea2c90. +// +// Solidity: function setNodeGroup(address _nodegroup) returns() +func (_IAuthVerifier *IAuthVerifierSession) SetNodeGroup(_nodegroup common.Address) (*types.Transaction, error) { + return _IAuthVerifier.Contract.SetNodeGroup(&_IAuthVerifier.TransactOpts, _nodegroup) +} + +// SetNodeGroup is a paid mutator transaction binding the contract method 0xf6ea2c90. +// +// Solidity: function setNodeGroup(address _nodegroup) returns() +func (_IAuthVerifier *IAuthVerifierTransactorSession) SetNodeGroup(_nodegroup common.Address) (*types.Transaction, error) { + return _IAuthVerifier.Contract.SetNodeGroup(&_IAuthVerifier.TransactOpts, _nodegroup) +} + +// IGasFeePricingMetaData contains all meta data concerning the IGasFeePricing contract. +var IGasFeePricingMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "47feadc1": "estimateGasFee(uint256,bytes)", + "e32192b7": "setCostPerChain(uint256,uint256,uint256)", + }, +} + +// IGasFeePricingABI is the input ABI used to generate the binding from. +// Deprecated: Use IGasFeePricingMetaData.ABI instead. +var IGasFeePricingABI = IGasFeePricingMetaData.ABI + +// Deprecated: Use IGasFeePricingMetaData.Sigs instead. +// IGasFeePricingFuncSigs maps the 4-byte function signature to its string representation. +var IGasFeePricingFuncSigs = IGasFeePricingMetaData.Sigs + +// IGasFeePricing is an auto generated Go binding around an Ethereum contract. +type IGasFeePricing struct { + IGasFeePricingCaller // Read-only binding to the contract + IGasFeePricingTransactor // Write-only binding to the contract + IGasFeePricingFilterer // Log filterer for contract events +} + +// IGasFeePricingCaller is an auto generated read-only Go binding around an Ethereum contract. +type IGasFeePricingCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGasFeePricingTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IGasFeePricingTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGasFeePricingFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IGasFeePricingFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGasFeePricingSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IGasFeePricingSession struct { + Contract *IGasFeePricing // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IGasFeePricingCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IGasFeePricingCallerSession struct { + Contract *IGasFeePricingCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IGasFeePricingTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IGasFeePricingTransactorSession struct { + Contract *IGasFeePricingTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IGasFeePricingRaw is an auto generated low-level Go binding around an Ethereum contract. +type IGasFeePricingRaw struct { + Contract *IGasFeePricing // Generic contract binding to access the raw methods on +} + +// IGasFeePricingCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IGasFeePricingCallerRaw struct { + Contract *IGasFeePricingCaller // Generic read-only contract binding to access the raw methods on +} + +// IGasFeePricingTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IGasFeePricingTransactorRaw struct { + Contract *IGasFeePricingTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIGasFeePricing creates a new instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricing(address common.Address, backend bind.ContractBackend) (*IGasFeePricing, error) { + contract, err := bindIGasFeePricing(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IGasFeePricing{IGasFeePricingCaller: IGasFeePricingCaller{contract: contract}, IGasFeePricingTransactor: IGasFeePricingTransactor{contract: contract}, IGasFeePricingFilterer: IGasFeePricingFilterer{contract: contract}}, nil +} + +// NewIGasFeePricingCaller creates a new read-only instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricingCaller(address common.Address, caller bind.ContractCaller) (*IGasFeePricingCaller, error) { + contract, err := bindIGasFeePricing(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IGasFeePricingCaller{contract: contract}, nil +} + +// NewIGasFeePricingTransactor creates a new write-only instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricingTransactor(address common.Address, transactor bind.ContractTransactor) (*IGasFeePricingTransactor, error) { + contract, err := bindIGasFeePricing(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IGasFeePricingTransactor{contract: contract}, nil +} + +// NewIGasFeePricingFilterer creates a new log filterer instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricingFilterer(address common.Address, filterer bind.ContractFilterer) (*IGasFeePricingFilterer, error) { + contract, err := bindIGasFeePricing(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IGasFeePricingFilterer{contract: contract}, nil +} + +// bindIGasFeePricing binds a generic wrapper to an already deployed contract. +func bindIGasFeePricing(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IGasFeePricingABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IGasFeePricing *IGasFeePricingRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGasFeePricing.Contract.IGasFeePricingCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IGasFeePricing *IGasFeePricingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGasFeePricing.Contract.IGasFeePricingTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGasFeePricing *IGasFeePricingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGasFeePricing.Contract.IGasFeePricingTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IGasFeePricing *IGasFeePricingCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGasFeePricing.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IGasFeePricing *IGasFeePricingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGasFeePricing.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGasFeePricing *IGasFeePricingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGasFeePricing.Contract.contract.Transact(opts, method, params...) +} + +// EstimateGasFee is a paid mutator transaction binding the contract method 0x47feadc1. +// +// Solidity: function estimateGasFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_IGasFeePricing *IGasFeePricingTransactor) EstimateGasFee(opts *bind.TransactOpts, _dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _IGasFeePricing.contract.Transact(opts, "estimateGasFee", _dstChainId, _options) +} + +// EstimateGasFee is a paid mutator transaction binding the contract method 0x47feadc1. +// +// Solidity: function estimateGasFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_IGasFeePricing *IGasFeePricingSession) EstimateGasFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _IGasFeePricing.Contract.EstimateGasFee(&_IGasFeePricing.TransactOpts, _dstChainId, _options) +} + +// EstimateGasFee is a paid mutator transaction binding the contract method 0x47feadc1. +// +// Solidity: function estimateGasFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_IGasFeePricing *IGasFeePricingTransactorSession) EstimateGasFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _IGasFeePricing.Contract.EstimateGasFee(&_IGasFeePricing.TransactOpts, _dstChainId, _options) +} + +// SetCostPerChain is a paid mutator transaction binding the contract method 0xe32192b7. +// +// Solidity: function setCostPerChain(uint256 _dstChainId, uint256 _gasUnitPrice, uint256 _gasTokenPriceRatio) returns() +func (_IGasFeePricing *IGasFeePricingTransactor) SetCostPerChain(opts *bind.TransactOpts, _dstChainId *big.Int, _gasUnitPrice *big.Int, _gasTokenPriceRatio *big.Int) (*types.Transaction, error) { + return _IGasFeePricing.contract.Transact(opts, "setCostPerChain", _dstChainId, _gasUnitPrice, _gasTokenPriceRatio) +} + +// SetCostPerChain is a paid mutator transaction binding the contract method 0xe32192b7. +// +// Solidity: function setCostPerChain(uint256 _dstChainId, uint256 _gasUnitPrice, uint256 _gasTokenPriceRatio) returns() +func (_IGasFeePricing *IGasFeePricingSession) SetCostPerChain(_dstChainId *big.Int, _gasUnitPrice *big.Int, _gasTokenPriceRatio *big.Int) (*types.Transaction, error) { + return _IGasFeePricing.Contract.SetCostPerChain(&_IGasFeePricing.TransactOpts, _dstChainId, _gasUnitPrice, _gasTokenPriceRatio) +} + +// SetCostPerChain is a paid mutator transaction binding the contract method 0xe32192b7. +// +// Solidity: function setCostPerChain(uint256 _dstChainId, uint256 _gasUnitPrice, uint256 _gasTokenPriceRatio) returns() +func (_IGasFeePricing *IGasFeePricingTransactorSession) SetCostPerChain(_dstChainId *big.Int, _gasUnitPrice *big.Int, _gasTokenPriceRatio *big.Int) (*types.Transaction, error) { + return _IGasFeePricing.Contract.SetCostPerChain(&_IGasFeePricing.TransactOpts, _dstChainId, _gasUnitPrice, _gasTokenPriceRatio) +} + +// ISynMessagingReceiverMetaData contains all meta data concerning the ISynMessagingReceiver contract. +var ISynMessagingReceiverMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "a6060871": "executeMessage(bytes32,uint256,bytes,address)", + }, +} + +// ISynMessagingReceiverABI is the input ABI used to generate the binding from. +// Deprecated: Use ISynMessagingReceiverMetaData.ABI instead. +var ISynMessagingReceiverABI = ISynMessagingReceiverMetaData.ABI + +// Deprecated: Use ISynMessagingReceiverMetaData.Sigs instead. +// ISynMessagingReceiverFuncSigs maps the 4-byte function signature to its string representation. +var ISynMessagingReceiverFuncSigs = ISynMessagingReceiverMetaData.Sigs + +// ISynMessagingReceiver is an auto generated Go binding around an Ethereum contract. +type ISynMessagingReceiver struct { + ISynMessagingReceiverCaller // Read-only binding to the contract + ISynMessagingReceiverTransactor // Write-only binding to the contract + ISynMessagingReceiverFilterer // Log filterer for contract events +} + +// ISynMessagingReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. +type ISynMessagingReceiverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISynMessagingReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ISynMessagingReceiverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISynMessagingReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ISynMessagingReceiverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISynMessagingReceiverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ISynMessagingReceiverSession struct { + Contract *ISynMessagingReceiver // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ISynMessagingReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ISynMessagingReceiverCallerSession struct { + Contract *ISynMessagingReceiverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ISynMessagingReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ISynMessagingReceiverTransactorSession struct { + Contract *ISynMessagingReceiverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ISynMessagingReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. +type ISynMessagingReceiverRaw struct { + Contract *ISynMessagingReceiver // Generic contract binding to access the raw methods on +} + +// ISynMessagingReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ISynMessagingReceiverCallerRaw struct { + Contract *ISynMessagingReceiverCaller // Generic read-only contract binding to access the raw methods on +} + +// ISynMessagingReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ISynMessagingReceiverTransactorRaw struct { + Contract *ISynMessagingReceiverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewISynMessagingReceiver creates a new instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiver(address common.Address, backend bind.ContractBackend) (*ISynMessagingReceiver, error) { + contract, err := bindISynMessagingReceiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ISynMessagingReceiver{ISynMessagingReceiverCaller: ISynMessagingReceiverCaller{contract: contract}, ISynMessagingReceiverTransactor: ISynMessagingReceiverTransactor{contract: contract}, ISynMessagingReceiverFilterer: ISynMessagingReceiverFilterer{contract: contract}}, nil +} + +// NewISynMessagingReceiverCaller creates a new read-only instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiverCaller(address common.Address, caller bind.ContractCaller) (*ISynMessagingReceiverCaller, error) { + contract, err := bindISynMessagingReceiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ISynMessagingReceiverCaller{contract: contract}, nil +} + +// NewISynMessagingReceiverTransactor creates a new write-only instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*ISynMessagingReceiverTransactor, error) { + contract, err := bindISynMessagingReceiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ISynMessagingReceiverTransactor{contract: contract}, nil +} + +// NewISynMessagingReceiverFilterer creates a new log filterer instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*ISynMessagingReceiverFilterer, error) { + contract, err := bindISynMessagingReceiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ISynMessagingReceiverFilterer{contract: contract}, nil +} + +// bindISynMessagingReceiver binds a generic wrapper to an already deployed contract. +func bindISynMessagingReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ISynMessagingReceiverABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ISynMessagingReceiver *ISynMessagingReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISynMessagingReceiver.Contract.ISynMessagingReceiverCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ISynMessagingReceiver *ISynMessagingReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ISynMessagingReceiverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISynMessagingReceiver *ISynMessagingReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ISynMessagingReceiverTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ISynMessagingReceiver *ISynMessagingReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISynMessagingReceiver.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.contract.Transact(opts, method, params...) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa6060871. +// +// Solidity: function executeMessage(bytes32 _srcAddress, uint256 _srcChainId, bytes _message, address _executor) returns() +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactor) ExecuteMessage(opts *bind.TransactOpts, _srcAddress [32]byte, _srcChainId *big.Int, _message []byte, _executor common.Address) (*types.Transaction, error) { + return _ISynMessagingReceiver.contract.Transact(opts, "executeMessage", _srcAddress, _srcChainId, _message, _executor) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa6060871. +// +// Solidity: function executeMessage(bytes32 _srcAddress, uint256 _srcChainId, bytes _message, address _executor) returns() +func (_ISynMessagingReceiver *ISynMessagingReceiverSession) ExecuteMessage(_srcAddress [32]byte, _srcChainId *big.Int, _message []byte, _executor common.Address) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ExecuteMessage(&_ISynMessagingReceiver.TransactOpts, _srcAddress, _srcChainId, _message, _executor) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa6060871. +// +// Solidity: function executeMessage(bytes32 _srcAddress, uint256 _srcChainId, bytes _message, address _executor) returns() +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactorSession) ExecuteMessage(_srcAddress [32]byte, _srcChainId *big.Int, _message []byte, _executor common.Address) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ExecuteMessage(&_ISynMessagingReceiver.TransactOpts, _srcAddress, _srcChainId, _message, _executor) +} + +// InitializableMetaData contains all meta data concerning the Initializable contract. +var InitializableMetaData = &bind.MetaData{ + ABI: "[]", +} + +// InitializableABI is the input ABI used to generate the binding from. +// Deprecated: Use InitializableMetaData.ABI instead. +var InitializableABI = InitializableMetaData.ABI + +// Initializable is an auto generated Go binding around an Ethereum contract. +type Initializable struct { + InitializableCaller // Read-only binding to the contract + InitializableTransactor // Write-only binding to the contract + InitializableFilterer // Log filterer for contract events +} + +// InitializableCaller is an auto generated read-only Go binding around an Ethereum contract. +type InitializableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type InitializableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type InitializableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type InitializableSession struct { + Contract *Initializable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// InitializableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type InitializableCallerSession struct { + Contract *InitializableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// InitializableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type InitializableTransactorSession struct { + Contract *InitializableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// InitializableRaw is an auto generated low-level Go binding around an Ethereum contract. +type InitializableRaw struct { + Contract *Initializable // Generic contract binding to access the raw methods on +} + +// InitializableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type InitializableCallerRaw struct { + Contract *InitializableCaller // Generic read-only contract binding to access the raw methods on +} + +// InitializableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type InitializableTransactorRaw struct { + Contract *InitializableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewInitializable creates a new instance of Initializable, bound to a specific deployed contract. +func NewInitializable(address common.Address, backend bind.ContractBackend) (*Initializable, error) { + contract, err := bindInitializable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Initializable{InitializableCaller: InitializableCaller{contract: contract}, InitializableTransactor: InitializableTransactor{contract: contract}, InitializableFilterer: InitializableFilterer{contract: contract}}, nil +} + +// NewInitializableCaller creates a new read-only instance of Initializable, bound to a specific deployed contract. +func NewInitializableCaller(address common.Address, caller bind.ContractCaller) (*InitializableCaller, error) { + contract, err := bindInitializable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &InitializableCaller{contract: contract}, nil +} + +// NewInitializableTransactor creates a new write-only instance of Initializable, bound to a specific deployed contract. +func NewInitializableTransactor(address common.Address, transactor bind.ContractTransactor) (*InitializableTransactor, error) { + contract, err := bindInitializable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &InitializableTransactor{contract: contract}, nil +} + +// NewInitializableFilterer creates a new log filterer instance of Initializable, bound to a specific deployed contract. +func NewInitializableFilterer(address common.Address, filterer bind.ContractFilterer) (*InitializableFilterer, error) { + contract, err := bindInitializable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &InitializableFilterer{contract: contract}, nil +} + +// bindInitializable binds a generic wrapper to an already deployed contract. +func bindInitializable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(InitializableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Initializable *InitializableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Initializable.Contract.InitializableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Initializable *InitializableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Initializable.Contract.InitializableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Initializable *InitializableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Initializable.Contract.InitializableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Initializable *InitializableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Initializable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Initializable *InitializableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Initializable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Initializable *InitializableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Initializable.Contract.contract.Transact(opts, method, params...) +} + +// MessageBusReceiverUpgradeableMetaData contains all meta data concerning the MessageBusReceiverUpgradeable contract. +var MessageBusReceiverUpgradeableMetaData = &bind.MetaData{ + 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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Sigs: map[string]string{ + "c4087335": "authVerifier()", + "a1b058d8": "executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)", + "25b19fa3": "getExecutedMessage(bytes32)", + "8da5cb5b": "owner()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", + "a5c0edf3": "updateAuthVerifier(address)", + "9b11079c": "updateMessageStatus(bytes32,uint8)", + }, + Bin: "0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220becd8008fcfb832f963ab01a90771904c20fcc674de64aeb66c33ac1da800e4564736f6c63430008000033", +} + +// MessageBusReceiverUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use MessageBusReceiverUpgradeableMetaData.ABI instead. +var MessageBusReceiverUpgradeableABI = MessageBusReceiverUpgradeableMetaData.ABI + +// Deprecated: Use MessageBusReceiverUpgradeableMetaData.Sigs instead. +// MessageBusReceiverUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var MessageBusReceiverUpgradeableFuncSigs = MessageBusReceiverUpgradeableMetaData.Sigs + +// MessageBusReceiverUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MessageBusReceiverUpgradeableMetaData.Bin instead. +var MessageBusReceiverUpgradeableBin = MessageBusReceiverUpgradeableMetaData.Bin + +// DeployMessageBusReceiverUpgradeable deploys a new Ethereum contract, binding an instance of MessageBusReceiverUpgradeable to it. +func DeployMessageBusReceiverUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MessageBusReceiverUpgradeable, error) { + parsed, err := MessageBusReceiverUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MessageBusReceiverUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MessageBusReceiverUpgradeable{MessageBusReceiverUpgradeableCaller: MessageBusReceiverUpgradeableCaller{contract: contract}, MessageBusReceiverUpgradeableTransactor: MessageBusReceiverUpgradeableTransactor{contract: contract}, MessageBusReceiverUpgradeableFilterer: MessageBusReceiverUpgradeableFilterer{contract: contract}}, nil +} + +// MessageBusReceiverUpgradeable is an auto generated Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeable struct { + MessageBusReceiverUpgradeableCaller // Read-only binding to the contract + MessageBusReceiverUpgradeableTransactor // Write-only binding to the contract + MessageBusReceiverUpgradeableFilterer // Log filterer for contract events +} + +// MessageBusReceiverUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusReceiverUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusReceiverUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MessageBusReceiverUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusReceiverUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MessageBusReceiverUpgradeableSession struct { + Contract *MessageBusReceiverUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusReceiverUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MessageBusReceiverUpgradeableCallerSession struct { + Contract *MessageBusReceiverUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MessageBusReceiverUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MessageBusReceiverUpgradeableTransactorSession struct { + Contract *MessageBusReceiverUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusReceiverUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableRaw struct { + Contract *MessageBusReceiverUpgradeable // Generic contract binding to access the raw methods on +} + +// MessageBusReceiverUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableCallerRaw struct { + Contract *MessageBusReceiverUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// MessageBusReceiverUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableTransactorRaw struct { + Contract *MessageBusReceiverUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMessageBusReceiverUpgradeable creates a new instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeable(address common.Address, backend bind.ContractBackend) (*MessageBusReceiverUpgradeable, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeable{MessageBusReceiverUpgradeableCaller: MessageBusReceiverUpgradeableCaller{contract: contract}, MessageBusReceiverUpgradeableTransactor: MessageBusReceiverUpgradeableTransactor{contract: contract}, MessageBusReceiverUpgradeableFilterer: MessageBusReceiverUpgradeableFilterer{contract: contract}}, nil +} + +// NewMessageBusReceiverUpgradeableCaller creates a new read-only instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*MessageBusReceiverUpgradeableCaller, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableCaller{contract: contract}, nil +} + +// NewMessageBusReceiverUpgradeableTransactor creates a new write-only instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*MessageBusReceiverUpgradeableTransactor, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableTransactor{contract: contract}, nil +} + +// NewMessageBusReceiverUpgradeableFilterer creates a new log filterer instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*MessageBusReceiverUpgradeableFilterer, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableFilterer{contract: contract}, nil +} + +// bindMessageBusReceiverUpgradeable binds a generic wrapper to an already deployed contract. +func bindMessageBusReceiverUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MessageBusReceiverUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusReceiverUpgradeable.Contract.MessageBusReceiverUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.MessageBusReceiverUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.MessageBusReceiverUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusReceiverUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) AuthVerifier(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "authVerifier") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) AuthVerifier() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.AuthVerifier(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) AuthVerifier() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.AuthVerifier(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) GetExecutedMessage(opts *bind.CallOpts, _messageId [32]byte) (uint8, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "getExecutedMessage", _messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusReceiverUpgradeable.Contract.GetExecutedMessage(&_MessageBusReceiverUpgradeable.CallOpts, _messageId) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusReceiverUpgradeable.Contract.GetExecutedMessage(&_MessageBusReceiverUpgradeable.CallOpts, _messageId) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) Owner() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.Owner(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) Owner() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.Owner(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) Paused() (bool, error) { + return _MessageBusReceiverUpgradeable.Contract.Paused(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) Paused() (bool, error) { + return _MessageBusReceiverUpgradeable.Contract.Paused(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) ExecuteMessage(opts *bind.TransactOpts, _srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "executeMessage", _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.ExecuteMessage(&_MessageBusReceiverUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.ExecuteMessage(&_MessageBusReceiverUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.RenounceOwnership(&_MessageBusReceiverUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.RenounceOwnership(&_MessageBusReceiverUpgradeable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.TransferOwnership(&_MessageBusReceiverUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.TransferOwnership(&_MessageBusReceiverUpgradeable.TransactOpts, newOwner) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) UpdateAuthVerifier(opts *bind.TransactOpts, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "updateAuthVerifier", _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusReceiverUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusReceiverUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) UpdateMessageStatus(opts *bind.TransactOpts, _messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "updateMessageStatus", _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateMessageStatus(&_MessageBusReceiverUpgradeable.TransactOpts, _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateMessageStatus(&_MessageBusReceiverUpgradeable.TransactOpts, _messageId, _status) +} + +// MessageBusReceiverUpgradeableCallRevertedIterator is returned from FilterCallReverted and is used to iterate over the raw logs and unpacked data for CallReverted events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableCallRevertedIterator struct { + Event *MessageBusReceiverUpgradeableCallReverted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableCallRevertedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableCallRevertedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableCallRevertedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableCallReverted represents a CallReverted event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableCallReverted struct { + Reason string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallReverted is a free log retrieval operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterCallReverted(opts *bind.FilterOpts) (*MessageBusReceiverUpgradeableCallRevertedIterator, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableCallRevertedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "CallReverted", logs: logs, sub: sub}, nil +} + +// WatchCallReverted is a free log subscription operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchCallReverted(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableCallReverted) (event.Subscription, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableCallReverted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallReverted is a log parse operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseCallReverted(log types.Log) (*MessageBusReceiverUpgradeableCallReverted, error) { + event := new(MessageBusReceiverUpgradeableCallReverted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeableExecutedIterator is returned from FilterExecuted and is used to iterate over the raw logs and unpacked data for Executed events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableExecutedIterator struct { + Event *MessageBusReceiverUpgradeableExecuted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableExecutedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableExecutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableExecuted represents a Executed event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableExecuted struct { + MessageId [32]byte + Status uint8 + DstAddress common.Address + SrcChainId uint64 + SrcNonce uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecuted is a free log retrieval operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterExecuted(opts *bind.FilterOpts, messageId [][32]byte, _dstAddress []common.Address) (*MessageBusReceiverUpgradeableExecutedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableExecutedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "Executed", logs: logs, sub: sub}, nil +} + +// WatchExecuted is a free log subscription operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchExecuted(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableExecuted, messageId [][32]byte, _dstAddress []common.Address) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableExecuted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExecuted is a log parse operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseExecuted(log types.Log) (*MessageBusReceiverUpgradeableExecuted, error) { + event := new(MessageBusReceiverUpgradeableExecuted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableOwnershipTransferredIterator struct { + Event *MessageBusReceiverUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MessageBusReceiverUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableOwnershipTransferredIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*MessageBusReceiverUpgradeableOwnershipTransferred, error) { + event := new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeablePausedIterator struct { + Event *MessageBusReceiverUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeablePaused represents a Paused event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*MessageBusReceiverUpgradeablePausedIterator, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeablePausedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeablePaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParsePaused(log types.Log) (*MessageBusReceiverUpgradeablePaused, error) { + event := new(MessageBusReceiverUpgradeablePaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableUnpausedIterator struct { + Event *MessageBusReceiverUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableUnpaused represents a Unpaused event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*MessageBusReceiverUpgradeableUnpausedIterator, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableUnpausedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableUnpaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseUnpaused(log types.Log) (*MessageBusReceiverUpgradeableUnpaused, error) { + event := new(MessageBusReceiverUpgradeableUnpaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeableMetaData contains all meta data concerning the MessageBusSenderUpgradeable contract. +var MessageBusSenderUpgradeableMetaData = &bind.MetaData{ + 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\":\"addresspayable\",\"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\":\"addresspayable\",\"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\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Sigs: map[string]string{ + "f44d57aa": "computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)", + "5da6d2c4": "estimateFee(uint256,bytes)", + "9af1d35a": "fees()", + "aa70fc0e": "gasFeePricing()", + "affed0e0": "nonce()", + "8da5cb5b": "owner()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "205e157b": "rescueGas(address)", + "ac8a4c1b": "sendMessage(bytes32,uint256,bytes,bytes)", + "72177189": "sendMessage(bytes32,uint256,bytes,bytes,address)", + "f2fde38b": "transferOwnership(address)", + "a66dd384": "updateGasFeePricing(address)", + "d6b457b9": "withdrawGasFees(address)", + }, + Bin: "0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212208c0c8bcc7444e376bd6c07755e51de24f3bca284000fbf139bb22b9a4602c42464736f6c63430008000033", +} + +// MessageBusSenderUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use MessageBusSenderUpgradeableMetaData.ABI instead. +var MessageBusSenderUpgradeableABI = MessageBusSenderUpgradeableMetaData.ABI + +// Deprecated: Use MessageBusSenderUpgradeableMetaData.Sigs instead. +// MessageBusSenderUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var MessageBusSenderUpgradeableFuncSigs = MessageBusSenderUpgradeableMetaData.Sigs + +// MessageBusSenderUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MessageBusSenderUpgradeableMetaData.Bin instead. +var MessageBusSenderUpgradeableBin = MessageBusSenderUpgradeableMetaData.Bin + +// DeployMessageBusSenderUpgradeable deploys a new Ethereum contract, binding an instance of MessageBusSenderUpgradeable to it. +func DeployMessageBusSenderUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MessageBusSenderUpgradeable, error) { + parsed, err := MessageBusSenderUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MessageBusSenderUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MessageBusSenderUpgradeable{MessageBusSenderUpgradeableCaller: MessageBusSenderUpgradeableCaller{contract: contract}, MessageBusSenderUpgradeableTransactor: MessageBusSenderUpgradeableTransactor{contract: contract}, MessageBusSenderUpgradeableFilterer: MessageBusSenderUpgradeableFilterer{contract: contract}}, nil +} + +// MessageBusSenderUpgradeable is an auto generated Go binding around an Ethereum contract. +type MessageBusSenderUpgradeable struct { + MessageBusSenderUpgradeableCaller // Read-only binding to the contract + MessageBusSenderUpgradeableTransactor // Write-only binding to the contract + MessageBusSenderUpgradeableFilterer // Log filterer for contract events +} + +// MessageBusSenderUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusSenderUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusSenderUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MessageBusSenderUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusSenderUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MessageBusSenderUpgradeableSession struct { + Contract *MessageBusSenderUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusSenderUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MessageBusSenderUpgradeableCallerSession struct { + Contract *MessageBusSenderUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MessageBusSenderUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MessageBusSenderUpgradeableTransactorSession struct { + Contract *MessageBusSenderUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusSenderUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableRaw struct { + Contract *MessageBusSenderUpgradeable // Generic contract binding to access the raw methods on +} + +// MessageBusSenderUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableCallerRaw struct { + Contract *MessageBusSenderUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// MessageBusSenderUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableTransactorRaw struct { + Contract *MessageBusSenderUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMessageBusSenderUpgradeable creates a new instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeable(address common.Address, backend bind.ContractBackend) (*MessageBusSenderUpgradeable, error) { + contract, err := bindMessageBusSenderUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeable{MessageBusSenderUpgradeableCaller: MessageBusSenderUpgradeableCaller{contract: contract}, MessageBusSenderUpgradeableTransactor: MessageBusSenderUpgradeableTransactor{contract: contract}, MessageBusSenderUpgradeableFilterer: MessageBusSenderUpgradeableFilterer{contract: contract}}, nil +} + +// NewMessageBusSenderUpgradeableCaller creates a new read-only instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*MessageBusSenderUpgradeableCaller, error) { + contract, err := bindMessageBusSenderUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableCaller{contract: contract}, nil +} + +// NewMessageBusSenderUpgradeableTransactor creates a new write-only instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*MessageBusSenderUpgradeableTransactor, error) { + contract, err := bindMessageBusSenderUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableTransactor{contract: contract}, nil +} + +// NewMessageBusSenderUpgradeableFilterer creates a new log filterer instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*MessageBusSenderUpgradeableFilterer, error) { + contract, err := bindMessageBusSenderUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableFilterer{contract: contract}, nil +} + +// bindMessageBusSenderUpgradeable binds a generic wrapper to an already deployed contract. +func bindMessageBusSenderUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MessageBusSenderUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusSenderUpgradeable.Contract.MessageBusSenderUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.MessageBusSenderUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.MessageBusSenderUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusSenderUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) ComputeMessageId(opts *bind.CallOpts, _srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "computeMessageId", _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusSenderUpgradeable.Contract.ComputeMessageId(&_MessageBusSenderUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusSenderUpgradeable.Contract.ComputeMessageId(&_MessageBusSenderUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Fees(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "fees") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Fees() (*big.Int, error) { + return _MessageBusSenderUpgradeable.Contract.Fees(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Fees() (*big.Int, error) { + return _MessageBusSenderUpgradeable.Contract.Fees(&_MessageBusSenderUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) GasFeePricing(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "gasFeePricing") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) GasFeePricing() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.GasFeePricing(&_MessageBusSenderUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) GasFeePricing() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.GasFeePricing(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Nonce(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "nonce") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Nonce() (uint64, error) { + return _MessageBusSenderUpgradeable.Contract.Nonce(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Nonce() (uint64, error) { + return _MessageBusSenderUpgradeable.Contract.Nonce(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Owner() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.Owner(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Owner() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.Owner(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Paused() (bool, error) { + return _MessageBusSenderUpgradeable.Contract.Paused(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Paused() (bool, error) { + return _MessageBusSenderUpgradeable.Contract.Paused(&_MessageBusSenderUpgradeable.CallOpts) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) EstimateFee(opts *bind.TransactOpts, _dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "estimateFee", _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.EstimateFee(&_MessageBusSenderUpgradeable.TransactOpts, _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.EstimateFee(&_MessageBusSenderUpgradeable.TransactOpts, _dstChainId, _options) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RenounceOwnership(&_MessageBusSenderUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RenounceOwnership(&_MessageBusSenderUpgradeable.TransactOpts) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) RescueGas(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "rescueGas", to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RescueGas(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RescueGas(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) SendMessage(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "sendMessage", _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) SendMessage0(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "sendMessage0", _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage0(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage0(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.TransferOwnership(&_MessageBusSenderUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.TransferOwnership(&_MessageBusSenderUpgradeable.TransactOpts, newOwner) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) UpdateGasFeePricing(opts *bind.TransactOpts, _gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "updateGasFeePricing", _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusSenderUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusSenderUpgradeable.TransactOpts, _gasFeePricing) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) WithdrawGasFees(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "withdrawGasFees", to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.WithdrawGasFees(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.WithdrawGasFees(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// MessageBusSenderUpgradeableMessageSentIterator is returned from FilterMessageSent and is used to iterate over the raw logs and unpacked data for MessageSent events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableMessageSentIterator struct { + Event *MessageBusSenderUpgradeableMessageSent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeableMessageSentIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeableMessageSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeableMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeableMessageSent represents a MessageSent event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableMessageSent struct { + Sender common.Address + SrcChainID *big.Int + Receiver [32]byte + DstChainId *big.Int + Message []byte + Nonce uint64 + Options []byte + Fee *big.Int + MessageId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMessageSent is a free log retrieval operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterMessageSent(opts *bind.FilterOpts, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (*MessageBusSenderUpgradeableMessageSentIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableMessageSentIterator{contract: _MessageBusSenderUpgradeable.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +// WatchMessageSent is a free log subscription operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeableMessageSent, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeableMessageSent) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMessageSent is a log parse operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParseMessageSent(log types.Log) (*MessageBusSenderUpgradeableMessageSent, error) { + event := new(MessageBusSenderUpgradeableMessageSent) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableOwnershipTransferredIterator struct { + Event *MessageBusSenderUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MessageBusSenderUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableOwnershipTransferredIterator{contract: _MessageBusSenderUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*MessageBusSenderUpgradeableOwnershipTransferred, error) { + event := new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeablePausedIterator struct { + Event *MessageBusSenderUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeablePaused represents a Paused event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*MessageBusSenderUpgradeablePausedIterator, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeablePausedIterator{contract: _MessageBusSenderUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeablePaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParsePaused(log types.Log) (*MessageBusSenderUpgradeablePaused, error) { + event := new(MessageBusSenderUpgradeablePaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableUnpausedIterator struct { + Event *MessageBusSenderUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeableUnpaused represents a Unpaused event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*MessageBusSenderUpgradeableUnpausedIterator, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableUnpausedIterator{contract: _MessageBusSenderUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeableUnpaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParseUnpaused(log types.Log) (*MessageBusSenderUpgradeableUnpaused, error) { + event := new(MessageBusSenderUpgradeableUnpaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableMetaData contains all meta data concerning the MessageBusUpgradeable contract. +var MessageBusUpgradeableMetaData = &bind.MetaData{ + 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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.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\":\"addresspayable\",\"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\":\"addresspayable\",\"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\":\"enumMessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Sigs: map[string]string{ + "c4087335": "authVerifier()", + "f44d57aa": "computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)", + "5da6d2c4": "estimateFee(uint256,bytes)", + "a1b058d8": "executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)", + "9af1d35a": "fees()", + "aa70fc0e": "gasFeePricing()", + "25b19fa3": "getExecutedMessage(bytes32)", + "485cc955": "initialize(address,address)", + "affed0e0": "nonce()", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "205e157b": "rescueGas(address)", + "ac8a4c1b": "sendMessage(bytes32,uint256,bytes,bytes)", + "72177189": "sendMessage(bytes32,uint256,bytes,bytes,address)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", + "a5c0edf3": "updateAuthVerifier(address)", + "a66dd384": "updateGasFeePricing(address)", + "9b11079c": "updateMessageStatus(bytes32,uint8)", + "d6b457b9": "withdrawGasFees(address)", + }, + Bin: "0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea26469706673582212202449cd8c0d62d1579b3637b11026825317873b0bb5226ef8c5568dc2f0ca065264736f6c63430008000033", +} + +// MessageBusUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use MessageBusUpgradeableMetaData.ABI instead. +var MessageBusUpgradeableABI = MessageBusUpgradeableMetaData.ABI + +// Deprecated: Use MessageBusUpgradeableMetaData.Sigs instead. +// MessageBusUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var MessageBusUpgradeableFuncSigs = MessageBusUpgradeableMetaData.Sigs + +// MessageBusUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MessageBusUpgradeableMetaData.Bin instead. +var MessageBusUpgradeableBin = MessageBusUpgradeableMetaData.Bin + +// DeployMessageBusUpgradeable deploys a new Ethereum contract, binding an instance of MessageBusUpgradeable to it. +func DeployMessageBusUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MessageBusUpgradeable, error) { + parsed, err := MessageBusUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MessageBusUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MessageBusUpgradeable{MessageBusUpgradeableCaller: MessageBusUpgradeableCaller{contract: contract}, MessageBusUpgradeableTransactor: MessageBusUpgradeableTransactor{contract: contract}, MessageBusUpgradeableFilterer: MessageBusUpgradeableFilterer{contract: contract}}, nil +} + +// MessageBusUpgradeable is an auto generated Go binding around an Ethereum contract. +type MessageBusUpgradeable struct { + MessageBusUpgradeableCaller // Read-only binding to the contract + MessageBusUpgradeableTransactor // Write-only binding to the contract + MessageBusUpgradeableFilterer // Log filterer for contract events +} + +// MessageBusUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type MessageBusUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MessageBusUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MessageBusUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MessageBusUpgradeableSession struct { + Contract *MessageBusUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MessageBusUpgradeableCallerSession struct { + Contract *MessageBusUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MessageBusUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MessageBusUpgradeableTransactorSession struct { + Contract *MessageBusUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type MessageBusUpgradeableRaw struct { + Contract *MessageBusUpgradeable // Generic contract binding to access the raw methods on +} + +// MessageBusUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MessageBusUpgradeableCallerRaw struct { + Contract *MessageBusUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// MessageBusUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MessageBusUpgradeableTransactorRaw struct { + Contract *MessageBusUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMessageBusUpgradeable creates a new instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeable(address common.Address, backend bind.ContractBackend) (*MessageBusUpgradeable, error) { + contract, err := bindMessageBusUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MessageBusUpgradeable{MessageBusUpgradeableCaller: MessageBusUpgradeableCaller{contract: contract}, MessageBusUpgradeableTransactor: MessageBusUpgradeableTransactor{contract: contract}, MessageBusUpgradeableFilterer: MessageBusUpgradeableFilterer{contract: contract}}, nil +} + +// NewMessageBusUpgradeableCaller creates a new read-only instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*MessageBusUpgradeableCaller, error) { + contract, err := bindMessageBusUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableCaller{contract: contract}, nil +} + +// NewMessageBusUpgradeableTransactor creates a new write-only instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*MessageBusUpgradeableTransactor, error) { + contract, err := bindMessageBusUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableTransactor{contract: contract}, nil +} + +// NewMessageBusUpgradeableFilterer creates a new log filterer instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*MessageBusUpgradeableFilterer, error) { + contract, err := bindMessageBusUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableFilterer{contract: contract}, nil +} + +// bindMessageBusUpgradeable binds a generic wrapper to an already deployed contract. +func bindMessageBusUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MessageBusUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusUpgradeable *MessageBusUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusUpgradeable.Contract.MessageBusUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusUpgradeable *MessageBusUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.MessageBusUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusUpgradeable *MessageBusUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.MessageBusUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) AuthVerifier(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "authVerifier") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) AuthVerifier() (common.Address, error) { + return _MessageBusUpgradeable.Contract.AuthVerifier(&_MessageBusUpgradeable.CallOpts) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) AuthVerifier() (common.Address, error) { + return _MessageBusUpgradeable.Contract.AuthVerifier(&_MessageBusUpgradeable.CallOpts) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) ComputeMessageId(opts *bind.CallOpts, _srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "computeMessageId", _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusUpgradeable.Contract.ComputeMessageId(&_MessageBusUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusUpgradeable.Contract.ComputeMessageId(&_MessageBusUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Fees(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "fees") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Fees() (*big.Int, error) { + return _MessageBusUpgradeable.Contract.Fees(&_MessageBusUpgradeable.CallOpts) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Fees() (*big.Int, error) { + return _MessageBusUpgradeable.Contract.Fees(&_MessageBusUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) GasFeePricing(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "gasFeePricing") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) GasFeePricing() (common.Address, error) { + return _MessageBusUpgradeable.Contract.GasFeePricing(&_MessageBusUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) GasFeePricing() (common.Address, error) { + return _MessageBusUpgradeable.Contract.GasFeePricing(&_MessageBusUpgradeable.CallOpts) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) GetExecutedMessage(opts *bind.CallOpts, _messageId [32]byte) (uint8, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "getExecutedMessage", _messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusUpgradeable.Contract.GetExecutedMessage(&_MessageBusUpgradeable.CallOpts, _messageId) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusUpgradeable.Contract.GetExecutedMessage(&_MessageBusUpgradeable.CallOpts, _messageId) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Nonce(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "nonce") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Nonce() (uint64, error) { + return _MessageBusUpgradeable.Contract.Nonce(&_MessageBusUpgradeable.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Nonce() (uint64, error) { + return _MessageBusUpgradeable.Contract.Nonce(&_MessageBusUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Owner() (common.Address, error) { + return _MessageBusUpgradeable.Contract.Owner(&_MessageBusUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Owner() (common.Address, error) { + return _MessageBusUpgradeable.Contract.Owner(&_MessageBusUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Paused() (bool, error) { + return _MessageBusUpgradeable.Contract.Paused(&_MessageBusUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Paused() (bool, error) { + return _MessageBusUpgradeable.Contract.Paused(&_MessageBusUpgradeable.CallOpts) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) EstimateFee(opts *bind.TransactOpts, _dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "estimateFee", _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.EstimateFee(&_MessageBusUpgradeable.TransactOpts, _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.EstimateFee(&_MessageBusUpgradeable.TransactOpts, _dstChainId, _options) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) ExecuteMessage(opts *bind.TransactOpts, _srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "executeMessage", _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.ExecuteMessage(&_MessageBusUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.ExecuteMessage(&_MessageBusUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) Initialize(opts *bind.TransactOpts, _gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "initialize", _gasFeePricing, _authVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Initialize(_gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Initialize(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing, _authVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) Initialize(_gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Initialize(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing, _authVerifier) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Pause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Pause(&_MessageBusUpgradeable.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) Pause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Pause(&_MessageBusUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RenounceOwnership(&_MessageBusUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RenounceOwnership(&_MessageBusUpgradeable.TransactOpts) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) RescueGas(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "rescueGas", to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RescueGas(&_MessageBusUpgradeable.TransactOpts, to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RescueGas(&_MessageBusUpgradeable.TransactOpts, to) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) SendMessage(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "sendMessage", _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) SendMessage0(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "sendMessage0", _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage0(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage0(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.TransferOwnership(&_MessageBusUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.TransferOwnership(&_MessageBusUpgradeable.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Unpause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Unpause(&_MessageBusUpgradeable.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) Unpause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Unpause(&_MessageBusUpgradeable.TransactOpts) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) UpdateAuthVerifier(opts *bind.TransactOpts, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "updateAuthVerifier", _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) UpdateGasFeePricing(opts *bind.TransactOpts, _gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "updateGasFeePricing", _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) UpdateMessageStatus(opts *bind.TransactOpts, _messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "updateMessageStatus", _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateMessageStatus(&_MessageBusUpgradeable.TransactOpts, _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateMessageStatus(&_MessageBusUpgradeable.TransactOpts, _messageId, _status) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) WithdrawGasFees(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "withdrawGasFees", to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.WithdrawGasFees(&_MessageBusUpgradeable.TransactOpts, to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.WithdrawGasFees(&_MessageBusUpgradeable.TransactOpts, to) +} + +// MessageBusUpgradeableCallRevertedIterator is returned from FilterCallReverted and is used to iterate over the raw logs and unpacked data for CallReverted events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableCallRevertedIterator struct { + Event *MessageBusUpgradeableCallReverted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableCallRevertedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableCallRevertedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableCallRevertedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableCallReverted represents a CallReverted event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableCallReverted struct { + Reason string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallReverted is a free log retrieval operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterCallReverted(opts *bind.FilterOpts) (*MessageBusUpgradeableCallRevertedIterator, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return &MessageBusUpgradeableCallRevertedIterator{contract: _MessageBusUpgradeable.contract, event: "CallReverted", logs: logs, sub: sub}, nil +} + +// WatchCallReverted is a free log subscription operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchCallReverted(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableCallReverted) (event.Subscription, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableCallReverted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallReverted is a log parse operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseCallReverted(log types.Log) (*MessageBusUpgradeableCallReverted, error) { + event := new(MessageBusUpgradeableCallReverted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableExecutedIterator is returned from FilterExecuted and is used to iterate over the raw logs and unpacked data for Executed events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableExecutedIterator struct { + Event *MessageBusUpgradeableExecuted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableExecutedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableExecutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableExecuted represents a Executed event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableExecuted struct { + MessageId [32]byte + Status uint8 + DstAddress common.Address + SrcChainId uint64 + SrcNonce uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecuted is a free log retrieval operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterExecuted(opts *bind.FilterOpts, messageId [][32]byte, _dstAddress []common.Address) (*MessageBusUpgradeableExecutedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableExecutedIterator{contract: _MessageBusUpgradeable.contract, event: "Executed", logs: logs, sub: sub}, nil +} + +// WatchExecuted is a free log subscription operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchExecuted(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableExecuted, messageId [][32]byte, _dstAddress []common.Address) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableExecuted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExecuted is a log parse operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseExecuted(log types.Log) (*MessageBusUpgradeableExecuted, error) { + event := new(MessageBusUpgradeableExecuted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableMessageSentIterator is returned from FilterMessageSent and is used to iterate over the raw logs and unpacked data for MessageSent events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableMessageSentIterator struct { + Event *MessageBusUpgradeableMessageSent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableMessageSentIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableMessageSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableMessageSent represents a MessageSent event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableMessageSent struct { + Sender common.Address + SrcChainID *big.Int + Receiver [32]byte + DstChainId *big.Int + Message []byte + Nonce uint64 + Options []byte + Fee *big.Int + MessageId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMessageSent is a free log retrieval operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterMessageSent(opts *bind.FilterOpts, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (*MessageBusUpgradeableMessageSentIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableMessageSentIterator{contract: _MessageBusUpgradeable.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +// WatchMessageSent is a free log subscription operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableMessageSent, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableMessageSent) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMessageSent is a log parse operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseMessageSent(log types.Log) (*MessageBusUpgradeableMessageSent, error) { + event := new(MessageBusUpgradeableMessageSent) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableOwnershipTransferredIterator struct { + Event *MessageBusUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MessageBusUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableOwnershipTransferredIterator{contract: _MessageBusUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableOwnershipTransferred) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*MessageBusUpgradeableOwnershipTransferred, error) { + event := new(MessageBusUpgradeableOwnershipTransferred) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeablePausedIterator struct { + Event *MessageBusUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeablePaused represents a Paused event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*MessageBusUpgradeablePausedIterator, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &MessageBusUpgradeablePausedIterator{contract: _MessageBusUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeablePaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParsePaused(log types.Log) (*MessageBusUpgradeablePaused, error) { + event := new(MessageBusUpgradeablePaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableUnpausedIterator struct { + Event *MessageBusUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableUnpaused represents a Unpaused event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*MessageBusUpgradeableUnpausedIterator, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &MessageBusUpgradeableUnpausedIterator{contract: _MessageBusUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableUnpaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseUnpaused(log types.Log) (*MessageBusUpgradeableUnpaused, error) { + event := new(MessageBusUpgradeableUnpaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OwnableUpgradeableMetaData contains all meta data concerning the OwnableUpgradeable contract. +var OwnableUpgradeableMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", + }, +} + +// OwnableUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use OwnableUpgradeableMetaData.ABI instead. +var OwnableUpgradeableABI = OwnableUpgradeableMetaData.ABI + +// Deprecated: Use OwnableUpgradeableMetaData.Sigs instead. +// OwnableUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var OwnableUpgradeableFuncSigs = OwnableUpgradeableMetaData.Sigs + +// OwnableUpgradeable is an auto generated Go binding around an Ethereum contract. +type OwnableUpgradeable struct { + OwnableUpgradeableCaller // Read-only binding to the contract + OwnableUpgradeableTransactor // Write-only binding to the contract + OwnableUpgradeableFilterer // Log filterer for contract events +} + +// OwnableUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableUpgradeableSession struct { + Contract *OwnableUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableUpgradeableCallerSession struct { + Contract *OwnableUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableUpgradeableTransactorSession struct { + Contract *OwnableUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableUpgradeableRaw struct { + Contract *OwnableUpgradeable // Generic contract binding to access the raw methods on +} + +// OwnableUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableUpgradeableCallerRaw struct { + Contract *OwnableUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableUpgradeableTransactorRaw struct { + Contract *OwnableUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnableUpgradeable creates a new instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeable(address common.Address, backend bind.ContractBackend) (*OwnableUpgradeable, error) { + contract, err := bindOwnableUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OwnableUpgradeable{OwnableUpgradeableCaller: OwnableUpgradeableCaller{contract: contract}, OwnableUpgradeableTransactor: OwnableUpgradeableTransactor{contract: contract}, OwnableUpgradeableFilterer: OwnableUpgradeableFilterer{contract: contract}}, nil +} + +// NewOwnableUpgradeableCaller creates a new read-only instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*OwnableUpgradeableCaller, error) { + contract, err := bindOwnableUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableUpgradeableCaller{contract: contract}, nil +} + +// NewOwnableUpgradeableTransactor creates a new write-only instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableUpgradeableTransactor, error) { + contract, err := bindOwnableUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableUpgradeableTransactor{contract: contract}, nil +} + +// NewOwnableUpgradeableFilterer creates a new log filterer instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableUpgradeableFilterer, error) { + contract, err := bindOwnableUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableUpgradeableFilterer{contract: contract}, nil +} + +// bindOwnableUpgradeable binds a generic wrapper to an already deployed contract. +func bindOwnableUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OwnableUpgradeable *OwnableUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OwnableUpgradeable.Contract.OwnableUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OwnableUpgradeable *OwnableUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.OwnableUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableUpgradeable *OwnableUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.OwnableUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OwnableUpgradeable *OwnableUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OwnableUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OwnableUpgradeable *OwnableUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableUpgradeable *OwnableUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OwnableUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableSession) Owner() (common.Address, error) { + return _OwnableUpgradeable.Contract.Owner(&_OwnableUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableCallerSession) Owner() (common.Address, error) { + return _OwnableUpgradeable.Contract.Owner(&_OwnableUpgradeable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.RenounceOwnership(&_OwnableUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.RenounceOwnership(&_OwnableUpgradeable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.TransferOwnership(&_OwnableUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.TransferOwnership(&_OwnableUpgradeable.TransactOpts, newOwner) +} + +// OwnableUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the OwnableUpgradeable contract. +type OwnableUpgradeableOwnershipTransferredIterator struct { + Event *OwnableUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OwnableUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OwnableUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OwnableUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the OwnableUpgradeable contract. +type OwnableUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableUpgradeable *OwnableUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _OwnableUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableUpgradeableOwnershipTransferredIterator{contract: _OwnableUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableUpgradeable *OwnableUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _OwnableUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableUpgradeableOwnershipTransferred) + if err := _OwnableUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableUpgradeable *OwnableUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableUpgradeableOwnershipTransferred, error) { + event := new(OwnableUpgradeableOwnershipTransferred) + if err := _OwnableUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// PausableUpgradeableMetaData contains all meta data concerning the PausableUpgradeable contract. +var PausableUpgradeableMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "5c975abb": "paused()", + }, +} + +// PausableUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use PausableUpgradeableMetaData.ABI instead. +var PausableUpgradeableABI = PausableUpgradeableMetaData.ABI + +// Deprecated: Use PausableUpgradeableMetaData.Sigs instead. +// PausableUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var PausableUpgradeableFuncSigs = PausableUpgradeableMetaData.Sigs + +// PausableUpgradeable is an auto generated Go binding around an Ethereum contract. +type PausableUpgradeable struct { + PausableUpgradeableCaller // Read-only binding to the contract + PausableUpgradeableTransactor // Write-only binding to the contract + PausableUpgradeableFilterer // Log filterer for contract events +} + +// PausableUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type PausableUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PausableUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PausableUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PausableUpgradeableSession struct { + Contract *PausableUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PausableUpgradeableCallerSession struct { + Contract *PausableUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PausableUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PausableUpgradeableTransactorSession struct { + Contract *PausableUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type PausableUpgradeableRaw struct { + Contract *PausableUpgradeable // Generic contract binding to access the raw methods on +} + +// PausableUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PausableUpgradeableCallerRaw struct { + Contract *PausableUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// PausableUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PausableUpgradeableTransactorRaw struct { + Contract *PausableUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewPausableUpgradeable creates a new instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeable(address common.Address, backend bind.ContractBackend) (*PausableUpgradeable, error) { + contract, err := bindPausableUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &PausableUpgradeable{PausableUpgradeableCaller: PausableUpgradeableCaller{contract: contract}, PausableUpgradeableTransactor: PausableUpgradeableTransactor{contract: contract}, PausableUpgradeableFilterer: PausableUpgradeableFilterer{contract: contract}}, nil +} + +// NewPausableUpgradeableCaller creates a new read-only instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*PausableUpgradeableCaller, error) { + contract, err := bindPausableUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PausableUpgradeableCaller{contract: contract}, nil +} + +// NewPausableUpgradeableTransactor creates a new write-only instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableUpgradeableTransactor, error) { + contract, err := bindPausableUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PausableUpgradeableTransactor{contract: contract}, nil +} + +// NewPausableUpgradeableFilterer creates a new log filterer instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableUpgradeableFilterer, error) { + contract, err := bindPausableUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PausableUpgradeableFilterer{contract: contract}, nil +} + +// bindPausableUpgradeable binds a generic wrapper to an already deployed contract. +func bindPausableUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PausableUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_PausableUpgradeable *PausableUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PausableUpgradeable.Contract.PausableUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_PausableUpgradeable *PausableUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.PausableUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PausableUpgradeable *PausableUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.PausableUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_PausableUpgradeable *PausableUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PausableUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_PausableUpgradeable *PausableUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PausableUpgradeable *PausableUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableUpgradeable *PausableUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _PausableUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableUpgradeable *PausableUpgradeableSession) Paused() (bool, error) { + return _PausableUpgradeable.Contract.Paused(&_PausableUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableUpgradeable *PausableUpgradeableCallerSession) Paused() (bool, error) { + return _PausableUpgradeable.Contract.Paused(&_PausableUpgradeable.CallOpts) +} + +// PausableUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the PausableUpgradeable contract. +type PausableUpgradeablePausedIterator struct { + Event *PausableUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausableUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUpgradeablePaused represents a Paused event raised by the PausableUpgradeable contract. +type PausableUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausableUpgradeablePausedIterator, error) { + + logs, sub, err := _PausableUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &PausableUpgradeablePausedIterator{contract: _PausableUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausableUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _PausableUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUpgradeablePaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) ParsePaused(log types.Log) (*PausableUpgradeablePaused, error) { + event := new(PausableUpgradeablePaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// PausableUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the PausableUpgradeable contract. +type PausableUpgradeableUnpausedIterator struct { + Event *PausableUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausableUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUpgradeableUnpaused represents a Unpaused event raised by the PausableUpgradeable contract. +type PausableUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUpgradeableUnpausedIterator, error) { + + logs, sub, err := _PausableUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &PausableUpgradeableUnpausedIterator{contract: _PausableUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _PausableUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUpgradeableUnpaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) ParseUnpaused(log types.Log) (*PausableUpgradeableUnpaused, error) { + event := new(PausableUpgradeableUnpaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/services/explorer/contracts/messaging/messaging.contractinfo.json b/services/explorer/contracts/messaging/messaging.contractinfo.json new file mode 100644 index 0000000000..e1ba98e512 --- /dev/null +++ b/services/explorer/contracts/messaging/messaging.contractinfo.json @@ -0,0 +1 @@ +{"/solidity/MessageBusUpgradeable_flat.sol:AddressUpgradeable":{"code":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2fac4daf10abfc9803be0dc26670a44125d423de53f7ee57599504b3d2eab3264736f6c63430008000033","runtime-code":"0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a2fac4daf10abfc9803be0dc26670a44125d423de53f7ee57599504b3d2eab3264736f6c63430008000033","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","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/MessageBusUpgradeable_flat.sol\":\"AddressUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{}},"/solidity/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"ContextChainIdUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{}},"/solidity/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"ContextUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{}},"/solidity/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"IAuthVerifier\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{"msgAuth(bytes)":"8b1b3a2d","setNodeGroup(address)":"f6ea2c90"}},"/solidity/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"IGasFeePricing\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{"estimateGasFee(uint256,bytes)":"47feadc1","setCostPerChain(uint256,uint256,uint256)":"e32192b7"}},"/solidity/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"ISynMessagingReceiver\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{"executeMessage(bytes32,uint256,bytes,address)":"a6060871"}},"/solidity/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"Initializable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{}},"/solidity/MessageBusUpgradeable_flat.sol:MessageBusReceiverUpgradeable":{"code":"0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220becd8008fcfb832f963ab01a90771904c20fcc674de64aeb66c33ac1da800e4564736f6c63430008000033","runtime-code":"0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220becd8008fcfb832f963ab01a90771904c20fcc674de64aeb66c33ac1da800e4564736f6c63430008000033","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","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/MessageBusUpgradeable_flat.sol\":\"MessageBusReceiverUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"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/MessageBusUpgradeable_flat.sol:MessageBusSenderUpgradeable":{"code":"0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212208c0c8bcc7444e376bd6c07755e51de24f3bca284000fbf139bb22b9a4602c42464736f6c63430008000033","runtime-code":"0x6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212208c0c8bcc7444e376bd6c07755e51de24f3bca284000fbf139bb22b9a4602c42464736f6c63430008000033","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","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/MessageBusUpgradeable_flat.sol\":\"MessageBusSenderUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"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/MessageBusUpgradeable_flat.sol:MessageBusUpgradeable":{"code":"0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea26469706673582212202449cd8c0d62d1579b3637b11026825317873b0bb5226ef8c5568dc2f0ca065264736f6c63430008000033","runtime-code":"0x6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea26469706673582212202449cd8c0d62d1579b3637b11026825317873b0bb5226ef8c5568dc2f0ca065264736f6c63430008000033","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","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/MessageBusUpgradeable_flat.sol\":\"MessageBusUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"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/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"OwnableUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{"owner()":"8da5cb5b","renounceOwnership()":"715018a6","transferOwnership(address)":"f2fde38b"}},"/solidity/MessageBusUpgradeable_flat.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","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/MessageBusUpgradeable_flat.sol\":\"PausableUpgradeable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/solidity/MessageBusUpgradeable_flat.sol\":{\"keccak256\":\"0x988315d8c8be3587ddf75691691e6ee60a32f4e3dbbda09c06432afc38a9bcf6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8a476d1ce8966e0883eb5f3e8fe8f1314cd254fd6023a6eb29b6880ae2318b92\",\"dweb:/ipfs/QmT96eerEz9XEbiXgqxD2NDfnSi3GhM93nwt7iq2DjZxiy\"]}},\"version\":1}"},"hashes":{"paused()":"5c975abb"}}} \ No newline at end of file diff --git a/services/explorer/contracts/messaging/messaging.metadata.go b/services/explorer/contracts/messaging/messaging.metadata.go new file mode 100644 index 0000000000..0d616e934f --- /dev/null +++ b/services/explorer/contracts/messaging/messaging.metadata.go @@ -0,0 +1,25 @@ +// Code generated by synapse abigen DO NOT EDIT. +package messaging + +import ( + _ "embed" + "encoding/json" + "github.com/ethereum/go-ethereum/common/compiler" +) + +// rawContracts are the json we use to dervive the processed contracts +// +//go:embed messaging.contractinfo.json +var rawContracts []byte + +// Contracts are unmarshalled on start +var Contracts map[string]*compiler.Contract + +func init() { + // load contract metadata + var err error + err = json.Unmarshal(rawContracts, &Contracts) + if err != nil { + panic(err) + } +} diff --git a/services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol b/services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol index eec824f3a0..34da06612f 100644 --- a/services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol +++ b/services/explorer/external/flattened-contracts/MessageBusUpgradeable_flat.sol @@ -8,36 +8,9 @@ pragma solidity ^0.8.0; -/** - * @dev Collection of functions related to the address type - */ + library AddressUpgradeable { - /** - * @dev Returns true if `account` is a contract. - * - * [IMPORTANT] - * ==== - * It is unsafe to assume that an address for which this function returns - * false is an externally-owned account (EOA) and not a contract. - * - * Among others, `isContract` will return false for the following - * types of addresses: - * - * - an externally-owned account - * - a contract in construction - * - an address where a contract will be created - * - an address where a contract lived, but was destroyed - * ==== - * - * [IMPORTANT] - * ==== - * You shouldn't rely on `isContract` to protect against flash loan attacks! - * - * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets - * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract - * constructor. - * ==== - */ + function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end @@ -46,22 +19,7 @@ library AddressUpgradeable { return account.code.length > 0; } - /** - * @dev Replacement for Solidity's `transfer`: sends `amount` wei to - * `recipient`, forwarding all available gas and reverting on errors. - * - * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost - * of certain opcodes, possibly making contracts go over the 2300 gas limit - * imposed by `transfer`, making them unable to receive funds via - * `transfer`. {sendValue} removes this limitation. - * - * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. - * - * IMPORTANT: because control is transferred to `recipient`, care must be - * taken to not create reentrancy vulnerabilities. Consider using - * {ReentrancyGuard} or the - * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. - */ + function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); @@ -69,34 +27,11 @@ library AddressUpgradeable { require(success, "Address: unable to send value, recipient may have reverted"); } - /** - * @dev Performs a Solidity function call using a low level `call`. A - * plain `call` is an unsafe replacement for a function call: use this - * function instead. - * - * If `target` reverts with a revert reason, it is bubbled up by this - * function (like regular Solidity function calls). - * - * Returns the raw returned data. To convert to the expected return value, - * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. - * - * Requirements: - * - * - `target` must be a contract. - * - calling `target` with `data` must not revert. - * - * _Available since v3.1._ - */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with - * `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ function functionCall( address target, bytes memory data, @@ -105,17 +40,7 @@ library AddressUpgradeable { return functionCallWithValue(target, data, 0, errorMessage); } - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but also transferring `value` wei to `target`. - * - * Requirements: - * - * - the calling contract must have an ETH balance of at least `value`. - * - the called Solidity function must be `payable`. - * - * _Available since v3.1._ - */ + function functionCallWithValue( address target, bytes memory data, @@ -124,12 +49,7 @@ library AddressUpgradeable { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } - /** - * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but - * with `errorMessage` as a fallback revert reason when `target` reverts. - * - * _Available since v3.1._ - */ + function functionCallWithValue( address target, bytes memory data, @@ -143,22 +63,12 @@ library AddressUpgradeable { return verifyCallResult(success, returndata, errorMessage); } - /** - * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } - /** - * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], - * but performing a static call. - * - * _Available since v3.3._ - */ + function functionStaticCall( address target, bytes memory data, @@ -170,12 +80,7 @@ library AddressUpgradeable { return verifyCallResult(success, returndata, errorMessage); } - /** - * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the - * revert reason using the provided one. - * - * _Available since v4.3._ - */ + function verifyCallResult( bool success, bytes memory returndata, @@ -199,48 +104,14 @@ library AddressUpgradeable { } } - -/** - * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed - * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an - * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer - * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. - * - * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as - * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. - * - * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure - * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. - * - * [CAUTION] - * ==== - * Avoid leaving a contract uninitialized. - * - * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation - * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the - * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: - * - * [.hljs-theme-light.nopadding] - * ``` - * /// @custom:oz-upgrades-unsafe-allow constructor - * constructor() initializer {} - * ``` - * ==== - */ abstract contract Initializable { - /** - * @dev Indicates that the contract has been initialized. - */ + bool private _initialized; - /** - * @dev Indicates that the contract is in the process of being initialized. - */ + bool private _initializing; - /** - * @dev Modifier to protect an initializer function from being invoked twice. - */ + modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the @@ -260,10 +131,7 @@ abstract contract Initializable { } } - /** - * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the - * {initializer} modifier, directly or indirectly. - */ + modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; @@ -291,16 +159,7 @@ abstract contract Initializable { -/** - * @dev Provides information about the current execution context, including the - * sender of the transaction and its data. While these are generally available - * via msg.sender and msg.data, they should not be accessed in such a direct - * manner, since when dealing with meta-transactions the account sending and - * paying for execution may not be the actual sender (as far as an application - * is concerned). - * - * This contract is only required for intermediate, library-like contracts. - */ + abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } @@ -315,36 +174,18 @@ abstract contract ContextUpgradeable is Initializable { return msg.data; } - /** - * This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + uint256[50] private __gap; } -/** - * @dev Contract module which provides a basic access control mechanism, where - * there is an account (an owner) that can be granted exclusive access to - * specific functions. - * - * By default, the owner account will be the one that deploys the contract. This - * can later be changed with {transferOwnership}. - * - * This module is used through inheritance. It will make available the modifier - * `onlyOwner`, which can be applied to your functions to restrict their use to - * the owner. - */ + abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); - /** - * @dev Initializes the contract setting the deployer as the initial owner. - */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } @@ -353,56 +194,36 @@ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { _transferOwnership(_msgSender()); } - /** - * @dev Returns the address of the current owner. - */ + function owner() public view virtual returns (address) { return _owner; } - /** - * @dev Throws if called by any account other than the owner. - */ + modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } - /** - * @dev Leaves the contract without owner. It will not be possible to call - * `onlyOwner` functions anymore. Can only be called by the current owner. - * - * NOTE: Renouncing ownership will leave the contract without an owner, - * thereby removing any functionality that is only available to the owner. - */ + function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`). - * Can only be called by the current owner. - */ + function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } - /** - * @dev Transfers ownership of the contract to a new account (`newOwner`). - * Internal function without access restriction. - */ + function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } - /** - * This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + uint256[49] private __gap; } @@ -414,31 +235,15 @@ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { -/** - * @dev Contract module which allows children to implement an emergency stop - * mechanism that can be triggered by an authorized account. - * - * This module is used through inheritance. It will make available the - * modifiers `whenNotPaused` and `whenPaused`, which can be applied to - * the functions of your contract. Note that they will not be pausable by - * simply including this module, only once the modifiers are put in place. - */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { - /** - * @dev Emitted when the pause is triggered by `account`. - */ + event Paused(address account); - /** - * @dev Emitted when the pause is lifted by `account`. - */ event Unpaused(address account); bool private _paused; - /** - * @dev Initializes the contract in unpaused state. - */ + function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } @@ -447,66 +252,35 @@ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { _paused = false; } - /** - * @dev Returns true if the contract is paused, and false otherwise. - */ + function paused() public view virtual returns (bool) { return _paused; } - /** - * @dev Modifier to make a function callable only when the contract is not paused. - * - * Requirements: - * - * - The contract must not be paused. - */ + modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } - /** - * @dev Modifier to make a function callable only when the contract is paused. - * - * Requirements: - * - * - The contract must be paused. - */ + modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } - /** - * @dev Triggers stopped state. - * - * Requirements: - * - * - The contract must not be paused. - */ + function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } - /** - * @dev Returns to normal state. - * - * Requirements: - * - * - The contract must be paused. - */ + function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } - /** - * This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ uint256[49] private __gap; } @@ -516,27 +290,14 @@ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { interface IGasFeePricing { - /** - * @notice Permissioned method to allow an off-chain party to set what each dstChain's - * gas cost is priced in the srcChain's native gas currency. - * Example: call on ETH, setCostPerChain(43114, 30000000000, 25180000000000000) - * chain ID 43114 - * Average of 30 gwei cost to transaction on 43114 - * AVAX/ETH = 0.02518, scaled to gas in wei = 25180000000000000 - * @param _dstChainId The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains - * @param _gasUnitPrice The estimated current gas price in wei of the destination chain - * @param _gasTokenPriceRatio Gas ratio of dstGasToken / srcGasToken - */ + function setCostPerChain( uint256 _dstChainId, uint256 _gasUnitPrice, uint256 _gasTokenPriceRatio ) external; - /** - * @notice Returns srcGasToken fee to charge in wei for the cross-chain message based on the gas limit - * @param _options Versioned struct used to instruct relayer on how to proceed with gas limits. Contains data on gas limit to submit tx with. - */ + function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256); } @@ -555,11 +316,7 @@ abstract contract ContextChainIdUpgradeable is Initializable { return block.chainid; } - /** - * This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + uint256[50] private __gap; } @@ -608,15 +365,6 @@ contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, return fee; } - /** - * @notice Sends a message to a receiving contract address on another chain. - * Sender must make sure that the message is unique and not a duplicate message. - * Unspent gas fees would be transferred back to tx.origin. - * @param _receiver The bytes32 address of the destination contract to be called - * @param _dstChainId The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains - * @param _message The arbitrary payload to pass to the destination chain receiver - * @param _options Versioned struct used to instruct relayer on how to proceed with gas limits - */ function sendMessage( bytes32 _receiver, uint256 _dstChainId, @@ -629,16 +377,6 @@ contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin)); } - /** - * @notice Sends a message to a receiving contract address on another chain. - * Sender must make sure that the message is unique and not a duplicate message. - * Unspent gas fees will be refunded to specified address. - * @param _receiver The bytes32 address of the destination contract to be called - * @param _dstChainId The destination chain ID - typically, standard EVM chain ID, but differs on nonEVM chains - * @param _message The arbitrary payload to pass to the destination chain receiver - * @param _options Versioned struct used to instruct relayer on how to proceed with gas limits - * @param _refundAddress Address that will receive unspent gas fees - */ function sendMessage( bytes32 _receiver, uint256 _dstChainId, @@ -670,10 +408,7 @@ contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, } } - /** - * @notice Withdraws accumulated fees in native gas token, based on fees variable. - * @param to Address to withdraw gas fees to, which can be specified in the event owner() can't receive native gas - */ + function withdrawGasFees(address payable to) external onlyOwner { uint256 withdrawAmount = fees; // Reset fees to 0 @@ -681,10 +416,7 @@ contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, delete fees; } - /** - * @notice Rescues any gas in contract, aside from fees - * @param to Address to which to rescue gas to - */ + function rescueGas(address payable to) external onlyOwner { uint256 withdrawAmount = address(this).balance - fees; to.transfer(withdrawAmount); @@ -695,11 +427,7 @@ contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, gasFeePricing = _gasFeePricing; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ + uint256[47] private __gap; } @@ -715,17 +443,10 @@ contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, interface IAuthVerifier { - /** - * @notice Authentication library to allow the validator network to execute cross-chain messages. - * @param _authData A bytes32 address encoded via abi.encode(address) - * @return authenticated returns true if bytes data submitted and decoded to the address is correct - */ + function msgAuth(bytes calldata _authData) external view returns (bool authenticated); - /** - * @notice Permissioned method to support upgrades to the library - * @param _nodegroup address which has authentication to execute messages - */ + function setNodeGroup(address _nodegroup) external; } @@ -737,14 +458,7 @@ interface ISynMessagingReceiver { // Maps chain ID to the bytes32 trusted addresses allowed to be source senders // mapping(uint256 => bytes32) internal trustedRemoteLookup; - /** - * @notice Called by MessageBus - * @dev MUST be permissioned to trusted source apps via trustedRemote - * @param _srcAddress The bytes32 address of the source app contract - * @param _srcChainId The source chain ID where the transfer is originated from - * @param _message Arbitrary message bytes originated from and encoded by the source app contract - * @param _executor Address who called the MessageBus execution function - */ + function executeMessage( bytes32 _srcAddress, uint256 _srcChainId, @@ -790,15 +504,7 @@ contract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeabl return executedMessages[_messageId]; } - /** - * @notice Relayer executes messages through an authenticated method to the destination receiver - based on the originating transaction on source chain - * @param _srcChainId Originating chain ID - typically a standard EVM chain ID, but may refer to a Synapse-specific chain ID on nonEVM chains - * @param _srcAddress Originating bytes32 address of the message sender on the srcChain - * @param _dstAddress Destination address that the arbitrary message will be passed to - * @param _gasLimit Gas limit to be passed alongside the message, depending on the fee paid on srcChain - * @param _message Arbitrary message payload to pass to the destination chain receiver - */ + function executeMessage( uint256 _srcChainId, bytes32 _srcAddress, @@ -835,7 +541,7 @@ contract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeabl emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce)); } - /** HELPER VIEW FUNCTION */ + // https://ethereum.stackexchange.com/a/83577 // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { @@ -849,7 +555,7 @@ contract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeabl return abi.decode(_returnData, (string)); // All that remains is the revert string } - /** CONTRACT CONFIG */ + function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner { executedMessages[_messageId] = _status; @@ -860,11 +566,6 @@ contract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeabl authVerifier = _authVerifier; } - /** - * @dev This empty reserved space is put in place to allow future versions to add new - * variables without shifting down storage in the inheritance chain. - * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps - */ uint256[48] private __gap; } diff --git a/services/explorer/go.mod b/services/explorer/go.mod index 42a6985212..b5e86b49a8 100644 --- a/services/explorer/go.mod +++ b/services/explorer/go.mod @@ -75,6 +75,7 @@ require ( github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect + github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/disintegration/imaging v1.6.2 // indirect github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 // indirect github.com/docker/cli v20.10.14+incompatible // indirect @@ -89,6 +90,7 @@ require ( github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect github.com/flynn/json5 v0.0.0-20160717195620-7620272ed633 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect + github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-faster/city v1.0.1 // indirect github.com/go-faster/errors v0.6.1 // indirect @@ -119,6 +121,7 @@ require ( github.com/gorilla/websocket v1.5.0 // indirect github.com/gosimple/slug v1.1.1 // indirect github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc // indirect + github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect @@ -131,6 +134,9 @@ require ( github.com/huin/goupnp v1.0.3 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/influxdata/influxdb v1.8.3 // indirect + github.com/influxdata/influxdb-client-go/v2 v2.5.1 // indirect + github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097 // indirect github.com/ipfs/go-log/v2 v2.1.3 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect @@ -175,6 +181,7 @@ require ( github.com/paulmach/orb v0.7.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.2 // indirect + github.com/peterh/liner v1.2.1 // indirect github.com/pierrec/lz4/v4 v4.1.15 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pkg/term v1.2.0-beta.2 // indirect @@ -203,6 +210,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.12.0 // indirect + github.com/status-im/keycard-go v0.0.0-20191119114148-6dd40a46baa0 // indirect github.com/stretchr/objx v0.4.0 // indirect github.com/subosito/gotenv v1.4.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect @@ -210,6 +218,7 @@ require ( github.com/tenderly/tenderly-cli v1.4.6 // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect + github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/ugorji/go/codec v1.2.7 // indirect github.com/xanzy/ssh-agent v0.3.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect diff --git a/services/explorer/go.sum b/services/explorer/go.sum index 7e5b7033ef..fd7eabd3c2 100644 --- a/services/explorer/go.sum +++ b/services/explorer/go.sum @@ -563,6 +563,7 @@ github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc/go.mod h1:AHHlOE github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= @@ -633,6 +634,7 @@ github.com/influxdata/influxdb v1.8.3 h1:WEypI1BQFTT4teLM+1qkEcvUi0dAvopAI/ir0vA github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb-client-go/v2 v2.5.1 h1:ytMbX2YeupSsec1Exp3zALTjvfhXkvxcyV6nOXkjG3s= +github.com/influxdata/influxdb-client-go/v2 v2.5.1/go.mod h1:Y/0W1+TZir7ypoQZYd2IrnVOKB3Tq6oegAQeSVN/+EU= github.com/influxdata/influxdb1-client v0.0.0-20190809212627-fc22c7df067e/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= @@ -905,6 +907,7 @@ github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuw github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/peterh/liner v1.2.1 h1:O4BlKaq/LWu6VRWmol4ByWfzx6MfXc5Op5HETyIy5yg= +github.com/peterh/liner v1.2.1/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= @@ -1101,6 +1104,7 @@ github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqri github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= From 1f86d178d816eb12d262a646bcdcd744c9f69473 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 13 Oct 2022 23:08:05 -0400 Subject: [PATCH 03/10] test infra --- .../{messaging => message}/generate.go | 6 ++--- .../{messaging => message}/helpers.go | 16 +++++++------- .../message.abigen.go} | 2 +- .../message.contractinfo.json} | 0 .../message.metadata.go} | 4 ++-- services/explorer/testutil/contracttype.go | 5 ++++- .../testutil/contracttypeimpl_string.go | 5 +++-- services/explorer/testutil/deployers.go | 22 +++++++++++++++++++ services/explorer/testutil/manager.go | 2 +- services/explorer/testutil/typecast.go | 13 +++++++++++ services/explorer/testutil/typecast_test.go | 2 ++ 11 files changed, 59 insertions(+), 18 deletions(-) rename services/explorer/contracts/{messaging => message}/generate.go (52%) rename services/explorer/contracts/{messaging => message}/helpers.go (52%) rename services/explorer/contracts/{messaging/messaging.abigen.go => message/message.abigen.go} (99%) rename services/explorer/contracts/{messaging/messaging.contractinfo.json => message/message.contractinfo.json} (100%) rename services/explorer/contracts/{messaging/messaging.metadata.go => message/message.metadata.go} (89%) diff --git a/services/explorer/contracts/messaging/generate.go b/services/explorer/contracts/message/generate.go similarity index 52% rename from services/explorer/contracts/messaging/generate.go rename to services/explorer/contracts/message/generate.go index f99de17b4d..4c6250f5a4 100644 --- a/services/explorer/contracts/messaging/generate.go +++ b/services/explorer/contracts/message/generate.go @@ -1,6 +1,6 @@ -// Package messaging Go interface for synapse-contracts/.../MessageBusUpgradeable.sol -package messaging +// Package message Go interface for synapse-contracts/.../MessageBusUpgradeable.sol +package message -//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../external/flattened-contracts/MessageBusUpgradeable_flat.sol --pkg messaging --sol-version 0.8.0 --filename messaging +//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ../../external/flattened-contracts/MessageBusUpgradeable_flat.sol --pkg message --sol-version 0.8.0 --filename message // ignore this line: go:generate cannot be the last line of a file diff --git a/services/explorer/contracts/messaging/helpers.go b/services/explorer/contracts/message/helpers.go similarity index 52% rename from services/explorer/contracts/messaging/helpers.go rename to services/explorer/contracts/message/helpers.go index df0f3ac992..31e08f1bc1 100644 --- a/services/explorer/contracts/messaging/helpers.go +++ b/services/explorer/contracts/message/helpers.go @@ -1,4 +1,4 @@ -package messaging +package message import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" @@ -6,29 +6,29 @@ import ( "github.com/ethereum/go-ethereum/core/vm" ) -// MessagingRef isa bound Message Bus Upgradeable contract and the address of the contract +// MessageRef isa bound Message Bus Upgradeable contract and the address of the contract // nolint: golint -type MessagingRef struct { +type MessageRef struct { *MessageBusUpgradeable address common.Address } // Address is the contract address. -func (s MessagingRef) Address() common.Address { +func (s MessageRef) Address() common.Address { return s.address } -// NewMessagingRef gets a bound Message Bus Upgradeable contract and the address of the contract +// NewMessageRef gets a bound Message Bus Upgradeable contract and the address of the contract // nolint: golint -func NewMessagingRef(address common.Address, backend bind.ContractBackend) (*MessagingRef, error) { +func NewMessageRef(address common.Address, backend bind.ContractBackend) (*MessageRef, error) { messageBusUpgradeable, err := NewMessageBusUpgradeable(address, backend) if err != nil { return nil, err } - return &MessagingRef{ + return &MessageRef{ MessageBusUpgradeable: messageBusUpgradeable, address: address, }, nil } -var _ vm.ContractRef = &MessagingRef{} +var _ vm.ContractRef = &MessageRef{} diff --git a/services/explorer/contracts/messaging/messaging.abigen.go b/services/explorer/contracts/message/message.abigen.go similarity index 99% rename from services/explorer/contracts/messaging/messaging.abigen.go rename to services/explorer/contracts/message/message.abigen.go index 3d87c93f5c..2f1c49085b 100644 --- a/services/explorer/contracts/messaging/messaging.abigen.go +++ b/services/explorer/contracts/message/message.abigen.go @@ -1,7 +1,7 @@ // Code generated - DO NOT EDIT. // This file is a generated binding and any manual changes will be lost. -package messaging +package message import ( "errors" diff --git a/services/explorer/contracts/messaging/messaging.contractinfo.json b/services/explorer/contracts/message/message.contractinfo.json similarity index 100% rename from services/explorer/contracts/messaging/messaging.contractinfo.json rename to services/explorer/contracts/message/message.contractinfo.json diff --git a/services/explorer/contracts/messaging/messaging.metadata.go b/services/explorer/contracts/message/message.metadata.go similarity index 89% rename from services/explorer/contracts/messaging/messaging.metadata.go rename to services/explorer/contracts/message/message.metadata.go index 0d616e934f..efb03762e8 100644 --- a/services/explorer/contracts/messaging/messaging.metadata.go +++ b/services/explorer/contracts/message/message.metadata.go @@ -1,5 +1,5 @@ // Code generated by synapse abigen DO NOT EDIT. -package messaging +package message import ( _ "embed" @@ -9,7 +9,7 @@ import ( // rawContracts are the json we use to dervive the processed contracts // -//go:embed messaging.contractinfo.json +//go:embed message.contractinfo.json var rawContracts []byte // Contracts are unmarshalled on start diff --git a/services/explorer/testutil/contracttype.go b/services/explorer/testutil/contracttype.go index efa799ddd3..84503172ea 100644 --- a/services/explorer/testutil/contracttype.go +++ b/services/explorer/testutil/contracttype.go @@ -42,6 +42,8 @@ const ( SynapseBridgeType contractTypeImpl = 1 // SwapFlashLoanType is the swap contract type. SwapFlashLoanType contractTypeImpl = 2 + // MessageBusUpgradableType is the messaging contract type. + MessageBusUpgradableType contractTypeImpl = 3 ) // ID gets the contract type as an id. @@ -68,7 +70,8 @@ func (c contractTypeImpl) ContractInfo() *compiler.Contract { return bridge.Contracts["/solidity/SynapseBridgeV1_flat.sol:SynapseBridge"] case SwapFlashLoanType: return swap.Contracts["/solidity/SwapFlashLoanV1_flat.sol:SwapFlashLoan"] - + case MessageBusUpgradableType: + return swap.Contracts["/solidity/MessageBusUpgradeable_flat.sol:MessageBusUpgradeable"] default: panic("not yet implemented") } diff --git a/services/explorer/testutil/contracttypeimpl_string.go b/services/explorer/testutil/contracttypeimpl_string.go index 5c099c6e8d..ae8e7d0294 100644 --- a/services/explorer/testutil/contracttypeimpl_string.go +++ b/services/explorer/testutil/contracttypeimpl_string.go @@ -11,11 +11,12 @@ func _() { _ = x[BridgeConfigTypeV3-0] _ = x[SynapseBridgeType-1] _ = x[SwapFlashLoanType-2] + _ = x[MessageBusUpgradableType-3] } -const _contractTypeImpl_name = "BridgeConfigTypeV3SynapseBridgeTypeSwapFlashLoanType" +const _contractTypeImpl_name = "BridgeConfigTypeV3SynapseBridgeTypeSwapFlashLoanTypeMessageBusUpgradableType" -var _contractTypeImpl_index = [...]uint8{0, 18, 35, 52} +var _contractTypeImpl_index = [...]uint8{0, 18, 35, 52, 76} func (i contractTypeImpl) String() string { if i < 0 || i >= contractTypeImpl(len(_contractTypeImpl_index)-1) { diff --git a/services/explorer/testutil/deployers.go b/services/explorer/testutil/deployers.go index 4755de7343..125f31f6e3 100644 --- a/services/explorer/testutil/deployers.go +++ b/services/explorer/testutil/deployers.go @@ -11,6 +11,7 @@ import ( "github.com/synapsecns/sanguine/ethergo/deployer" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge" "github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig" + "github.com/synapsecns/sanguine/services/explorer/contracts/message" "github.com/synapsecns/sanguine/services/explorer/contracts/swap" ) @@ -29,6 +30,11 @@ type SwapFlashLoanDeployer struct { *deployer.BaseDeployer } +// MessageBusUpgradableDeployer is the type of the Message Bus deployer. +type MessageBusUpgradableDeployer struct { + *deployer.BaseDeployer +} + // NewBridgeConfigV3Deployer creates a new bridge config v2 client. func NewBridgeConfigV3Deployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer { return BridgeConfigV3Deployer{deployer.NewSimpleDeployer(registry, backend, BridgeConfigTypeV3)} @@ -44,6 +50,11 @@ func NewSwapFlashLoanDeployer(registry deployer.GetOnlyContractRegistry, backend return SwapFlashLoanDeployer{deployer.NewSimpleDeployer(registry, backend, SwapFlashLoanType)} } +// NewMessageBusUpgradableDeployer creates a new message bus upgradable client. +func NewMessageBusUpgradableDeployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer { + return MessageBusUpgradableDeployer{deployer.NewSimpleDeployer(registry, backend, MessageBusUpgradableType)} +} + // Deploy deploys bridge config v3 // nolint: dupl func (n BridgeConfigV3Deployer) Deploy(ctx context.Context) (contracts.DeployedContract, error) { @@ -98,6 +109,17 @@ func (n SwapFlashLoanDeployer) Deploy(ctx context.Context) (contracts.DeployedCo }) } +// Deploy deploys Message Bus Upgradable +// nolint: dupl +func (n MessageBusUpgradableDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error) { + return n.DeploySimpleContract(ctx, func(transactOps *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, interface{}, error) { + return message.DeployMessageBusUpgradeable(transactOps, backend) + }, func(address common.Address, backend bind.ContractBackend) (interface{}, error) { + return message.NewMessageRef(address, backend) + }) +} + var _ deployer.ContractDeployer = &BridgeConfigV3Deployer{} var _ deployer.ContractDeployer = &SynapseBridgeDeployer{} var _ deployer.ContractDeployer = &SwapFlashLoanDeployer{} +var _ deployer.ContractDeployer = &MessageBusUpgradableDeployer{} diff --git a/services/explorer/testutil/manager.go b/services/explorer/testutil/manager.go index b5dd48e153..01cc65dad2 100644 --- a/services/explorer/testutil/manager.go +++ b/services/explorer/testutil/manager.go @@ -9,7 +9,7 @@ import ( func NewDeployManager(t *testing.T) *DeployManager { t.Helper() - parentManager := manager.NewDeployerManager(t, NewBridgeConfigV3Deployer, NewSynapseBridgeDeployer, NewSwapFlashLoanDeployer) + parentManager := manager.NewDeployerManager(t, NewBridgeConfigV3Deployer, NewSynapseBridgeDeployer, NewSwapFlashLoanDeployer, NewMessageBusUpgradableDeployer) return &DeployManager{parentManager} } diff --git a/services/explorer/testutil/typecast.go b/services/explorer/testutil/typecast.go index 06783c0868..23a58b42c6 100644 --- a/services/explorer/testutil/typecast.go +++ b/services/explorer/testutil/typecast.go @@ -7,6 +7,7 @@ import ( "github.com/synapsecns/sanguine/ethergo/contracts" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge" "github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig" + "github.com/synapsecns/sanguine/services/explorer/contracts/message" "github.com/synapsecns/sanguine/services/explorer/contracts/swap" ) @@ -45,3 +46,15 @@ func (d *DeployManager) GetSwapFlashLoan(ctx context.Context, backend backends.S return swapContract, swapHandle } + +// GetMessageBusUpgradable gets a typecast swap contract. +func (d *DeployManager) GetMessageBusUpgradable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *message.MessageRef) { + d.T().Helper() + + messageContract := d.GetContractRegistry(backend).Get(ctx, MessageBusUpgradableType) + + messageHandle, ok := messageContract.ContractHandle().(*message.MessageRef) + assert.True(d.T(), ok) + + return messageContract, messageHandle +} diff --git a/services/explorer/testutil/typecast_test.go b/services/explorer/testutil/typecast_test.go index 0c36832faf..3c5d017cee 100644 --- a/services/explorer/testutil/typecast_test.go +++ b/services/explorer/testutil/typecast_test.go @@ -11,5 +11,7 @@ func (s SimulatedSuite) TestTypecast() { NotNil(s.T(), bridgeHandle) _, swapHandle := s.deployManager.GetSwapFlashLoan(s.GetTestContext(), s.testBackend) NotNil(s.T(), swapHandle) + _, messageHandle := s.deployManager.GetMessageBusUpgradable(s.GetTestContext(), s.testBackend) + NotNil(s.T(), messageHandle) }) } From 6543509b38081beb6401f429de9a953596f5ea2c Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Oct 2022 00:53:43 -0400 Subject: [PATCH 04/10] test contracts + event types --- .../explorer/contracts/message/helpers.go | 2 +- .../contract/TestMessageBusUpgradeable.sol | 638 ++ .../contracts/message/testmessage/doc.go | 2 + .../contracts/message/testmessage/generate.go | 4 + .../contracts/message/testmessage/helpers.go | 34 + .../message/testmessage/testmessage.abigen.go | 7659 +++++++++++++++++ .../testmessage/testmessage.contractinfo.json | 1 + .../testmessage/testmessage.metadata.go | 25 + services/explorer/testutil/contract_test.go | 3 + services/explorer/testutil/contracttype.go | 11 +- .../testutil/contracttypeimpl_string.go | 6 +- services/explorer/testutil/deployers.go | 14 +- services/explorer/testutil/manager.go | 2 +- services/explorer/testutil/typecast.go | 6 +- services/explorer/testutil/typecast_test.go | 2 +- services/explorer/types/message/doc.go | 2 + services/explorer/types/message/event.go | 49 + services/explorer/types/message/eventtype.go | 23 + .../types/message/eventtype_string.go | 24 + 19 files changed, 8487 insertions(+), 20 deletions(-) create mode 100644 services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol create mode 100644 services/explorer/contracts/message/testmessage/doc.go create mode 100644 services/explorer/contracts/message/testmessage/generate.go create mode 100644 services/explorer/contracts/message/testmessage/helpers.go create mode 100644 services/explorer/contracts/message/testmessage/testmessage.abigen.go create mode 100644 services/explorer/contracts/message/testmessage/testmessage.contractinfo.json create mode 100644 services/explorer/contracts/message/testmessage/testmessage.metadata.go create mode 100644 services/explorer/types/message/doc.go create mode 100644 services/explorer/types/message/event.go create mode 100644 services/explorer/types/message/eventtype.go create mode 100644 services/explorer/types/message/eventtype_string.go diff --git a/services/explorer/contracts/message/helpers.go b/services/explorer/contracts/message/helpers.go index 31e08f1bc1..88b7430eef 100644 --- a/services/explorer/contracts/message/helpers.go +++ b/services/explorer/contracts/message/helpers.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/core/vm" ) -// MessageRef isa bound Message Bus Upgradeable contract and the address of the contract +// MessageRef is a bound Message Bus Upgradeable contract and the address of the contract // nolint: golint type MessageRef struct { *MessageBusUpgradeable diff --git a/services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol b/services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol new file mode 100644 index 0000000000..2ef4a44242 --- /dev/null +++ b/services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol @@ -0,0 +1,638 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) + +pragma solidity ^0.8.0; + + +// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) + + + + +library AddressUpgradeable { + + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize/address.code.length, which returns 0 + // for contracts in construction, since the code is only stored at the end + // of the constructor execution. + + return account.code.length > 0; + } + + + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + (bool success, ) = recipient.call{value: amount}(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + function functionCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + + function functionCallWithValue( + address target, + bytes memory data, + uint256 value + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + + function functionCallWithValue( + address target, + bytes memory data, + uint256 value, + string memory errorMessage + ) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + require(isContract(target), "Address: call to non-contract"); + + (bool success, bytes memory returndata) = target.call{value: value}(data); + return verifyCallResult(success, returndata, errorMessage); + } + + + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + + function functionStaticCall( + address target, + bytes memory data, + string memory errorMessage + ) internal view returns (bytes memory) { + require(isContract(target), "Address: static call to non-contract"); + + (bool success, bytes memory returndata) = target.staticcall(data); + return verifyCallResult(success, returndata, errorMessage); + } + + + function verifyCallResult( + bool success, + bytes memory returndata, + string memory errorMessage + ) internal pure returns (bytes memory) { + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} + +abstract contract Initializable { + + bool private _initialized; + + + bool private _initializing; + + + modifier initializer() { + // If the contract is initializing we ignore whether _initialized is set in order to support multiple + // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the + // contract may have been reentered. + require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); + + bool isTopLevelCall = !_initializing; + if (isTopLevelCall) { + _initializing = true; + _initialized = true; + } + + _; + + if (isTopLevelCall) { + _initializing = false; + } + } + + + modifier onlyInitializing() { + require(_initializing, "Initializable: contract is not initializing"); + _; + } + + function _isConstructor() private view returns (bool) { + return !AddressUpgradeable.isContract(address(this)); + } +} + + + + + + + + +// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) + + + + +// OpenZeppelin Contracts v4.4.1 (utils/Context.sol) + + + + + +abstract contract ContextUpgradeable is Initializable { + function __Context_init() internal onlyInitializing { + } + + function __Context_init_unchained() internal onlyInitializing { + } + function _msgSender() internal view virtual returns (address) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes calldata) { + return msg.data; + } + + + uint256[50] private __gap; +} + + + + +abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + function __Ownable_init() internal onlyInitializing { + __Ownable_init_unchained(); + } + + function __Ownable_init_unchained() internal onlyInitializing { + _transferOwnership(_msgSender()); + } + + + function owner() public view virtual returns (address) { + return _owner; + } + + + modifier onlyOwner() { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + _; + } + + + function renounceOwnership() public virtual onlyOwner { + _transferOwnership(address(0)); + } + + + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + _transferOwnership(newOwner); + } + + + function _transferOwnership(address newOwner) internal virtual { + address oldOwner = _owner; + _owner = newOwner; + emit OwnershipTransferred(oldOwner, newOwner); + } + + + uint256[49] private __gap; +} + + +// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) + + + + + + +abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { + + event Paused(address account); + + event Unpaused(address account); + + bool private _paused; + + + function __Pausable_init() internal onlyInitializing { + __Pausable_init_unchained(); + } + + function __Pausable_init_unchained() internal onlyInitializing { + _paused = false; + } + + + function paused() public view virtual returns (bool) { + return _paused; + } + + + modifier whenNotPaused() { + require(!paused(), "Pausable: paused"); + _; + } + + + modifier whenPaused() { + require(paused(), "Pausable: not paused"); + _; + } + + + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } + + uint256[49] private __gap; +} + + + + + + +interface IGasFeePricing { + + function setCostPerChain( + uint256 _dstChainId, + uint256 _gasUnitPrice, + uint256 _gasTokenPriceRatio + ) external; + + + function estimateGasFee(uint256 _dstChainId, bytes calldata _options) external returns (uint256); +} + + + + + + + +abstract contract ContextChainIdUpgradeable is Initializable { + function __ContextChainId_init() internal onlyInitializing {} + + function __ContextChainId_init_unchained() internal onlyInitializing {} + + function _chainId() internal view virtual returns (uint256) { + return block.chainid; + } + + + uint256[50] private __gap; +} + + +contract MessageBusSenderUpgradeable is OwnableUpgradeable, PausableUpgradeable, ContextChainIdUpgradeable { + address public gasFeePricing; + uint64 public nonce; + uint256 public fees; + + function __MessageBusSender_init(address _gasFeePricing) internal onlyInitializing { + __Ownable_init_unchained(); + __Pausable_init_unchained(); + __MessageBusSender_init_unchained(_gasFeePricing); + } + + function __MessageBusSender_init_unchained(address _gasFeePricing) internal onlyInitializing { + gasFeePricing = _gasFeePricing; + } + + event MessageSent( + address indexed sender, + uint256 srcChainID, + bytes32 receiver, + uint256 indexed dstChainId, + bytes message, + uint64 nonce, + bytes options, + uint256 fee, + bytes32 indexed messageId + ); + + function computeMessageId( + address _srcAddress, + uint256 _srcChainId, + bytes32 _dstAddress, + uint256 _dstChainId, + uint256 _srcNonce, + bytes calldata _message + ) public pure returns (bytes32) { + return keccak256(abi.encode(_srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message)); + } + + function estimateFee(uint256 _dstChainId, bytes calldata _options) public returns (uint256) { + uint256 fee = IGasFeePricing(gasFeePricing).estimateGasFee(_dstChainId, _options); + require(fee != 0, "Fee not set"); + return fee; + } + + function sendMessage( + bytes32 _receiver, + uint256 _dstChainId, + bytes calldata _message, + bytes calldata _options + ) external payable whenNotPaused { + // use tx.origin for gas refund by default, so that older contracts, + // interacting with MessageBus that don't have a fallback/receive + // (i.e. not able to receive gas), will continue to work + _sendMessage(_receiver, _dstChainId, _message, _options, payable(tx.origin)); + } + + function sendMessage( + bytes32 _receiver, + uint256 _dstChainId, + bytes calldata _message, + bytes calldata _options, + address payable _refundAddress + ) external payable { + _sendMessage(_receiver, _dstChainId, _message, _options, _refundAddress); + } + + function _sendMessage( + bytes32 _receiver, + uint256 _dstChainId, + bytes calldata _message, + bytes calldata _options, + address payable _refundAddress + ) internal { + uint256 srcChainId = _chainId(); + require(_dstChainId != srcChainId, "Invalid chainId"); + uint256 fee = estimateFee(_dstChainId, _options); + require(msg.value >= fee, "Insufficient gas fee"); + bytes32 msgId = computeMessageId(msg.sender, srcChainId, _receiver, _dstChainId, nonce, _message); + emit MessageSent(msg.sender, srcChainId, _receiver, _dstChainId, _message, nonce, _options, fee, msgId); + fees += fee; + ++nonce; + // refund gas fees in case of overpayment + if (msg.value > fee) { + _refundAddress.transfer(msg.value - fee); + } + } + + + function withdrawGasFees(address payable to) external onlyOwner { + uint256 withdrawAmount = fees; + // Reset fees to 0 + to.transfer(withdrawAmount); + delete fees; + } + + + function rescueGas(address payable to) external onlyOwner { + uint256 withdrawAmount = address(this).balance - fees; + to.transfer(withdrawAmount); + } + + function updateGasFeePricing(address _gasFeePricing) external onlyOwner { + require(_gasFeePricing != address(0), "Cannot set to 0"); + gasFeePricing = _gasFeePricing; + } + + + uint256[47] private __gap; +} + + + + + + + + + + + + +interface IAuthVerifier { + + function msgAuth(bytes calldata _authData) external view returns (bool authenticated); + + + function setNodeGroup(address _nodegroup) external; +} + + + + + +interface ISynMessagingReceiver { + // Maps chain ID to the bytes32 trusted addresses allowed to be source senders + // mapping(uint256 => bytes32) internal trustedRemoteLookup; + + + function executeMessage( + bytes32 _srcAddress, + uint256 _srcChainId, + bytes calldata _message, + address _executor + ) external; +} + + +contract MessageBusReceiverUpgradeable is OwnableUpgradeable, PausableUpgradeable { + enum TxStatus { + Null, + Success, + Fail + } + + // TODO: Rename to follow one standard convention -> Send -> Receive? + event Executed( + bytes32 indexed messageId, + TxStatus status, + address indexed _dstAddress, + uint64 srcChainId, + uint64 srcNonce + ); + event CallReverted(string reason); + + address public authVerifier; + + // Store all successfully executed messages + mapping(bytes32 => TxStatus) internal executedMessages; + + function __MessageBusReceiver_init(address _authVerifier) internal { + __Ownable_init_unchained(); + __Pausable_init_unchained(); + __MessageBusReceiver_init_unchained(_authVerifier); + } + + function __MessageBusReceiver_init_unchained(address _authVerifier) internal { + authVerifier = _authVerifier; + } + + function getExecutedMessage(bytes32 _messageId) external view returns (TxStatus) { + return executedMessages[_messageId]; + } + + + function executeMessage( + uint256 _srcChainId, + bytes32 _srcAddress, + address _dstAddress, + uint256 _gasLimit, + uint256 _nonce, + bytes calldata _message, + bytes32 _messageId + ) external whenNotPaused { + // In order to guarantee that an individual message is only executed once, a messageId is passed + // enforce that this message ID hasn't already been tried ever + require(executedMessages[_messageId] == TxStatus.Null, "Message already executed"); + // Authenticate executeMessage, will revert if not authenticated + IAuthVerifier(authVerifier).msgAuth(abi.encode(msg.sender)); + + TxStatus status; + try + ISynMessagingReceiver(_dstAddress).executeMessage{gas: _gasLimit}( + _srcAddress, + _srcChainId, + _message, + msg.sender + ) + { + // Assuming success state if no revert + status = TxStatus.Success; + } catch (bytes memory reason) { + // call hard reverted & failed + emit CallReverted(_getRevertMsg(reason)); + status = TxStatus.Fail; + } + + executedMessages[_messageId] = status; + emit Executed(_messageId, status, _dstAddress, uint64(_srcChainId), uint64(_nonce)); + } + + + // https://ethereum.stackexchange.com/a/83577 + // https://github.com/Uniswap/v3-periphery/blob/v1.0.0/contracts/base/Multicall.sol + function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { + // If the _res length is less than 68, then the transaction failed silently (without a revert message) + if (_returnData.length < 68) return "Transaction reverted silently"; + // solhint-disable-next-line + assembly { + // Slice the sighash. + _returnData := add(_returnData, 0x04) + } + return abi.decode(_returnData, (string)); // All that remains is the revert string + } + + + + function updateMessageStatus(bytes32 _messageId, TxStatus _status) external onlyOwner { + executedMessages[_messageId] = _status; + } + + function updateAuthVerifier(address _authVerifier) external onlyOwner { + require(_authVerifier != address(0), "Cannot set to 0"); + authVerifier = _authVerifier; + } + + uint256[48] private __gap; +} + + +contract MessageBusUpgradeable is MessageBusSenderUpgradeable, MessageBusReceiverUpgradeable { + function initialize(address _gasFeePricing, address _authVerifier) external initializer { + __Ownable_init_unchained(); + __Pausable_init_unchained(); + __MessageBusSender_init_unchained(_gasFeePricing); + __MessageBusReceiver_init_unchained(_authVerifier); + } + + // PAUSABLE FUNCTIONS ***/ + function pause() external onlyOwner { + _pause(); + } + + function unpause() external onlyOwner { + _unpause(); + } +} + + + + + +contract TestMessageBusUpgradeable is MessageBusUpgradeable { + + function testExecuted( + bytes32 messageId, + TxStatus status, + address _dstAddress, + uint64 srcChainId, + uint64 srcNonce + ) external { + emit Executed( + messageId, + status, + _dstAddress, + srcChainId, + srcNonce + ); + } + function testMessageSent( + address sender, + uint256 srcChainID, + bytes32 receiver, + uint256 dstChainId, + bytes calldata message, + uint64 nonce, + bytes calldata options, + uint256 fee, + bytes32 messageId + ) external { + emit MessageSent( + sender, + srcChainID, + receiver, + dstChainId, + message, + nonce, + options, + fee, + messageId + ); + } +} + + + diff --git a/services/explorer/contracts/message/testmessage/doc.go b/services/explorer/contracts/message/testmessage/doc.go new file mode 100644 index 0000000000..f682a2976c --- /dev/null +++ b/services/explorer/contracts/message/testmessage/doc.go @@ -0,0 +1,2 @@ +// Package testmessage Go interface for synapse-contracts/.../TestMessage.sol +package testmessage diff --git a/services/explorer/contracts/message/testmessage/generate.go b/services/explorer/contracts/message/testmessage/generate.go new file mode 100644 index 0000000000..6f20664ff1 --- /dev/null +++ b/services/explorer/contracts/message/testmessage/generate.go @@ -0,0 +1,4 @@ +package testmessage + +//go:generate go run github.com/synapsecns/sanguine/tools/abigen generate --sol ./contract/TestMessageBusUpgradeable.sol --pkg testmessage --sol-version 0.8.0 --filename testmessage +// ignore this line: go:generate cannot be the last line of a file diff --git a/services/explorer/contracts/message/testmessage/helpers.go b/services/explorer/contracts/message/testmessage/helpers.go new file mode 100644 index 0000000000..bdf9dca694 --- /dev/null +++ b/services/explorer/contracts/message/testmessage/helpers.go @@ -0,0 +1,34 @@ +package testmessage + +import ( + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/vm" +) + +// TestMessageRef is a bound Message Bus Upgradeable contract and the address of the contract +// nolint: golint +type TestMessageRef struct { + *TestMessageBusUpgradeable + address common.Address +} + +// Address is the contract address. +func (s TestMessageRef) Address() common.Address { + return s.address +} + +// NewMessageRef gets a bound Message Bus Upgradeable contract and the address of the contract +// nolint: golint +func NewMessageRef(address common.Address, backend bind.ContractBackend) (*TestMessageRef, error) { + messageBusUpgradeable, err := NewTestMessageBusUpgradeable(address, backend) + if err != nil { + return nil, err + } + return &TestMessageRef{ + TestMessageBusUpgradeable: messageBusUpgradeable, + address: address, + }, nil +} + +var _ vm.ContractRef = &TestMessageRef{} diff --git a/services/explorer/contracts/message/testmessage/testmessage.abigen.go b/services/explorer/contracts/message/testmessage/testmessage.abigen.go new file mode 100644 index 0000000000..bc1c6a1ca5 --- /dev/null +++ b/services/explorer/contracts/message/testmessage/testmessage.abigen.go @@ -0,0 +1,7659 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package testmessage + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// AddressUpgradeableMetaData contains all meta data concerning the AddressUpgradeable contract. +var AddressUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122018ebd85d3533f626170919b4bbf40d12c72e02e2add596be4439050eeb00bae464736f6c63430008000033", +} + +// AddressUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use AddressUpgradeableMetaData.ABI instead. +var AddressUpgradeableABI = AddressUpgradeableMetaData.ABI + +// AddressUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use AddressUpgradeableMetaData.Bin instead. +var AddressUpgradeableBin = AddressUpgradeableMetaData.Bin + +// DeployAddressUpgradeable deploys a new Ethereum contract, binding an instance of AddressUpgradeable to it. +func DeployAddressUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *AddressUpgradeable, error) { + parsed, err := AddressUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(AddressUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &AddressUpgradeable{AddressUpgradeableCaller: AddressUpgradeableCaller{contract: contract}, AddressUpgradeableTransactor: AddressUpgradeableTransactor{contract: contract}, AddressUpgradeableFilterer: AddressUpgradeableFilterer{contract: contract}}, nil +} + +// AddressUpgradeable is an auto generated Go binding around an Ethereum contract. +type AddressUpgradeable struct { + AddressUpgradeableCaller // Read-only binding to the contract + AddressUpgradeableTransactor // Write-only binding to the contract + AddressUpgradeableFilterer // Log filterer for contract events +} + +// AddressUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type AddressUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AddressUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AddressUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AddressUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AddressUpgradeableSession struct { + Contract *AddressUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AddressUpgradeableCallerSession struct { + Contract *AddressUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AddressUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AddressUpgradeableTransactorSession struct { + Contract *AddressUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AddressUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type AddressUpgradeableRaw struct { + Contract *AddressUpgradeable // Generic contract binding to access the raw methods on +} + +// AddressUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AddressUpgradeableCallerRaw struct { + Contract *AddressUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// AddressUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AddressUpgradeableTransactorRaw struct { + Contract *AddressUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAddressUpgradeable creates a new instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeable(address common.Address, backend bind.ContractBackend) (*AddressUpgradeable, error) { + contract, err := bindAddressUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &AddressUpgradeable{AddressUpgradeableCaller: AddressUpgradeableCaller{contract: contract}, AddressUpgradeableTransactor: AddressUpgradeableTransactor{contract: contract}, AddressUpgradeableFilterer: AddressUpgradeableFilterer{contract: contract}}, nil +} + +// NewAddressUpgradeableCaller creates a new read-only instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*AddressUpgradeableCaller, error) { + contract, err := bindAddressUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AddressUpgradeableCaller{contract: contract}, nil +} + +// NewAddressUpgradeableTransactor creates a new write-only instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*AddressUpgradeableTransactor, error) { + contract, err := bindAddressUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AddressUpgradeableTransactor{contract: contract}, nil +} + +// NewAddressUpgradeableFilterer creates a new log filterer instance of AddressUpgradeable, bound to a specific deployed contract. +func NewAddressUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*AddressUpgradeableFilterer, error) { + contract, err := bindAddressUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AddressUpgradeableFilterer{contract: contract}, nil +} + +// bindAddressUpgradeable binds a generic wrapper to an already deployed contract. +func bindAddressUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AddressUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_AddressUpgradeable *AddressUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressUpgradeable.Contract.AddressUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_AddressUpgradeable *AddressUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.AddressUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressUpgradeable *AddressUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.AddressUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_AddressUpgradeable *AddressUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _AddressUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_AddressUpgradeable *AddressUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_AddressUpgradeable *AddressUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _AddressUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ContextChainIdUpgradeableMetaData contains all meta data concerning the ContextChainIdUpgradeable contract. +var ContextChainIdUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", +} + +// ContextChainIdUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ContextChainIdUpgradeableMetaData.ABI instead. +var ContextChainIdUpgradeableABI = ContextChainIdUpgradeableMetaData.ABI + +// ContextChainIdUpgradeable is an auto generated Go binding around an Ethereum contract. +type ContextChainIdUpgradeable struct { + ContextChainIdUpgradeableCaller // Read-only binding to the contract + ContextChainIdUpgradeableTransactor // Write-only binding to the contract + ContextChainIdUpgradeableFilterer // Log filterer for contract events +} + +// ContextChainIdUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextChainIdUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextChainIdUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextChainIdUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextChainIdUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextChainIdUpgradeableSession struct { + Contract *ContextChainIdUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextChainIdUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextChainIdUpgradeableCallerSession struct { + Contract *ContextChainIdUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextChainIdUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextChainIdUpgradeableTransactorSession struct { + Contract *ContextChainIdUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextChainIdUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextChainIdUpgradeableRaw struct { + Contract *ContextChainIdUpgradeable // Generic contract binding to access the raw methods on +} + +// ContextChainIdUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableCallerRaw struct { + Contract *ContextChainIdUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextChainIdUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextChainIdUpgradeableTransactorRaw struct { + Contract *ContextChainIdUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContextChainIdUpgradeable creates a new instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeable(address common.Address, backend bind.ContractBackend) (*ContextChainIdUpgradeable, error) { + contract, err := bindContextChainIdUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeable{ContextChainIdUpgradeableCaller: ContextChainIdUpgradeableCaller{contract: contract}, ContextChainIdUpgradeableTransactor: ContextChainIdUpgradeableTransactor{contract: contract}, ContextChainIdUpgradeableFilterer: ContextChainIdUpgradeableFilterer{contract: contract}}, nil +} + +// NewContextChainIdUpgradeableCaller creates a new read-only instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ContextChainIdUpgradeableCaller, error) { + contract, err := bindContextChainIdUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeableCaller{contract: contract}, nil +} + +// NewContextChainIdUpgradeableTransactor creates a new write-only instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextChainIdUpgradeableTransactor, error) { + contract, err := bindContextChainIdUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeableTransactor{contract: contract}, nil +} + +// NewContextChainIdUpgradeableFilterer creates a new log filterer instance of ContextChainIdUpgradeable, bound to a specific deployed contract. +func NewContextChainIdUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextChainIdUpgradeableFilterer, error) { + contract, err := bindContextChainIdUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextChainIdUpgradeableFilterer{contract: contract}, nil +} + +// bindContextChainIdUpgradeable binds a generic wrapper to an already deployed contract. +func bindContextChainIdUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextChainIdUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextChainIdUpgradeable.Contract.ContextChainIdUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.ContextChainIdUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.ContextChainIdUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextChainIdUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextChainIdUpgradeable *ContextChainIdUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextChainIdUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ContextUpgradeableMetaData contains all meta data concerning the ContextUpgradeable contract. +var ContextUpgradeableMetaData = &bind.MetaData{ + ABI: "[]", +} + +// ContextUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use ContextUpgradeableMetaData.ABI instead. +var ContextUpgradeableABI = ContextUpgradeableMetaData.ABI + +// ContextUpgradeable is an auto generated Go binding around an Ethereum contract. +type ContextUpgradeable struct { + ContextUpgradeableCaller // Read-only binding to the contract + ContextUpgradeableTransactor // Write-only binding to the contract + ContextUpgradeableFilterer // Log filterer for contract events +} + +// ContextUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type ContextUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ContextUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ContextUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ContextUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ContextUpgradeableSession struct { + Contract *ContextUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ContextUpgradeableCallerSession struct { + Contract *ContextUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ContextUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ContextUpgradeableTransactorSession struct { + Contract *ContextUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ContextUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type ContextUpgradeableRaw struct { + Contract *ContextUpgradeable // Generic contract binding to access the raw methods on +} + +// ContextUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ContextUpgradeableCallerRaw struct { + Contract *ContextUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// ContextUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ContextUpgradeableTransactorRaw struct { + Contract *ContextUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewContextUpgradeable creates a new instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeable(address common.Address, backend bind.ContractBackend) (*ContextUpgradeable, error) { + contract, err := bindContextUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ContextUpgradeable{ContextUpgradeableCaller: ContextUpgradeableCaller{contract: contract}, ContextUpgradeableTransactor: ContextUpgradeableTransactor{contract: contract}, ContextUpgradeableFilterer: ContextUpgradeableFilterer{contract: contract}}, nil +} + +// NewContextUpgradeableCaller creates a new read-only instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*ContextUpgradeableCaller, error) { + contract, err := bindContextUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ContextUpgradeableCaller{contract: contract}, nil +} + +// NewContextUpgradeableTransactor creates a new write-only instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*ContextUpgradeableTransactor, error) { + contract, err := bindContextUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ContextUpgradeableTransactor{contract: contract}, nil +} + +// NewContextUpgradeableFilterer creates a new log filterer instance of ContextUpgradeable, bound to a specific deployed contract. +func NewContextUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*ContextUpgradeableFilterer, error) { + contract, err := bindContextUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ContextUpgradeableFilterer{contract: contract}, nil +} + +// bindContextUpgradeable binds a generic wrapper to an already deployed contract. +func bindContextUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ContextUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextUpgradeable *ContextUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextUpgradeable.Contract.ContextUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextUpgradeable *ContextUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.ContextUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextUpgradeable *ContextUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.ContextUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ContextUpgradeable *ContextUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ContextUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ContextUpgradeable *ContextUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ContextUpgradeable *ContextUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ContextUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// IAuthVerifierMetaData contains all meta data concerning the IAuthVerifier contract. +var IAuthVerifierMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "8b1b3a2d": "msgAuth(bytes)", + "f6ea2c90": "setNodeGroup(address)", + }, +} + +// IAuthVerifierABI is the input ABI used to generate the binding from. +// Deprecated: Use IAuthVerifierMetaData.ABI instead. +var IAuthVerifierABI = IAuthVerifierMetaData.ABI + +// Deprecated: Use IAuthVerifierMetaData.Sigs instead. +// IAuthVerifierFuncSigs maps the 4-byte function signature to its string representation. +var IAuthVerifierFuncSigs = IAuthVerifierMetaData.Sigs + +// IAuthVerifier is an auto generated Go binding around an Ethereum contract. +type IAuthVerifier struct { + IAuthVerifierCaller // Read-only binding to the contract + IAuthVerifierTransactor // Write-only binding to the contract + IAuthVerifierFilterer // Log filterer for contract events +} + +// IAuthVerifierCaller is an auto generated read-only Go binding around an Ethereum contract. +type IAuthVerifierCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAuthVerifierTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IAuthVerifierTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAuthVerifierFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IAuthVerifierFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IAuthVerifierSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IAuthVerifierSession struct { + Contract *IAuthVerifier // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IAuthVerifierCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IAuthVerifierCallerSession struct { + Contract *IAuthVerifierCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IAuthVerifierTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IAuthVerifierTransactorSession struct { + Contract *IAuthVerifierTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IAuthVerifierRaw is an auto generated low-level Go binding around an Ethereum contract. +type IAuthVerifierRaw struct { + Contract *IAuthVerifier // Generic contract binding to access the raw methods on +} + +// IAuthVerifierCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IAuthVerifierCallerRaw struct { + Contract *IAuthVerifierCaller // Generic read-only contract binding to access the raw methods on +} + +// IAuthVerifierTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IAuthVerifierTransactorRaw struct { + Contract *IAuthVerifierTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIAuthVerifier creates a new instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifier(address common.Address, backend bind.ContractBackend) (*IAuthVerifier, error) { + contract, err := bindIAuthVerifier(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IAuthVerifier{IAuthVerifierCaller: IAuthVerifierCaller{contract: contract}, IAuthVerifierTransactor: IAuthVerifierTransactor{contract: contract}, IAuthVerifierFilterer: IAuthVerifierFilterer{contract: contract}}, nil +} + +// NewIAuthVerifierCaller creates a new read-only instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifierCaller(address common.Address, caller bind.ContractCaller) (*IAuthVerifierCaller, error) { + contract, err := bindIAuthVerifier(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IAuthVerifierCaller{contract: contract}, nil +} + +// NewIAuthVerifierTransactor creates a new write-only instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifierTransactor(address common.Address, transactor bind.ContractTransactor) (*IAuthVerifierTransactor, error) { + contract, err := bindIAuthVerifier(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IAuthVerifierTransactor{contract: contract}, nil +} + +// NewIAuthVerifierFilterer creates a new log filterer instance of IAuthVerifier, bound to a specific deployed contract. +func NewIAuthVerifierFilterer(address common.Address, filterer bind.ContractFilterer) (*IAuthVerifierFilterer, error) { + contract, err := bindIAuthVerifier(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IAuthVerifierFilterer{contract: contract}, nil +} + +// bindIAuthVerifier binds a generic wrapper to an already deployed contract. +func bindIAuthVerifier(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IAuthVerifierABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IAuthVerifier *IAuthVerifierRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAuthVerifier.Contract.IAuthVerifierCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IAuthVerifier *IAuthVerifierRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAuthVerifier.Contract.IAuthVerifierTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IAuthVerifier *IAuthVerifierRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAuthVerifier.Contract.IAuthVerifierTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IAuthVerifier *IAuthVerifierCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IAuthVerifier.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IAuthVerifier *IAuthVerifierTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IAuthVerifier.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IAuthVerifier *IAuthVerifierTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IAuthVerifier.Contract.contract.Transact(opts, method, params...) +} + +// MsgAuth is a free data retrieval call binding the contract method 0x8b1b3a2d. +// +// Solidity: function msgAuth(bytes _authData) view returns(bool authenticated) +func (_IAuthVerifier *IAuthVerifierCaller) MsgAuth(opts *bind.CallOpts, _authData []byte) (bool, error) { + var out []interface{} + err := _IAuthVerifier.contract.Call(opts, &out, "msgAuth", _authData) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// MsgAuth is a free data retrieval call binding the contract method 0x8b1b3a2d. +// +// Solidity: function msgAuth(bytes _authData) view returns(bool authenticated) +func (_IAuthVerifier *IAuthVerifierSession) MsgAuth(_authData []byte) (bool, error) { + return _IAuthVerifier.Contract.MsgAuth(&_IAuthVerifier.CallOpts, _authData) +} + +// MsgAuth is a free data retrieval call binding the contract method 0x8b1b3a2d. +// +// Solidity: function msgAuth(bytes _authData) view returns(bool authenticated) +func (_IAuthVerifier *IAuthVerifierCallerSession) MsgAuth(_authData []byte) (bool, error) { + return _IAuthVerifier.Contract.MsgAuth(&_IAuthVerifier.CallOpts, _authData) +} + +// SetNodeGroup is a paid mutator transaction binding the contract method 0xf6ea2c90. +// +// Solidity: function setNodeGroup(address _nodegroup) returns() +func (_IAuthVerifier *IAuthVerifierTransactor) SetNodeGroup(opts *bind.TransactOpts, _nodegroup common.Address) (*types.Transaction, error) { + return _IAuthVerifier.contract.Transact(opts, "setNodeGroup", _nodegroup) +} + +// SetNodeGroup is a paid mutator transaction binding the contract method 0xf6ea2c90. +// +// Solidity: function setNodeGroup(address _nodegroup) returns() +func (_IAuthVerifier *IAuthVerifierSession) SetNodeGroup(_nodegroup common.Address) (*types.Transaction, error) { + return _IAuthVerifier.Contract.SetNodeGroup(&_IAuthVerifier.TransactOpts, _nodegroup) +} + +// SetNodeGroup is a paid mutator transaction binding the contract method 0xf6ea2c90. +// +// Solidity: function setNodeGroup(address _nodegroup) returns() +func (_IAuthVerifier *IAuthVerifierTransactorSession) SetNodeGroup(_nodegroup common.Address) (*types.Transaction, error) { + return _IAuthVerifier.Contract.SetNodeGroup(&_IAuthVerifier.TransactOpts, _nodegroup) +} + +// IGasFeePricingMetaData contains all meta data concerning the IGasFeePricing contract. +var IGasFeePricingMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "47feadc1": "estimateGasFee(uint256,bytes)", + "e32192b7": "setCostPerChain(uint256,uint256,uint256)", + }, +} + +// IGasFeePricingABI is the input ABI used to generate the binding from. +// Deprecated: Use IGasFeePricingMetaData.ABI instead. +var IGasFeePricingABI = IGasFeePricingMetaData.ABI + +// Deprecated: Use IGasFeePricingMetaData.Sigs instead. +// IGasFeePricingFuncSigs maps the 4-byte function signature to its string representation. +var IGasFeePricingFuncSigs = IGasFeePricingMetaData.Sigs + +// IGasFeePricing is an auto generated Go binding around an Ethereum contract. +type IGasFeePricing struct { + IGasFeePricingCaller // Read-only binding to the contract + IGasFeePricingTransactor // Write-only binding to the contract + IGasFeePricingFilterer // Log filterer for contract events +} + +// IGasFeePricingCaller is an auto generated read-only Go binding around an Ethereum contract. +type IGasFeePricingCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGasFeePricingTransactor is an auto generated write-only Go binding around an Ethereum contract. +type IGasFeePricingTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGasFeePricingFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type IGasFeePricingFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// IGasFeePricingSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type IGasFeePricingSession struct { + Contract *IGasFeePricing // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IGasFeePricingCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type IGasFeePricingCallerSession struct { + Contract *IGasFeePricingCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// IGasFeePricingTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type IGasFeePricingTransactorSession struct { + Contract *IGasFeePricingTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// IGasFeePricingRaw is an auto generated low-level Go binding around an Ethereum contract. +type IGasFeePricingRaw struct { + Contract *IGasFeePricing // Generic contract binding to access the raw methods on +} + +// IGasFeePricingCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type IGasFeePricingCallerRaw struct { + Contract *IGasFeePricingCaller // Generic read-only contract binding to access the raw methods on +} + +// IGasFeePricingTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type IGasFeePricingTransactorRaw struct { + Contract *IGasFeePricingTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewIGasFeePricing creates a new instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricing(address common.Address, backend bind.ContractBackend) (*IGasFeePricing, error) { + contract, err := bindIGasFeePricing(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &IGasFeePricing{IGasFeePricingCaller: IGasFeePricingCaller{contract: contract}, IGasFeePricingTransactor: IGasFeePricingTransactor{contract: contract}, IGasFeePricingFilterer: IGasFeePricingFilterer{contract: contract}}, nil +} + +// NewIGasFeePricingCaller creates a new read-only instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricingCaller(address common.Address, caller bind.ContractCaller) (*IGasFeePricingCaller, error) { + contract, err := bindIGasFeePricing(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &IGasFeePricingCaller{contract: contract}, nil +} + +// NewIGasFeePricingTransactor creates a new write-only instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricingTransactor(address common.Address, transactor bind.ContractTransactor) (*IGasFeePricingTransactor, error) { + contract, err := bindIGasFeePricing(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &IGasFeePricingTransactor{contract: contract}, nil +} + +// NewIGasFeePricingFilterer creates a new log filterer instance of IGasFeePricing, bound to a specific deployed contract. +func NewIGasFeePricingFilterer(address common.Address, filterer bind.ContractFilterer) (*IGasFeePricingFilterer, error) { + contract, err := bindIGasFeePricing(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &IGasFeePricingFilterer{contract: contract}, nil +} + +// bindIGasFeePricing binds a generic wrapper to an already deployed contract. +func bindIGasFeePricing(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(IGasFeePricingABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IGasFeePricing *IGasFeePricingRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGasFeePricing.Contract.IGasFeePricingCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IGasFeePricing *IGasFeePricingRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGasFeePricing.Contract.IGasFeePricingTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGasFeePricing *IGasFeePricingRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGasFeePricing.Contract.IGasFeePricingTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_IGasFeePricing *IGasFeePricingCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _IGasFeePricing.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_IGasFeePricing *IGasFeePricingTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _IGasFeePricing.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_IGasFeePricing *IGasFeePricingTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _IGasFeePricing.Contract.contract.Transact(opts, method, params...) +} + +// EstimateGasFee is a paid mutator transaction binding the contract method 0x47feadc1. +// +// Solidity: function estimateGasFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_IGasFeePricing *IGasFeePricingTransactor) EstimateGasFee(opts *bind.TransactOpts, _dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _IGasFeePricing.contract.Transact(opts, "estimateGasFee", _dstChainId, _options) +} + +// EstimateGasFee is a paid mutator transaction binding the contract method 0x47feadc1. +// +// Solidity: function estimateGasFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_IGasFeePricing *IGasFeePricingSession) EstimateGasFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _IGasFeePricing.Contract.EstimateGasFee(&_IGasFeePricing.TransactOpts, _dstChainId, _options) +} + +// EstimateGasFee is a paid mutator transaction binding the contract method 0x47feadc1. +// +// Solidity: function estimateGasFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_IGasFeePricing *IGasFeePricingTransactorSession) EstimateGasFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _IGasFeePricing.Contract.EstimateGasFee(&_IGasFeePricing.TransactOpts, _dstChainId, _options) +} + +// SetCostPerChain is a paid mutator transaction binding the contract method 0xe32192b7. +// +// Solidity: function setCostPerChain(uint256 _dstChainId, uint256 _gasUnitPrice, uint256 _gasTokenPriceRatio) returns() +func (_IGasFeePricing *IGasFeePricingTransactor) SetCostPerChain(opts *bind.TransactOpts, _dstChainId *big.Int, _gasUnitPrice *big.Int, _gasTokenPriceRatio *big.Int) (*types.Transaction, error) { + return _IGasFeePricing.contract.Transact(opts, "setCostPerChain", _dstChainId, _gasUnitPrice, _gasTokenPriceRatio) +} + +// SetCostPerChain is a paid mutator transaction binding the contract method 0xe32192b7. +// +// Solidity: function setCostPerChain(uint256 _dstChainId, uint256 _gasUnitPrice, uint256 _gasTokenPriceRatio) returns() +func (_IGasFeePricing *IGasFeePricingSession) SetCostPerChain(_dstChainId *big.Int, _gasUnitPrice *big.Int, _gasTokenPriceRatio *big.Int) (*types.Transaction, error) { + return _IGasFeePricing.Contract.SetCostPerChain(&_IGasFeePricing.TransactOpts, _dstChainId, _gasUnitPrice, _gasTokenPriceRatio) +} + +// SetCostPerChain is a paid mutator transaction binding the contract method 0xe32192b7. +// +// Solidity: function setCostPerChain(uint256 _dstChainId, uint256 _gasUnitPrice, uint256 _gasTokenPriceRatio) returns() +func (_IGasFeePricing *IGasFeePricingTransactorSession) SetCostPerChain(_dstChainId *big.Int, _gasUnitPrice *big.Int, _gasTokenPriceRatio *big.Int) (*types.Transaction, error) { + return _IGasFeePricing.Contract.SetCostPerChain(&_IGasFeePricing.TransactOpts, _dstChainId, _gasUnitPrice, _gasTokenPriceRatio) +} + +// ISynMessagingReceiverMetaData contains all meta data concerning the ISynMessagingReceiver contract. +var ISynMessagingReceiverMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "a6060871": "executeMessage(bytes32,uint256,bytes,address)", + }, +} + +// ISynMessagingReceiverABI is the input ABI used to generate the binding from. +// Deprecated: Use ISynMessagingReceiverMetaData.ABI instead. +var ISynMessagingReceiverABI = ISynMessagingReceiverMetaData.ABI + +// Deprecated: Use ISynMessagingReceiverMetaData.Sigs instead. +// ISynMessagingReceiverFuncSigs maps the 4-byte function signature to its string representation. +var ISynMessagingReceiverFuncSigs = ISynMessagingReceiverMetaData.Sigs + +// ISynMessagingReceiver is an auto generated Go binding around an Ethereum contract. +type ISynMessagingReceiver struct { + ISynMessagingReceiverCaller // Read-only binding to the contract + ISynMessagingReceiverTransactor // Write-only binding to the contract + ISynMessagingReceiverFilterer // Log filterer for contract events +} + +// ISynMessagingReceiverCaller is an auto generated read-only Go binding around an Ethereum contract. +type ISynMessagingReceiverCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISynMessagingReceiverTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ISynMessagingReceiverTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISynMessagingReceiverFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ISynMessagingReceiverFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ISynMessagingReceiverSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ISynMessagingReceiverSession struct { + Contract *ISynMessagingReceiver // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ISynMessagingReceiverCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ISynMessagingReceiverCallerSession struct { + Contract *ISynMessagingReceiverCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ISynMessagingReceiverTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ISynMessagingReceiverTransactorSession struct { + Contract *ISynMessagingReceiverTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ISynMessagingReceiverRaw is an auto generated low-level Go binding around an Ethereum contract. +type ISynMessagingReceiverRaw struct { + Contract *ISynMessagingReceiver // Generic contract binding to access the raw methods on +} + +// ISynMessagingReceiverCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ISynMessagingReceiverCallerRaw struct { + Contract *ISynMessagingReceiverCaller // Generic read-only contract binding to access the raw methods on +} + +// ISynMessagingReceiverTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ISynMessagingReceiverTransactorRaw struct { + Contract *ISynMessagingReceiverTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewISynMessagingReceiver creates a new instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiver(address common.Address, backend bind.ContractBackend) (*ISynMessagingReceiver, error) { + contract, err := bindISynMessagingReceiver(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ISynMessagingReceiver{ISynMessagingReceiverCaller: ISynMessagingReceiverCaller{contract: contract}, ISynMessagingReceiverTransactor: ISynMessagingReceiverTransactor{contract: contract}, ISynMessagingReceiverFilterer: ISynMessagingReceiverFilterer{contract: contract}}, nil +} + +// NewISynMessagingReceiverCaller creates a new read-only instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiverCaller(address common.Address, caller bind.ContractCaller) (*ISynMessagingReceiverCaller, error) { + contract, err := bindISynMessagingReceiver(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ISynMessagingReceiverCaller{contract: contract}, nil +} + +// NewISynMessagingReceiverTransactor creates a new write-only instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiverTransactor(address common.Address, transactor bind.ContractTransactor) (*ISynMessagingReceiverTransactor, error) { + contract, err := bindISynMessagingReceiver(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ISynMessagingReceiverTransactor{contract: contract}, nil +} + +// NewISynMessagingReceiverFilterer creates a new log filterer instance of ISynMessagingReceiver, bound to a specific deployed contract. +func NewISynMessagingReceiverFilterer(address common.Address, filterer bind.ContractFilterer) (*ISynMessagingReceiverFilterer, error) { + contract, err := bindISynMessagingReceiver(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ISynMessagingReceiverFilterer{contract: contract}, nil +} + +// bindISynMessagingReceiver binds a generic wrapper to an already deployed contract. +func bindISynMessagingReceiver(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ISynMessagingReceiverABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ISynMessagingReceiver *ISynMessagingReceiverRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISynMessagingReceiver.Contract.ISynMessagingReceiverCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ISynMessagingReceiver *ISynMessagingReceiverRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ISynMessagingReceiverTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISynMessagingReceiver *ISynMessagingReceiverRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ISynMessagingReceiverTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ISynMessagingReceiver *ISynMessagingReceiverCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _ISynMessagingReceiver.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.contract.Transact(opts, method, params...) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa6060871. +// +// Solidity: function executeMessage(bytes32 _srcAddress, uint256 _srcChainId, bytes _message, address _executor) returns() +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactor) ExecuteMessage(opts *bind.TransactOpts, _srcAddress [32]byte, _srcChainId *big.Int, _message []byte, _executor common.Address) (*types.Transaction, error) { + return _ISynMessagingReceiver.contract.Transact(opts, "executeMessage", _srcAddress, _srcChainId, _message, _executor) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa6060871. +// +// Solidity: function executeMessage(bytes32 _srcAddress, uint256 _srcChainId, bytes _message, address _executor) returns() +func (_ISynMessagingReceiver *ISynMessagingReceiverSession) ExecuteMessage(_srcAddress [32]byte, _srcChainId *big.Int, _message []byte, _executor common.Address) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ExecuteMessage(&_ISynMessagingReceiver.TransactOpts, _srcAddress, _srcChainId, _message, _executor) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa6060871. +// +// Solidity: function executeMessage(bytes32 _srcAddress, uint256 _srcChainId, bytes _message, address _executor) returns() +func (_ISynMessagingReceiver *ISynMessagingReceiverTransactorSession) ExecuteMessage(_srcAddress [32]byte, _srcChainId *big.Int, _message []byte, _executor common.Address) (*types.Transaction, error) { + return _ISynMessagingReceiver.Contract.ExecuteMessage(&_ISynMessagingReceiver.TransactOpts, _srcAddress, _srcChainId, _message, _executor) +} + +// InitializableMetaData contains all meta data concerning the Initializable contract. +var InitializableMetaData = &bind.MetaData{ + ABI: "[]", +} + +// InitializableABI is the input ABI used to generate the binding from. +// Deprecated: Use InitializableMetaData.ABI instead. +var InitializableABI = InitializableMetaData.ABI + +// Initializable is an auto generated Go binding around an Ethereum contract. +type Initializable struct { + InitializableCaller // Read-only binding to the contract + InitializableTransactor // Write-only binding to the contract + InitializableFilterer // Log filterer for contract events +} + +// InitializableCaller is an auto generated read-only Go binding around an Ethereum contract. +type InitializableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type InitializableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type InitializableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// InitializableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type InitializableSession struct { + Contract *Initializable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// InitializableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type InitializableCallerSession struct { + Contract *InitializableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// InitializableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type InitializableTransactorSession struct { + Contract *InitializableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// InitializableRaw is an auto generated low-level Go binding around an Ethereum contract. +type InitializableRaw struct { + Contract *Initializable // Generic contract binding to access the raw methods on +} + +// InitializableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type InitializableCallerRaw struct { + Contract *InitializableCaller // Generic read-only contract binding to access the raw methods on +} + +// InitializableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type InitializableTransactorRaw struct { + Contract *InitializableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewInitializable creates a new instance of Initializable, bound to a specific deployed contract. +func NewInitializable(address common.Address, backend bind.ContractBackend) (*Initializable, error) { + contract, err := bindInitializable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Initializable{InitializableCaller: InitializableCaller{contract: contract}, InitializableTransactor: InitializableTransactor{contract: contract}, InitializableFilterer: InitializableFilterer{contract: contract}}, nil +} + +// NewInitializableCaller creates a new read-only instance of Initializable, bound to a specific deployed contract. +func NewInitializableCaller(address common.Address, caller bind.ContractCaller) (*InitializableCaller, error) { + contract, err := bindInitializable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &InitializableCaller{contract: contract}, nil +} + +// NewInitializableTransactor creates a new write-only instance of Initializable, bound to a specific deployed contract. +func NewInitializableTransactor(address common.Address, transactor bind.ContractTransactor) (*InitializableTransactor, error) { + contract, err := bindInitializable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &InitializableTransactor{contract: contract}, nil +} + +// NewInitializableFilterer creates a new log filterer instance of Initializable, bound to a specific deployed contract. +func NewInitializableFilterer(address common.Address, filterer bind.ContractFilterer) (*InitializableFilterer, error) { + contract, err := bindInitializable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &InitializableFilterer{contract: contract}, nil +} + +// bindInitializable binds a generic wrapper to an already deployed contract. +func bindInitializable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(InitializableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Initializable *InitializableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Initializable.Contract.InitializableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Initializable *InitializableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Initializable.Contract.InitializableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Initializable *InitializableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Initializable.Contract.InitializableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Initializable *InitializableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Initializable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Initializable *InitializableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Initializable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Initializable *InitializableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Initializable.Contract.contract.Transact(opts, method, params...) +} + +// MessageBusReceiverUpgradeableMetaData contains all meta data concerning the MessageBusReceiverUpgradeable contract. +var MessageBusReceiverUpgradeableMetaData = &bind.MetaData{ + 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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Sigs: map[string]string{ + "c4087335": "authVerifier()", + "a1b058d8": "executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)", + "25b19fa3": "getExecutedMessage(bytes32)", + "8da5cb5b": "owner()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", + "a5c0edf3": "updateAuthVerifier(address)", + "9b11079c": "updateMessageStatus(bytes32,uint8)", + }, + Bin: "0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220034ca05f6f48abb9ca3ea109f6613964ac8c188902f712ae0a8c2f19af9a501f64736f6c63430008000033", +} + +// MessageBusReceiverUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use MessageBusReceiverUpgradeableMetaData.ABI instead. +var MessageBusReceiverUpgradeableABI = MessageBusReceiverUpgradeableMetaData.ABI + +// Deprecated: Use MessageBusReceiverUpgradeableMetaData.Sigs instead. +// MessageBusReceiverUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var MessageBusReceiverUpgradeableFuncSigs = MessageBusReceiverUpgradeableMetaData.Sigs + +// MessageBusReceiverUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MessageBusReceiverUpgradeableMetaData.Bin instead. +var MessageBusReceiverUpgradeableBin = MessageBusReceiverUpgradeableMetaData.Bin + +// DeployMessageBusReceiverUpgradeable deploys a new Ethereum contract, binding an instance of MessageBusReceiverUpgradeable to it. +func DeployMessageBusReceiverUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MessageBusReceiverUpgradeable, error) { + parsed, err := MessageBusReceiverUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MessageBusReceiverUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MessageBusReceiverUpgradeable{MessageBusReceiverUpgradeableCaller: MessageBusReceiverUpgradeableCaller{contract: contract}, MessageBusReceiverUpgradeableTransactor: MessageBusReceiverUpgradeableTransactor{contract: contract}, MessageBusReceiverUpgradeableFilterer: MessageBusReceiverUpgradeableFilterer{contract: contract}}, nil +} + +// MessageBusReceiverUpgradeable is an auto generated Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeable struct { + MessageBusReceiverUpgradeableCaller // Read-only binding to the contract + MessageBusReceiverUpgradeableTransactor // Write-only binding to the contract + MessageBusReceiverUpgradeableFilterer // Log filterer for contract events +} + +// MessageBusReceiverUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusReceiverUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusReceiverUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MessageBusReceiverUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusReceiverUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MessageBusReceiverUpgradeableSession struct { + Contract *MessageBusReceiverUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusReceiverUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MessageBusReceiverUpgradeableCallerSession struct { + Contract *MessageBusReceiverUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MessageBusReceiverUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MessageBusReceiverUpgradeableTransactorSession struct { + Contract *MessageBusReceiverUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusReceiverUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableRaw struct { + Contract *MessageBusReceiverUpgradeable // Generic contract binding to access the raw methods on +} + +// MessageBusReceiverUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableCallerRaw struct { + Contract *MessageBusReceiverUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// MessageBusReceiverUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MessageBusReceiverUpgradeableTransactorRaw struct { + Contract *MessageBusReceiverUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMessageBusReceiverUpgradeable creates a new instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeable(address common.Address, backend bind.ContractBackend) (*MessageBusReceiverUpgradeable, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeable{MessageBusReceiverUpgradeableCaller: MessageBusReceiverUpgradeableCaller{contract: contract}, MessageBusReceiverUpgradeableTransactor: MessageBusReceiverUpgradeableTransactor{contract: contract}, MessageBusReceiverUpgradeableFilterer: MessageBusReceiverUpgradeableFilterer{contract: contract}}, nil +} + +// NewMessageBusReceiverUpgradeableCaller creates a new read-only instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*MessageBusReceiverUpgradeableCaller, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableCaller{contract: contract}, nil +} + +// NewMessageBusReceiverUpgradeableTransactor creates a new write-only instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*MessageBusReceiverUpgradeableTransactor, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableTransactor{contract: contract}, nil +} + +// NewMessageBusReceiverUpgradeableFilterer creates a new log filterer instance of MessageBusReceiverUpgradeable, bound to a specific deployed contract. +func NewMessageBusReceiverUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*MessageBusReceiverUpgradeableFilterer, error) { + contract, err := bindMessageBusReceiverUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableFilterer{contract: contract}, nil +} + +// bindMessageBusReceiverUpgradeable binds a generic wrapper to an already deployed contract. +func bindMessageBusReceiverUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MessageBusReceiverUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusReceiverUpgradeable.Contract.MessageBusReceiverUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.MessageBusReceiverUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.MessageBusReceiverUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusReceiverUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) AuthVerifier(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "authVerifier") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) AuthVerifier() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.AuthVerifier(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) AuthVerifier() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.AuthVerifier(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) GetExecutedMessage(opts *bind.CallOpts, _messageId [32]byte) (uint8, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "getExecutedMessage", _messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusReceiverUpgradeable.Contract.GetExecutedMessage(&_MessageBusReceiverUpgradeable.CallOpts, _messageId) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusReceiverUpgradeable.Contract.GetExecutedMessage(&_MessageBusReceiverUpgradeable.CallOpts, _messageId) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) Owner() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.Owner(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) Owner() (common.Address, error) { + return _MessageBusReceiverUpgradeable.Contract.Owner(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MessageBusReceiverUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) Paused() (bool, error) { + return _MessageBusReceiverUpgradeable.Contract.Paused(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableCallerSession) Paused() (bool, error) { + return _MessageBusReceiverUpgradeable.Contract.Paused(&_MessageBusReceiverUpgradeable.CallOpts) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) ExecuteMessage(opts *bind.TransactOpts, _srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "executeMessage", _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.ExecuteMessage(&_MessageBusReceiverUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.ExecuteMessage(&_MessageBusReceiverUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.RenounceOwnership(&_MessageBusReceiverUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.RenounceOwnership(&_MessageBusReceiverUpgradeable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.TransferOwnership(&_MessageBusReceiverUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.TransferOwnership(&_MessageBusReceiverUpgradeable.TransactOpts, newOwner) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) UpdateAuthVerifier(opts *bind.TransactOpts, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "updateAuthVerifier", _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusReceiverUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusReceiverUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactor) UpdateMessageStatus(opts *bind.TransactOpts, _messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.contract.Transact(opts, "updateMessageStatus", _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateMessageStatus(&_MessageBusReceiverUpgradeable.TransactOpts, _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableTransactorSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusReceiverUpgradeable.Contract.UpdateMessageStatus(&_MessageBusReceiverUpgradeable.TransactOpts, _messageId, _status) +} + +// MessageBusReceiverUpgradeableCallRevertedIterator is returned from FilterCallReverted and is used to iterate over the raw logs and unpacked data for CallReverted events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableCallRevertedIterator struct { + Event *MessageBusReceiverUpgradeableCallReverted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableCallRevertedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableCallRevertedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableCallRevertedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableCallReverted represents a CallReverted event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableCallReverted struct { + Reason string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallReverted is a free log retrieval operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterCallReverted(opts *bind.FilterOpts) (*MessageBusReceiverUpgradeableCallRevertedIterator, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableCallRevertedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "CallReverted", logs: logs, sub: sub}, nil +} + +// WatchCallReverted is a free log subscription operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchCallReverted(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableCallReverted) (event.Subscription, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableCallReverted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallReverted is a log parse operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseCallReverted(log types.Log) (*MessageBusReceiverUpgradeableCallReverted, error) { + event := new(MessageBusReceiverUpgradeableCallReverted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeableExecutedIterator is returned from FilterExecuted and is used to iterate over the raw logs and unpacked data for Executed events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableExecutedIterator struct { + Event *MessageBusReceiverUpgradeableExecuted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableExecutedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableExecutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableExecuted represents a Executed event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableExecuted struct { + MessageId [32]byte + Status uint8 + DstAddress common.Address + SrcChainId uint64 + SrcNonce uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecuted is a free log retrieval operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterExecuted(opts *bind.FilterOpts, messageId [][32]byte, _dstAddress []common.Address) (*MessageBusReceiverUpgradeableExecutedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableExecutedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "Executed", logs: logs, sub: sub}, nil +} + +// WatchExecuted is a free log subscription operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchExecuted(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableExecuted, messageId [][32]byte, _dstAddress []common.Address) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableExecuted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExecuted is a log parse operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseExecuted(log types.Log) (*MessageBusReceiverUpgradeableExecuted, error) { + event := new(MessageBusReceiverUpgradeableExecuted) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableOwnershipTransferredIterator struct { + Event *MessageBusReceiverUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MessageBusReceiverUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableOwnershipTransferredIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*MessageBusReceiverUpgradeableOwnershipTransferred, error) { + event := new(MessageBusReceiverUpgradeableOwnershipTransferred) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeablePausedIterator struct { + Event *MessageBusReceiverUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeablePaused represents a Paused event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*MessageBusReceiverUpgradeablePausedIterator, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeablePausedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeablePaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParsePaused(log types.Log) (*MessageBusReceiverUpgradeablePaused, error) { + event := new(MessageBusReceiverUpgradeablePaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusReceiverUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableUnpausedIterator struct { + Event *MessageBusReceiverUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusReceiverUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusReceiverUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusReceiverUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusReceiverUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusReceiverUpgradeableUnpaused represents a Unpaused event raised by the MessageBusReceiverUpgradeable contract. +type MessageBusReceiverUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*MessageBusReceiverUpgradeableUnpausedIterator, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &MessageBusReceiverUpgradeableUnpausedIterator{contract: _MessageBusReceiverUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *MessageBusReceiverUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusReceiverUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusReceiverUpgradeableUnpaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusReceiverUpgradeable *MessageBusReceiverUpgradeableFilterer) ParseUnpaused(log types.Log) (*MessageBusReceiverUpgradeableUnpaused, error) { + event := new(MessageBusReceiverUpgradeableUnpaused) + if err := _MessageBusReceiverUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeableMetaData contains all meta data concerning the MessageBusSenderUpgradeable contract. +var MessageBusSenderUpgradeableMetaData = &bind.MetaData{ + 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\":\"addresspayable\",\"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\":\"addresspayable\",\"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\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Sigs: map[string]string{ + "f44d57aa": "computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)", + "5da6d2c4": "estimateFee(uint256,bytes)", + "9af1d35a": "fees()", + "aa70fc0e": "gasFeePricing()", + "affed0e0": "nonce()", + "8da5cb5b": "owner()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "205e157b": "rescueGas(address)", + "ac8a4c1b": "sendMessage(bytes32,uint256,bytes,bytes)", + "72177189": "sendMessage(bytes32,uint256,bytes,bytes,address)", + "f2fde38b": "transferOwnership(address)", + "a66dd384": "updateGasFeePricing(address)", + "d6b457b9": "withdrawGasFees(address)", + }, + Bin: "0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212202d3dbd32378d2f49d296babf01ce4c62d300f205ee86baf51e535a8613e9648264736f6c63430008000033", +} + +// MessageBusSenderUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use MessageBusSenderUpgradeableMetaData.ABI instead. +var MessageBusSenderUpgradeableABI = MessageBusSenderUpgradeableMetaData.ABI + +// Deprecated: Use MessageBusSenderUpgradeableMetaData.Sigs instead. +// MessageBusSenderUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var MessageBusSenderUpgradeableFuncSigs = MessageBusSenderUpgradeableMetaData.Sigs + +// MessageBusSenderUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MessageBusSenderUpgradeableMetaData.Bin instead. +var MessageBusSenderUpgradeableBin = MessageBusSenderUpgradeableMetaData.Bin + +// DeployMessageBusSenderUpgradeable deploys a new Ethereum contract, binding an instance of MessageBusSenderUpgradeable to it. +func DeployMessageBusSenderUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MessageBusSenderUpgradeable, error) { + parsed, err := MessageBusSenderUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MessageBusSenderUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MessageBusSenderUpgradeable{MessageBusSenderUpgradeableCaller: MessageBusSenderUpgradeableCaller{contract: contract}, MessageBusSenderUpgradeableTransactor: MessageBusSenderUpgradeableTransactor{contract: contract}, MessageBusSenderUpgradeableFilterer: MessageBusSenderUpgradeableFilterer{contract: contract}}, nil +} + +// MessageBusSenderUpgradeable is an auto generated Go binding around an Ethereum contract. +type MessageBusSenderUpgradeable struct { + MessageBusSenderUpgradeableCaller // Read-only binding to the contract + MessageBusSenderUpgradeableTransactor // Write-only binding to the contract + MessageBusSenderUpgradeableFilterer // Log filterer for contract events +} + +// MessageBusSenderUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusSenderUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusSenderUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MessageBusSenderUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusSenderUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MessageBusSenderUpgradeableSession struct { + Contract *MessageBusSenderUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusSenderUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MessageBusSenderUpgradeableCallerSession struct { + Contract *MessageBusSenderUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MessageBusSenderUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MessageBusSenderUpgradeableTransactorSession struct { + Contract *MessageBusSenderUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusSenderUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableRaw struct { + Contract *MessageBusSenderUpgradeable // Generic contract binding to access the raw methods on +} + +// MessageBusSenderUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableCallerRaw struct { + Contract *MessageBusSenderUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// MessageBusSenderUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MessageBusSenderUpgradeableTransactorRaw struct { + Contract *MessageBusSenderUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMessageBusSenderUpgradeable creates a new instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeable(address common.Address, backend bind.ContractBackend) (*MessageBusSenderUpgradeable, error) { + contract, err := bindMessageBusSenderUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeable{MessageBusSenderUpgradeableCaller: MessageBusSenderUpgradeableCaller{contract: contract}, MessageBusSenderUpgradeableTransactor: MessageBusSenderUpgradeableTransactor{contract: contract}, MessageBusSenderUpgradeableFilterer: MessageBusSenderUpgradeableFilterer{contract: contract}}, nil +} + +// NewMessageBusSenderUpgradeableCaller creates a new read-only instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*MessageBusSenderUpgradeableCaller, error) { + contract, err := bindMessageBusSenderUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableCaller{contract: contract}, nil +} + +// NewMessageBusSenderUpgradeableTransactor creates a new write-only instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*MessageBusSenderUpgradeableTransactor, error) { + contract, err := bindMessageBusSenderUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableTransactor{contract: contract}, nil +} + +// NewMessageBusSenderUpgradeableFilterer creates a new log filterer instance of MessageBusSenderUpgradeable, bound to a specific deployed contract. +func NewMessageBusSenderUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*MessageBusSenderUpgradeableFilterer, error) { + contract, err := bindMessageBusSenderUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableFilterer{contract: contract}, nil +} + +// bindMessageBusSenderUpgradeable binds a generic wrapper to an already deployed contract. +func bindMessageBusSenderUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MessageBusSenderUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusSenderUpgradeable.Contract.MessageBusSenderUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.MessageBusSenderUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.MessageBusSenderUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusSenderUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) ComputeMessageId(opts *bind.CallOpts, _srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "computeMessageId", _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusSenderUpgradeable.Contract.ComputeMessageId(&_MessageBusSenderUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusSenderUpgradeable.Contract.ComputeMessageId(&_MessageBusSenderUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Fees(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "fees") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Fees() (*big.Int, error) { + return _MessageBusSenderUpgradeable.Contract.Fees(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Fees() (*big.Int, error) { + return _MessageBusSenderUpgradeable.Contract.Fees(&_MessageBusSenderUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) GasFeePricing(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "gasFeePricing") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) GasFeePricing() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.GasFeePricing(&_MessageBusSenderUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) GasFeePricing() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.GasFeePricing(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Nonce(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "nonce") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Nonce() (uint64, error) { + return _MessageBusSenderUpgradeable.Contract.Nonce(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Nonce() (uint64, error) { + return _MessageBusSenderUpgradeable.Contract.Nonce(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Owner() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.Owner(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Owner() (common.Address, error) { + return _MessageBusSenderUpgradeable.Contract.Owner(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MessageBusSenderUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) Paused() (bool, error) { + return _MessageBusSenderUpgradeable.Contract.Paused(&_MessageBusSenderUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableCallerSession) Paused() (bool, error) { + return _MessageBusSenderUpgradeable.Contract.Paused(&_MessageBusSenderUpgradeable.CallOpts) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) EstimateFee(opts *bind.TransactOpts, _dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "estimateFee", _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.EstimateFee(&_MessageBusSenderUpgradeable.TransactOpts, _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.EstimateFee(&_MessageBusSenderUpgradeable.TransactOpts, _dstChainId, _options) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RenounceOwnership(&_MessageBusSenderUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RenounceOwnership(&_MessageBusSenderUpgradeable.TransactOpts) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) RescueGas(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "rescueGas", to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RescueGas(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.RescueGas(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) SendMessage(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "sendMessage", _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) SendMessage0(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "sendMessage0", _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage0(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.SendMessage0(&_MessageBusSenderUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.TransferOwnership(&_MessageBusSenderUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.TransferOwnership(&_MessageBusSenderUpgradeable.TransactOpts, newOwner) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) UpdateGasFeePricing(opts *bind.TransactOpts, _gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "updateGasFeePricing", _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusSenderUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusSenderUpgradeable.TransactOpts, _gasFeePricing) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactor) WithdrawGasFees(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.contract.Transact(opts, "withdrawGasFees", to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.WithdrawGasFees(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableTransactorSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusSenderUpgradeable.Contract.WithdrawGasFees(&_MessageBusSenderUpgradeable.TransactOpts, to) +} + +// MessageBusSenderUpgradeableMessageSentIterator is returned from FilterMessageSent and is used to iterate over the raw logs and unpacked data for MessageSent events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableMessageSentIterator struct { + Event *MessageBusSenderUpgradeableMessageSent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeableMessageSentIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeableMessageSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeableMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeableMessageSent represents a MessageSent event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableMessageSent struct { + Sender common.Address + SrcChainID *big.Int + Receiver [32]byte + DstChainId *big.Int + Message []byte + Nonce uint64 + Options []byte + Fee *big.Int + MessageId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMessageSent is a free log retrieval operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterMessageSent(opts *bind.FilterOpts, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (*MessageBusSenderUpgradeableMessageSentIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableMessageSentIterator{contract: _MessageBusSenderUpgradeable.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +// WatchMessageSent is a free log subscription operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeableMessageSent, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeableMessageSent) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMessageSent is a log parse operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParseMessageSent(log types.Log) (*MessageBusSenderUpgradeableMessageSent, error) { + event := new(MessageBusSenderUpgradeableMessageSent) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableOwnershipTransferredIterator struct { + Event *MessageBusSenderUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MessageBusSenderUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableOwnershipTransferredIterator{contract: _MessageBusSenderUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*MessageBusSenderUpgradeableOwnershipTransferred, error) { + event := new(MessageBusSenderUpgradeableOwnershipTransferred) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeablePausedIterator struct { + Event *MessageBusSenderUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeablePaused represents a Paused event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*MessageBusSenderUpgradeablePausedIterator, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeablePausedIterator{contract: _MessageBusSenderUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeablePaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParsePaused(log types.Log) (*MessageBusSenderUpgradeablePaused, error) { + event := new(MessageBusSenderUpgradeablePaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusSenderUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableUnpausedIterator struct { + Event *MessageBusSenderUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusSenderUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusSenderUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusSenderUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusSenderUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusSenderUpgradeableUnpaused represents a Unpaused event raised by the MessageBusSenderUpgradeable contract. +type MessageBusSenderUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*MessageBusSenderUpgradeableUnpausedIterator, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &MessageBusSenderUpgradeableUnpausedIterator{contract: _MessageBusSenderUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *MessageBusSenderUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusSenderUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusSenderUpgradeableUnpaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusSenderUpgradeable *MessageBusSenderUpgradeableFilterer) ParseUnpaused(log types.Log) (*MessageBusSenderUpgradeableUnpaused, error) { + event := new(MessageBusSenderUpgradeableUnpaused) + if err := _MessageBusSenderUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableMetaData contains all meta data concerning the MessageBusUpgradeable contract. +var MessageBusUpgradeableMetaData = &bind.MetaData{ + 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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.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\":\"addresspayable\",\"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\":\"addresspayable\",\"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\":\"enumMessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Sigs: map[string]string{ + "c4087335": "authVerifier()", + "f44d57aa": "computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)", + "5da6d2c4": "estimateFee(uint256,bytes)", + "a1b058d8": "executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)", + "9af1d35a": "fees()", + "aa70fc0e": "gasFeePricing()", + "25b19fa3": "getExecutedMessage(bytes32)", + "485cc955": "initialize(address,address)", + "affed0e0": "nonce()", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "205e157b": "rescueGas(address)", + "ac8a4c1b": "sendMessage(bytes32,uint256,bytes,bytes)", + "72177189": "sendMessage(bytes32,uint256,bytes,bytes,address)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", + "a5c0edf3": "updateAuthVerifier(address)", + "a66dd384": "updateGasFeePricing(address)", + "9b11079c": "updateMessageStatus(bytes32,uint8)", + "d6b457b9": "withdrawGasFees(address)", + }, + Bin: "0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea264697066735822122067372238d920e9724cf8967ebf7f7fa47665c686fd5e59f70acf4931e9ab800464736f6c63430008000033", +} + +// MessageBusUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use MessageBusUpgradeableMetaData.ABI instead. +var MessageBusUpgradeableABI = MessageBusUpgradeableMetaData.ABI + +// Deprecated: Use MessageBusUpgradeableMetaData.Sigs instead. +// MessageBusUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var MessageBusUpgradeableFuncSigs = MessageBusUpgradeableMetaData.Sigs + +// MessageBusUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use MessageBusUpgradeableMetaData.Bin instead. +var MessageBusUpgradeableBin = MessageBusUpgradeableMetaData.Bin + +// DeployMessageBusUpgradeable deploys a new Ethereum contract, binding an instance of MessageBusUpgradeable to it. +func DeployMessageBusUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *MessageBusUpgradeable, error) { + parsed, err := MessageBusUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(MessageBusUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &MessageBusUpgradeable{MessageBusUpgradeableCaller: MessageBusUpgradeableCaller{contract: contract}, MessageBusUpgradeableTransactor: MessageBusUpgradeableTransactor{contract: contract}, MessageBusUpgradeableFilterer: MessageBusUpgradeableFilterer{contract: contract}}, nil +} + +// MessageBusUpgradeable is an auto generated Go binding around an Ethereum contract. +type MessageBusUpgradeable struct { + MessageBusUpgradeableCaller // Read-only binding to the contract + MessageBusUpgradeableTransactor // Write-only binding to the contract + MessageBusUpgradeableFilterer // Log filterer for contract events +} + +// MessageBusUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type MessageBusUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type MessageBusUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type MessageBusUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// MessageBusUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type MessageBusUpgradeableSession struct { + Contract *MessageBusUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type MessageBusUpgradeableCallerSession struct { + Contract *MessageBusUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// MessageBusUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type MessageBusUpgradeableTransactorSession struct { + Contract *MessageBusUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// MessageBusUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type MessageBusUpgradeableRaw struct { + Contract *MessageBusUpgradeable // Generic contract binding to access the raw methods on +} + +// MessageBusUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type MessageBusUpgradeableCallerRaw struct { + Contract *MessageBusUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// MessageBusUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type MessageBusUpgradeableTransactorRaw struct { + Contract *MessageBusUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewMessageBusUpgradeable creates a new instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeable(address common.Address, backend bind.ContractBackend) (*MessageBusUpgradeable, error) { + contract, err := bindMessageBusUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &MessageBusUpgradeable{MessageBusUpgradeableCaller: MessageBusUpgradeableCaller{contract: contract}, MessageBusUpgradeableTransactor: MessageBusUpgradeableTransactor{contract: contract}, MessageBusUpgradeableFilterer: MessageBusUpgradeableFilterer{contract: contract}}, nil +} + +// NewMessageBusUpgradeableCaller creates a new read-only instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*MessageBusUpgradeableCaller, error) { + contract, err := bindMessageBusUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableCaller{contract: contract}, nil +} + +// NewMessageBusUpgradeableTransactor creates a new write-only instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*MessageBusUpgradeableTransactor, error) { + contract, err := bindMessageBusUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableTransactor{contract: contract}, nil +} + +// NewMessageBusUpgradeableFilterer creates a new log filterer instance of MessageBusUpgradeable, bound to a specific deployed contract. +func NewMessageBusUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*MessageBusUpgradeableFilterer, error) { + contract, err := bindMessageBusUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableFilterer{contract: contract}, nil +} + +// bindMessageBusUpgradeable binds a generic wrapper to an already deployed contract. +func bindMessageBusUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(MessageBusUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusUpgradeable *MessageBusUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusUpgradeable.Contract.MessageBusUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusUpgradeable *MessageBusUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.MessageBusUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusUpgradeable *MessageBusUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.MessageBusUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _MessageBusUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) AuthVerifier(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "authVerifier") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) AuthVerifier() (common.Address, error) { + return _MessageBusUpgradeable.Contract.AuthVerifier(&_MessageBusUpgradeable.CallOpts) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) AuthVerifier() (common.Address, error) { + return _MessageBusUpgradeable.Contract.AuthVerifier(&_MessageBusUpgradeable.CallOpts) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) ComputeMessageId(opts *bind.CallOpts, _srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "computeMessageId", _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusUpgradeable.Contract.ComputeMessageId(&_MessageBusUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _MessageBusUpgradeable.Contract.ComputeMessageId(&_MessageBusUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Fees(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "fees") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Fees() (*big.Int, error) { + return _MessageBusUpgradeable.Contract.Fees(&_MessageBusUpgradeable.CallOpts) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Fees() (*big.Int, error) { + return _MessageBusUpgradeable.Contract.Fees(&_MessageBusUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) GasFeePricing(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "gasFeePricing") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) GasFeePricing() (common.Address, error) { + return _MessageBusUpgradeable.Contract.GasFeePricing(&_MessageBusUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) GasFeePricing() (common.Address, error) { + return _MessageBusUpgradeable.Contract.GasFeePricing(&_MessageBusUpgradeable.CallOpts) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) GetExecutedMessage(opts *bind.CallOpts, _messageId [32]byte) (uint8, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "getExecutedMessage", _messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusUpgradeable.Contract.GetExecutedMessage(&_MessageBusUpgradeable.CallOpts, _messageId) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _MessageBusUpgradeable.Contract.GetExecutedMessage(&_MessageBusUpgradeable.CallOpts, _messageId) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Nonce(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "nonce") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Nonce() (uint64, error) { + return _MessageBusUpgradeable.Contract.Nonce(&_MessageBusUpgradeable.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Nonce() (uint64, error) { + return _MessageBusUpgradeable.Contract.Nonce(&_MessageBusUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Owner() (common.Address, error) { + return _MessageBusUpgradeable.Contract.Owner(&_MessageBusUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Owner() (common.Address, error) { + return _MessageBusUpgradeable.Contract.Owner(&_MessageBusUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusUpgradeable *MessageBusUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _MessageBusUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Paused() (bool, error) { + return _MessageBusUpgradeable.Contract.Paused(&_MessageBusUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_MessageBusUpgradeable *MessageBusUpgradeableCallerSession) Paused() (bool, error) { + return _MessageBusUpgradeable.Contract.Paused(&_MessageBusUpgradeable.CallOpts) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) EstimateFee(opts *bind.TransactOpts, _dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "estimateFee", _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.EstimateFee(&_MessageBusUpgradeable.TransactOpts, _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.EstimateFee(&_MessageBusUpgradeable.TransactOpts, _dstChainId, _options) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) ExecuteMessage(opts *bind.TransactOpts, _srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "executeMessage", _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.ExecuteMessage(&_MessageBusUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.ExecuteMessage(&_MessageBusUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) Initialize(opts *bind.TransactOpts, _gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "initialize", _gasFeePricing, _authVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Initialize(_gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Initialize(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing, _authVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) Initialize(_gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Initialize(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing, _authVerifier) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Pause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Pause(&_MessageBusUpgradeable.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) Pause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Pause(&_MessageBusUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RenounceOwnership(&_MessageBusUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RenounceOwnership(&_MessageBusUpgradeable.TransactOpts) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) RescueGas(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "rescueGas", to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RescueGas(&_MessageBusUpgradeable.TransactOpts, to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.RescueGas(&_MessageBusUpgradeable.TransactOpts, to) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) SendMessage(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "sendMessage", _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) SendMessage0(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "sendMessage0", _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage0(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.SendMessage0(&_MessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.TransferOwnership(&_MessageBusUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.TransferOwnership(&_MessageBusUpgradeable.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) Unpause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Unpause(&_MessageBusUpgradeable.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) Unpause() (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.Unpause(&_MessageBusUpgradeable.TransactOpts) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) UpdateAuthVerifier(opts *bind.TransactOpts, _authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "updateAuthVerifier", _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateAuthVerifier(&_MessageBusUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) UpdateGasFeePricing(opts *bind.TransactOpts, _gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "updateGasFeePricing", _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateGasFeePricing(&_MessageBusUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) UpdateMessageStatus(opts *bind.TransactOpts, _messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "updateMessageStatus", _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateMessageStatus(&_MessageBusUpgradeable.TransactOpts, _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.UpdateMessageStatus(&_MessageBusUpgradeable.TransactOpts, _messageId, _status) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactor) WithdrawGasFees(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.contract.Transact(opts, "withdrawGasFees", to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.WithdrawGasFees(&_MessageBusUpgradeable.TransactOpts, to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_MessageBusUpgradeable *MessageBusUpgradeableTransactorSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _MessageBusUpgradeable.Contract.WithdrawGasFees(&_MessageBusUpgradeable.TransactOpts, to) +} + +// MessageBusUpgradeableCallRevertedIterator is returned from FilterCallReverted and is used to iterate over the raw logs and unpacked data for CallReverted events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableCallRevertedIterator struct { + Event *MessageBusUpgradeableCallReverted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableCallRevertedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableCallRevertedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableCallRevertedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableCallReverted represents a CallReverted event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableCallReverted struct { + Reason string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallReverted is a free log retrieval operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterCallReverted(opts *bind.FilterOpts) (*MessageBusUpgradeableCallRevertedIterator, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return &MessageBusUpgradeableCallRevertedIterator{contract: _MessageBusUpgradeable.contract, event: "CallReverted", logs: logs, sub: sub}, nil +} + +// WatchCallReverted is a free log subscription operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchCallReverted(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableCallReverted) (event.Subscription, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableCallReverted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallReverted is a log parse operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseCallReverted(log types.Log) (*MessageBusUpgradeableCallReverted, error) { + event := new(MessageBusUpgradeableCallReverted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableExecutedIterator is returned from FilterExecuted and is used to iterate over the raw logs and unpacked data for Executed events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableExecutedIterator struct { + Event *MessageBusUpgradeableExecuted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableExecutedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableExecutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableExecuted represents a Executed event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableExecuted struct { + MessageId [32]byte + Status uint8 + DstAddress common.Address + SrcChainId uint64 + SrcNonce uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecuted is a free log retrieval operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterExecuted(opts *bind.FilterOpts, messageId [][32]byte, _dstAddress []common.Address) (*MessageBusUpgradeableExecutedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableExecutedIterator{contract: _MessageBusUpgradeable.contract, event: "Executed", logs: logs, sub: sub}, nil +} + +// WatchExecuted is a free log subscription operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchExecuted(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableExecuted, messageId [][32]byte, _dstAddress []common.Address) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableExecuted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExecuted is a log parse operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseExecuted(log types.Log) (*MessageBusUpgradeableExecuted, error) { + event := new(MessageBusUpgradeableExecuted) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableMessageSentIterator is returned from FilterMessageSent and is used to iterate over the raw logs and unpacked data for MessageSent events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableMessageSentIterator struct { + Event *MessageBusUpgradeableMessageSent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableMessageSentIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableMessageSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableMessageSent represents a MessageSent event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableMessageSent struct { + Sender common.Address + SrcChainID *big.Int + Receiver [32]byte + DstChainId *big.Int + Message []byte + Nonce uint64 + Options []byte + Fee *big.Int + MessageId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMessageSent is a free log retrieval operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterMessageSent(opts *bind.FilterOpts, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (*MessageBusUpgradeableMessageSentIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableMessageSentIterator{contract: _MessageBusUpgradeable.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +// WatchMessageSent is a free log subscription operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableMessageSent, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableMessageSent) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMessageSent is a log parse operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseMessageSent(log types.Log) (*MessageBusUpgradeableMessageSent, error) { + event := new(MessageBusUpgradeableMessageSent) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableOwnershipTransferredIterator struct { + Event *MessageBusUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*MessageBusUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &MessageBusUpgradeableOwnershipTransferredIterator{contract: _MessageBusUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableOwnershipTransferred) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*MessageBusUpgradeableOwnershipTransferred, error) { + event := new(MessageBusUpgradeableOwnershipTransferred) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeablePausedIterator struct { + Event *MessageBusUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeablePaused represents a Paused event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*MessageBusUpgradeablePausedIterator, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &MessageBusUpgradeablePausedIterator{contract: _MessageBusUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeablePaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParsePaused(log types.Log) (*MessageBusUpgradeablePaused, error) { + event := new(MessageBusUpgradeablePaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// MessageBusUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableUnpausedIterator struct { + Event *MessageBusUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *MessageBusUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(MessageBusUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *MessageBusUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *MessageBusUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// MessageBusUpgradeableUnpaused represents a Unpaused event raised by the MessageBusUpgradeable contract. +type MessageBusUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*MessageBusUpgradeableUnpausedIterator, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &MessageBusUpgradeableUnpausedIterator{contract: _MessageBusUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *MessageBusUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _MessageBusUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(MessageBusUpgradeableUnpaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_MessageBusUpgradeable *MessageBusUpgradeableFilterer) ParseUnpaused(log types.Log) (*MessageBusUpgradeableUnpaused, error) { + event := new(MessageBusUpgradeableUnpaused) + if err := _MessageBusUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// OwnableUpgradeableMetaData contains all meta data concerning the OwnableUpgradeable contract. +var OwnableUpgradeableMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "8da5cb5b": "owner()", + "715018a6": "renounceOwnership()", + "f2fde38b": "transferOwnership(address)", + }, +} + +// OwnableUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use OwnableUpgradeableMetaData.ABI instead. +var OwnableUpgradeableABI = OwnableUpgradeableMetaData.ABI + +// Deprecated: Use OwnableUpgradeableMetaData.Sigs instead. +// OwnableUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var OwnableUpgradeableFuncSigs = OwnableUpgradeableMetaData.Sigs + +// OwnableUpgradeable is an auto generated Go binding around an Ethereum contract. +type OwnableUpgradeable struct { + OwnableUpgradeableCaller // Read-only binding to the contract + OwnableUpgradeableTransactor // Write-only binding to the contract + OwnableUpgradeableFilterer // Log filterer for contract events +} + +// OwnableUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type OwnableUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OwnableUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OwnableUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OwnableUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OwnableUpgradeableSession struct { + Contract *OwnableUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OwnableUpgradeableCallerSession struct { + Contract *OwnableUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OwnableUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OwnableUpgradeableTransactorSession struct { + Contract *OwnableUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OwnableUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type OwnableUpgradeableRaw struct { + Contract *OwnableUpgradeable // Generic contract binding to access the raw methods on +} + +// OwnableUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OwnableUpgradeableCallerRaw struct { + Contract *OwnableUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// OwnableUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OwnableUpgradeableTransactorRaw struct { + Contract *OwnableUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOwnableUpgradeable creates a new instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeable(address common.Address, backend bind.ContractBackend) (*OwnableUpgradeable, error) { + contract, err := bindOwnableUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &OwnableUpgradeable{OwnableUpgradeableCaller: OwnableUpgradeableCaller{contract: contract}, OwnableUpgradeableTransactor: OwnableUpgradeableTransactor{contract: contract}, OwnableUpgradeableFilterer: OwnableUpgradeableFilterer{contract: contract}}, nil +} + +// NewOwnableUpgradeableCaller creates a new read-only instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*OwnableUpgradeableCaller, error) { + contract, err := bindOwnableUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OwnableUpgradeableCaller{contract: contract}, nil +} + +// NewOwnableUpgradeableTransactor creates a new write-only instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*OwnableUpgradeableTransactor, error) { + contract, err := bindOwnableUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OwnableUpgradeableTransactor{contract: contract}, nil +} + +// NewOwnableUpgradeableFilterer creates a new log filterer instance of OwnableUpgradeable, bound to a specific deployed contract. +func NewOwnableUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*OwnableUpgradeableFilterer, error) { + contract, err := bindOwnableUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OwnableUpgradeableFilterer{contract: contract}, nil +} + +// bindOwnableUpgradeable binds a generic wrapper to an already deployed contract. +func bindOwnableUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OwnableUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OwnableUpgradeable *OwnableUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OwnableUpgradeable.Contract.OwnableUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OwnableUpgradeable *OwnableUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.OwnableUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableUpgradeable *OwnableUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.OwnableUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_OwnableUpgradeable *OwnableUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _OwnableUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_OwnableUpgradeable *OwnableUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_OwnableUpgradeable *OwnableUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _OwnableUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableSession) Owner() (common.Address, error) { + return _OwnableUpgradeable.Contract.Owner(&_OwnableUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_OwnableUpgradeable *OwnableUpgradeableCallerSession) Owner() (common.Address, error) { + return _OwnableUpgradeable.Contract.Owner(&_OwnableUpgradeable.CallOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _OwnableUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.RenounceOwnership(&_OwnableUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.RenounceOwnership(&_OwnableUpgradeable.TransactOpts) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.TransferOwnership(&_OwnableUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_OwnableUpgradeable *OwnableUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _OwnableUpgradeable.Contract.TransferOwnership(&_OwnableUpgradeable.TransactOpts, newOwner) +} + +// OwnableUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the OwnableUpgradeable contract. +type OwnableUpgradeableOwnershipTransferredIterator struct { + Event *OwnableUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OwnableUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OwnableUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OwnableUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OwnableUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OwnableUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OwnableUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the OwnableUpgradeable contract. +type OwnableUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableUpgradeable *OwnableUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OwnableUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _OwnableUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OwnableUpgradeableOwnershipTransferredIterator{contract: _OwnableUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableUpgradeable *OwnableUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OwnableUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _OwnableUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OwnableUpgradeableOwnershipTransferred) + if err := _OwnableUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_OwnableUpgradeable *OwnableUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*OwnableUpgradeableOwnershipTransferred, error) { + event := new(OwnableUpgradeableOwnershipTransferred) + if err := _OwnableUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// PausableUpgradeableMetaData contains all meta data concerning the PausableUpgradeable contract. +var PausableUpgradeableMetaData = &bind.MetaData{ + 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\"}]", + Sigs: map[string]string{ + "5c975abb": "paused()", + }, +} + +// PausableUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use PausableUpgradeableMetaData.ABI instead. +var PausableUpgradeableABI = PausableUpgradeableMetaData.ABI + +// Deprecated: Use PausableUpgradeableMetaData.Sigs instead. +// PausableUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var PausableUpgradeableFuncSigs = PausableUpgradeableMetaData.Sigs + +// PausableUpgradeable is an auto generated Go binding around an Ethereum contract. +type PausableUpgradeable struct { + PausableUpgradeableCaller // Read-only binding to the contract + PausableUpgradeableTransactor // Write-only binding to the contract + PausableUpgradeableFilterer // Log filterer for contract events +} + +// PausableUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type PausableUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type PausableUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type PausableUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// PausableUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type PausableUpgradeableSession struct { + Contract *PausableUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type PausableUpgradeableCallerSession struct { + Contract *PausableUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// PausableUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type PausableUpgradeableTransactorSession struct { + Contract *PausableUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// PausableUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type PausableUpgradeableRaw struct { + Contract *PausableUpgradeable // Generic contract binding to access the raw methods on +} + +// PausableUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type PausableUpgradeableCallerRaw struct { + Contract *PausableUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// PausableUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type PausableUpgradeableTransactorRaw struct { + Contract *PausableUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewPausableUpgradeable creates a new instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeable(address common.Address, backend bind.ContractBackend) (*PausableUpgradeable, error) { + contract, err := bindPausableUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &PausableUpgradeable{PausableUpgradeableCaller: PausableUpgradeableCaller{contract: contract}, PausableUpgradeableTransactor: PausableUpgradeableTransactor{contract: contract}, PausableUpgradeableFilterer: PausableUpgradeableFilterer{contract: contract}}, nil +} + +// NewPausableUpgradeableCaller creates a new read-only instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*PausableUpgradeableCaller, error) { + contract, err := bindPausableUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &PausableUpgradeableCaller{contract: contract}, nil +} + +// NewPausableUpgradeableTransactor creates a new write-only instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*PausableUpgradeableTransactor, error) { + contract, err := bindPausableUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &PausableUpgradeableTransactor{contract: contract}, nil +} + +// NewPausableUpgradeableFilterer creates a new log filterer instance of PausableUpgradeable, bound to a specific deployed contract. +func NewPausableUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*PausableUpgradeableFilterer, error) { + contract, err := bindPausableUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &PausableUpgradeableFilterer{contract: contract}, nil +} + +// bindPausableUpgradeable binds a generic wrapper to an already deployed contract. +func bindPausableUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(PausableUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_PausableUpgradeable *PausableUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PausableUpgradeable.Contract.PausableUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_PausableUpgradeable *PausableUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.PausableUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PausableUpgradeable *PausableUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.PausableUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_PausableUpgradeable *PausableUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _PausableUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_PausableUpgradeable *PausableUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_PausableUpgradeable *PausableUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _PausableUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableUpgradeable *PausableUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _PausableUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableUpgradeable *PausableUpgradeableSession) Paused() (bool, error) { + return _PausableUpgradeable.Contract.Paused(&_PausableUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_PausableUpgradeable *PausableUpgradeableCallerSession) Paused() (bool, error) { + return _PausableUpgradeable.Contract.Paused(&_PausableUpgradeable.CallOpts) +} + +// PausableUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the PausableUpgradeable contract. +type PausableUpgradeablePausedIterator struct { + Event *PausableUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausableUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUpgradeablePaused represents a Paused event raised by the PausableUpgradeable contract. +type PausableUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*PausableUpgradeablePausedIterator, error) { + + logs, sub, err := _PausableUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &PausableUpgradeablePausedIterator{contract: _PausableUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *PausableUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _PausableUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUpgradeablePaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) ParsePaused(log types.Log) (*PausableUpgradeablePaused, error) { + event := new(PausableUpgradeablePaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// PausableUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the PausableUpgradeable contract. +type PausableUpgradeableUnpausedIterator struct { + Event *PausableUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PausableUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PausableUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PausableUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PausableUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PausableUpgradeableUnpaused represents a Unpaused event raised by the PausableUpgradeable contract. +type PausableUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*PausableUpgradeableUnpausedIterator, error) { + + logs, sub, err := _PausableUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &PausableUpgradeableUnpausedIterator{contract: _PausableUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *PausableUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _PausableUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PausableUpgradeableUnpaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_PausableUpgradeable *PausableUpgradeableFilterer) ParseUnpaused(log types.Log) (*PausableUpgradeableUnpaused, error) { + event := new(PausableUpgradeableUnpaused) + if err := _PausableUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TestMessageBusUpgradeableMetaData contains all meta data concerning the TestMessageBusUpgradeable contract. +var TestMessageBusUpgradeableMetaData = &bind.MetaData{ + 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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.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\":\"addresspayable\",\"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\":\"addresspayable\",\"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\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Sigs: map[string]string{ + "c4087335": "authVerifier()", + "f44d57aa": "computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)", + "5da6d2c4": "estimateFee(uint256,bytes)", + "a1b058d8": "executeMessage(uint256,bytes32,address,uint256,uint256,bytes,bytes32)", + "9af1d35a": "fees()", + "aa70fc0e": "gasFeePricing()", + "25b19fa3": "getExecutedMessage(bytes32)", + "485cc955": "initialize(address,address)", + "affed0e0": "nonce()", + "8da5cb5b": "owner()", + "8456cb59": "pause()", + "5c975abb": "paused()", + "715018a6": "renounceOwnership()", + "205e157b": "rescueGas(address)", + "ac8a4c1b": "sendMessage(bytes32,uint256,bytes,bytes)", + "72177189": "sendMessage(bytes32,uint256,bytes,bytes,address)", + "28cab9af": "testExecuted(bytes32,uint8,address,uint64,uint64)", + "36d09269": "testMessageSent(address,uint256,bytes32,uint256,bytes,uint64,bytes,uint256,bytes32)", + "f2fde38b": "transferOwnership(address)", + "3f4ba83a": "unpause()", + "a5c0edf3": "updateAuthVerifier(address)", + "a66dd384": "updateGasFeePricing(address)", + "9b11079c": "updateMessageStatus(bytes32,uint8)", + "d6b457b9": "withdrawGasFees(address)", + }, + Bin: "0x608060405234801561001057600080fd5b506120e2806100206000396000f3fe60806040526004361061018b5760003560e01c80639af1d35a116100d6578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103ff578063f2fde38b1461041f578063f44d57aa1461043f5761018b565b8063ac8a4c1b146103b5578063affed0e0146103c8578063c4087335146103ea5761018b565b8063a5c0edf3116100b0578063a5c0edf314610360578063a66dd38414610380578063aa70fc0e146103a05761018b565b80639af1d35a1461030b5780639b11079c14610320578063a1b058d8146103405761018b565b80635c975abb11610138578063721771891161011257806372177189146102c15780638456cb59146102d45780638da5cb5b146102e95761018b565b80635c975abb1461025d5780635da6d2c41461027f578063715018a6146102ac5761018b565b806336d092691161016957806336d09269146102085780633f4ba83a14610228578063485cc9551461023d5761018b565b8063205e157b1461019057806325b19fa3146101b257806328cab9af146101e8575b600080fd5b34801561019c57600080fd5b506101b06101ab366004611540565b61045f565b005b3480156101be57600080fd5b506101d26101cd3660046116fc565b61051c565b6040516101df9190611c09565b60405180910390f35b3480156101f457600080fd5b506101b061020336600461173f565b610534565b34801561021457600080fd5b506101b061022336600461159b565b61058e565b34801561023457600080fd5b506101b06105f9565b34801561024957600080fd5b506101b0610258366004611563565b61065c565b34801561026957600080fd5b50610272610738565b6040516101df9190611b9a565b34801561028b57600080fd5b5061029f61029a366004611a0d565b610741565b6040516101df9190611ba5565b3480156102b857600080fd5b506101b0610819565b6101b06102cf36600461181e565b61087c565b3480156102e057600080fd5b506101b0610894565b3480156102f557600080fd5b506102fe6108f5565b6040516101df9190611b24565b34801561031757600080fd5b5061029f610911565b34801561032c57600080fd5b506101b061033b366004611714565b610917565b34801561034c57600080fd5b506101b061035b36600461198b565b6109cb565b34801561036c57600080fd5b506101b061037b366004611540565b610cac565b34801561038c57600080fd5b506101b061039b366004611540565b610d7f565b3480156103ac57600080fd5b506102fe610e52565b6101b06103c336600461179e565b610e6e565b3480156103d457600080fd5b506103dd610eaa565b6040516101df9190611f90565b3480156103f657600080fd5b506102fe610ed2565b34801561040b57600080fd5b506101b061041a366004611540565b610eee565b34801561042b57600080fd5b506101b061043a366004611540565b610f97565b34801561044b57600080fd5b5061029f61045a366004611661565b61102f565b610467611071565b73ffffffffffffffffffffffffffffffffffffffff166104856108f5565b73ffffffffffffffffffffffffffffffffffffffff16146104c15760405162461bcd60e51b81526004016104b890611e14565b60405180910390fd5b600060ca54476104d19190611fbd565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610517573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea6586858560405161057f93929190611c17565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c6040516105e4989796959493929190611f14565b60405180910390a45050505050505050505050565b610601611071565b73ffffffffffffffffffffffffffffffffffffffff1661061f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146106525760405162461bcd60e51b81526004016104b890611e14565b61065a611075565b565b600054610100900460ff166106775760005460ff161561067f565b61067f6110e3565b61069b5760405162461bcd60e51b81526004016104b890611db7565b600054610100900460ff161580156106e3576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6106eb6110f4565b6106f361112b565b6106fc8361115e565b61070582610d38565b801561051757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906107a090889088908890600401611f6d565b602060405180830381600087803b1580156107ba57600080fd5b505af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611973565b9050806108115760405162461bcd60e51b81526004016104b890611cb5565b949350505050565b610821611071565b73ffffffffffffffffffffffffffffffffffffffff1661083f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108725760405162461bcd60e51b81526004016104b890611e14565b61065a6000611185565b61088b878787878787876111fc565b50505050505050565b61089c611071565b73ffffffffffffffffffffffffffffffffffffffff166108ba6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108ed5760405162461bcd60e51b81526004016104b890611e14565b61065a6113cf565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b61091f611071565b73ffffffffffffffffffffffffffffffffffffffff1661093d6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146109705760405162461bcd60e51b81526004016104b890611e14565b600082815260fb60205260409020805482919060ff191660018360028111156109c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6109d3610738565b156109f05760405162461bcd60e51b81526004016104b890611d80565b600081815260fb602052604081205460ff166002811115610a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610a575760405162461bcd60e51b81526004016104b890611e49565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610a8a903390602001611b24565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610ab59190611bf6565b60206040518083038186803b158015610acd57600080fd5b505afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0591906116dc565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610b4a959493929190611bae565b600060405180830381600088803b158015610b6457600080fd5b5087f193505050508015610b76575060015b610bf3573d808015610ba4576040519150601f19603f3d011682016040523d82523d6000602084013e610ba9565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610bd48261142a565b604051610be19190611bf6565b60405180910390a16002915050610bf7565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610c9993929190611c17565b60405180910390a3505050505050505050565b610cb4611071565b73ffffffffffffffffffffffffffffffffffffffff16610cd26108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610d055760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610d385760405162461bcd60e51b81526004016104b890611d49565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d87611071565b73ffffffffffffffffffffffffffffffffffffffff16610da56108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610dd85760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610e0b5760405162461bcd60e51b81526004016104b890611d49565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610e76610738565b15610e935760405162461bcd60e51b81526004016104b890611d80565b610ea2868686868686326111fc565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ef6611071565b73ffffffffffffffffffffffffffffffffffffffff16610f146108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610f475760405162461bcd60e51b81526004016104b890611e14565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610f8d573d6000803e3d6000fd5b5050600060ca5550565b610f9f611071565b73ffffffffffffffffffffffffffffffffffffffff16610fbd6108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610ff05760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff81166110235760405162461bcd60e51b81526004016104b890611cec565b61102c81611185565b50565b60008787878787878760405160200161104e9796959493929190611b45565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b61107d610738565b6110995760405162461bcd60e51b81526004016104b890611c7e565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110cc611071565b6040516110d99190611b24565b60405180910390a1565b60006110ee30611490565b15905090565b600054610100900460ff1661111b5760405162461bcd60e51b81526004016104b890611eb7565b61065a611126611071565b611185565b600054610100900460ff166111525760405162461bcd60e51b81526004016104b890611eb7565b6065805460ff19169055565b600054610100900460ff16610e0b5760405162461bcd60e51b81526004016104b890611eb7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006112066114ce565b9050808714156112285760405162461bcd60e51b81526004016104b890611c47565b6000611235888686610741565b9050803410156112575760405162461bcd60e51b81526004016104b890611e80565b600061128833848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d61102f565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516112f6989796959493929190611f14565b60405180910390a48160ca60008282546113109190611fa5565b909155505060c980546014906113479074010000000000000000000000000000000000000000900467ffffffffffffffff16612004565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156113c35773ffffffffffffffffffffffffffffffffffffffff84166108fc6113998434611fbd565b6040518115909202916000818181858888f193505050501580156113c1573d6000803e3d6000fd5b505b50505050505050505050565b6113d7610738565b156113f45760405162461bcd60e51b81526004016104b890611d80565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110cc611071565b6060604482511015611470575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261052f565b6004820191508180602001905181019061148a91906118b2565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126114e3578182fd5b50813567ffffffffffffffff8111156114fa578182fd5b60208301915083602082850101111561151257600080fd5b9250929050565b80356003811061052f57600080fd5b803567ffffffffffffffff8116811461052f57600080fd5b600060208284031215611551578081fd5b813561155c8161208a565b9392505050565b60008060408385031215611575578081fd5b82356115808161208a565b915060208301356115908161208a565b809150509250929050565b60008060008060008060008060008060006101208c8e0312156115bc578687fd5b6115c68c3561208a565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e013511156115f8578788fd5b6116088e60808f01358f016114d2565b909850965061161960a08e01611528565b95508060c08e0135111561162b578485fd5b5061163c8d60c08e01358e016114d2565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a03121561167b578283fd5b87356116868161208a565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156116bd578283fd5b6116c98a828b016114d2565b989b979a50959850939692959293505050565b6000602082840312156116ed578081fd5b8151801515811461155c578182fd5b60006020828403121561170d578081fd5b5035919050565b60008060408385031215611726578182fd5b8235915061173660208401611519565b90509250929050565b600080600080600060a08688031215611756578081fd5b8535945061176660208701611519565b935060408601356117768161208a565b925061178460608701611528565b915061179260808701611528565b90509295509295909350565b600080600080600080608087890312156117b6578182fd5b8635955060208701359450604087013567ffffffffffffffff808211156117db578384fd5b6117e78a838b016114d2565b909650945060608901359150808211156117ff578384fd5b5061180c89828a016114d2565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611838578081fd5b8735965060208801359550604088013567ffffffffffffffff8082111561185d578283fd5b6118698b838c016114d2565b909750955060608a0135915080821115611881578283fd5b5061188e8a828b016114d2565b90945092505060808801356118a28161208a565b8091505092959891949750929550565b6000602082840312156118c3578081fd5b815167ffffffffffffffff808211156118da578283fd5b818401915084601f8301126118ed578283fd5b8151818111156118ff576118ff61205b565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119415761194161205b565b604052818152838201602001871015611958578485fd5b611969826020830160208701611fd4565b9695505050505050565b600060208284031215611984578081fd5b5051919050565b60008060008060008060008060e0898b0312156119a6578182fd5b883597506020890135965060408901356119bf8161208a565b9550606089013594506080890135935060a089013567ffffffffffffffff8111156119e8578283fd5b6119f48b828c016114d2565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611a21578081fd5b83359250602084013567ffffffffffffffff811115611a3e578182fd5b611a4a868287016114d2565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611ab7816020860160208601611fd4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b20577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611b8d60c083018486611a57565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611bce608083018587611a57565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261155c6020830184611a9f565b6020810161148a8284611ae9565b60608101611c258286611ae9565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611f3460c08301888a611a57565b67ffffffffffffffff871660608401528281036080840152611f57818688611a57565b9150508260a08301529998505050505050505050565b600084825260406020830152611f87604083018486611a57565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611fb857611fb861202c565b500190565b600082821015611fcf57611fcf61202c565b500390565b60005b83811015611fef578181015183820152602001611fd7565b83811115611ffe576000848401525b50505050565b600067ffffffffffffffff808316818114156120225761202261202c565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461102c57600080fdfea2646970667358221220a418715bcbfd5a179f9b7ba89ac37d57a53801d5dd429a861f66e88b2e1b470564736f6c63430008000033", +} + +// TestMessageBusUpgradeableABI is the input ABI used to generate the binding from. +// Deprecated: Use TestMessageBusUpgradeableMetaData.ABI instead. +var TestMessageBusUpgradeableABI = TestMessageBusUpgradeableMetaData.ABI + +// Deprecated: Use TestMessageBusUpgradeableMetaData.Sigs instead. +// TestMessageBusUpgradeableFuncSigs maps the 4-byte function signature to its string representation. +var TestMessageBusUpgradeableFuncSigs = TestMessageBusUpgradeableMetaData.Sigs + +// TestMessageBusUpgradeableBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use TestMessageBusUpgradeableMetaData.Bin instead. +var TestMessageBusUpgradeableBin = TestMessageBusUpgradeableMetaData.Bin + +// DeployTestMessageBusUpgradeable deploys a new Ethereum contract, binding an instance of TestMessageBusUpgradeable to it. +func DeployTestMessageBusUpgradeable(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *TestMessageBusUpgradeable, error) { + parsed, err := TestMessageBusUpgradeableMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(TestMessageBusUpgradeableBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &TestMessageBusUpgradeable{TestMessageBusUpgradeableCaller: TestMessageBusUpgradeableCaller{contract: contract}, TestMessageBusUpgradeableTransactor: TestMessageBusUpgradeableTransactor{contract: contract}, TestMessageBusUpgradeableFilterer: TestMessageBusUpgradeableFilterer{contract: contract}}, nil +} + +// TestMessageBusUpgradeable is an auto generated Go binding around an Ethereum contract. +type TestMessageBusUpgradeable struct { + TestMessageBusUpgradeableCaller // Read-only binding to the contract + TestMessageBusUpgradeableTransactor // Write-only binding to the contract + TestMessageBusUpgradeableFilterer // Log filterer for contract events +} + +// TestMessageBusUpgradeableCaller is an auto generated read-only Go binding around an Ethereum contract. +type TestMessageBusUpgradeableCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestMessageBusUpgradeableTransactor is an auto generated write-only Go binding around an Ethereum contract. +type TestMessageBusUpgradeableTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestMessageBusUpgradeableFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type TestMessageBusUpgradeableFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// TestMessageBusUpgradeableSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type TestMessageBusUpgradeableSession struct { + Contract *TestMessageBusUpgradeable // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TestMessageBusUpgradeableCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type TestMessageBusUpgradeableCallerSession struct { + Contract *TestMessageBusUpgradeableCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// TestMessageBusUpgradeableTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type TestMessageBusUpgradeableTransactorSession struct { + Contract *TestMessageBusUpgradeableTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// TestMessageBusUpgradeableRaw is an auto generated low-level Go binding around an Ethereum contract. +type TestMessageBusUpgradeableRaw struct { + Contract *TestMessageBusUpgradeable // Generic contract binding to access the raw methods on +} + +// TestMessageBusUpgradeableCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type TestMessageBusUpgradeableCallerRaw struct { + Contract *TestMessageBusUpgradeableCaller // Generic read-only contract binding to access the raw methods on +} + +// TestMessageBusUpgradeableTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type TestMessageBusUpgradeableTransactorRaw struct { + Contract *TestMessageBusUpgradeableTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewTestMessageBusUpgradeable creates a new instance of TestMessageBusUpgradeable, bound to a specific deployed contract. +func NewTestMessageBusUpgradeable(address common.Address, backend bind.ContractBackend) (*TestMessageBusUpgradeable, error) { + contract, err := bindTestMessageBusUpgradeable(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeable{TestMessageBusUpgradeableCaller: TestMessageBusUpgradeableCaller{contract: contract}, TestMessageBusUpgradeableTransactor: TestMessageBusUpgradeableTransactor{contract: contract}, TestMessageBusUpgradeableFilterer: TestMessageBusUpgradeableFilterer{contract: contract}}, nil +} + +// NewTestMessageBusUpgradeableCaller creates a new read-only instance of TestMessageBusUpgradeable, bound to a specific deployed contract. +func NewTestMessageBusUpgradeableCaller(address common.Address, caller bind.ContractCaller) (*TestMessageBusUpgradeableCaller, error) { + contract, err := bindTestMessageBusUpgradeable(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableCaller{contract: contract}, nil +} + +// NewTestMessageBusUpgradeableTransactor creates a new write-only instance of TestMessageBusUpgradeable, bound to a specific deployed contract. +func NewTestMessageBusUpgradeableTransactor(address common.Address, transactor bind.ContractTransactor) (*TestMessageBusUpgradeableTransactor, error) { + contract, err := bindTestMessageBusUpgradeable(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableTransactor{contract: contract}, nil +} + +// NewTestMessageBusUpgradeableFilterer creates a new log filterer instance of TestMessageBusUpgradeable, bound to a specific deployed contract. +func NewTestMessageBusUpgradeableFilterer(address common.Address, filterer bind.ContractFilterer) (*TestMessageBusUpgradeableFilterer, error) { + contract, err := bindTestMessageBusUpgradeable(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableFilterer{contract: contract}, nil +} + +// bindTestMessageBusUpgradeable binds a generic wrapper to an already deployed contract. +func bindTestMessageBusUpgradeable(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(TestMessageBusUpgradeableABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TestMessageBusUpgradeable.Contract.TestMessageBusUpgradeableCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestMessageBusUpgradeableTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestMessageBusUpgradeableTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _TestMessageBusUpgradeable.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.contract.Transact(opts, method, params...) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) AuthVerifier(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "authVerifier") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) AuthVerifier() (common.Address, error) { + return _TestMessageBusUpgradeable.Contract.AuthVerifier(&_TestMessageBusUpgradeable.CallOpts) +} + +// AuthVerifier is a free data retrieval call binding the contract method 0xc4087335. +// +// Solidity: function authVerifier() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) AuthVerifier() (common.Address, error) { + return _TestMessageBusUpgradeable.Contract.AuthVerifier(&_TestMessageBusUpgradeable.CallOpts) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) ComputeMessageId(opts *bind.CallOpts, _srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "computeMessageId", _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _TestMessageBusUpgradeable.Contract.ComputeMessageId(&_TestMessageBusUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// ComputeMessageId is a free data retrieval call binding the contract method 0xf44d57aa. +// +// Solidity: function computeMessageId(address _srcAddress, uint256 _srcChainId, bytes32 _dstAddress, uint256 _dstChainId, uint256 _srcNonce, bytes _message) pure returns(bytes32) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) ComputeMessageId(_srcAddress common.Address, _srcChainId *big.Int, _dstAddress [32]byte, _dstChainId *big.Int, _srcNonce *big.Int, _message []byte) ([32]byte, error) { + return _TestMessageBusUpgradeable.Contract.ComputeMessageId(&_TestMessageBusUpgradeable.CallOpts, _srcAddress, _srcChainId, _dstAddress, _dstChainId, _srcNonce, _message) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) Fees(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "fees") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) Fees() (*big.Int, error) { + return _TestMessageBusUpgradeable.Contract.Fees(&_TestMessageBusUpgradeable.CallOpts) +} + +// Fees is a free data retrieval call binding the contract method 0x9af1d35a. +// +// Solidity: function fees() view returns(uint256) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) Fees() (*big.Int, error) { + return _TestMessageBusUpgradeable.Contract.Fees(&_TestMessageBusUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) GasFeePricing(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "gasFeePricing") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) GasFeePricing() (common.Address, error) { + return _TestMessageBusUpgradeable.Contract.GasFeePricing(&_TestMessageBusUpgradeable.CallOpts) +} + +// GasFeePricing is a free data retrieval call binding the contract method 0xaa70fc0e. +// +// Solidity: function gasFeePricing() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) GasFeePricing() (common.Address, error) { + return _TestMessageBusUpgradeable.Contract.GasFeePricing(&_TestMessageBusUpgradeable.CallOpts) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) GetExecutedMessage(opts *bind.CallOpts, _messageId [32]byte) (uint8, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "getExecutedMessage", _messageId) + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _TestMessageBusUpgradeable.Contract.GetExecutedMessage(&_TestMessageBusUpgradeable.CallOpts, _messageId) +} + +// GetExecutedMessage is a free data retrieval call binding the contract method 0x25b19fa3. +// +// Solidity: function getExecutedMessage(bytes32 _messageId) view returns(uint8) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) GetExecutedMessage(_messageId [32]byte) (uint8, error) { + return _TestMessageBusUpgradeable.Contract.GetExecutedMessage(&_TestMessageBusUpgradeable.CallOpts, _messageId) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) Nonce(opts *bind.CallOpts) (uint64, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "nonce") + + if err != nil { + return *new(uint64), err + } + + out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64) + + return out0, err + +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) Nonce() (uint64, error) { + return _TestMessageBusUpgradeable.Contract.Nonce(&_TestMessageBusUpgradeable.CallOpts) +} + +// Nonce is a free data retrieval call binding the contract method 0xaffed0e0. +// +// Solidity: function nonce() view returns(uint64) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) Nonce() (uint64, error) { + return _TestMessageBusUpgradeable.Contract.Nonce(&_TestMessageBusUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) Owner() (common.Address, error) { + return _TestMessageBusUpgradeable.Contract.Owner(&_TestMessageBusUpgradeable.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) Owner() (common.Address, error) { + return _TestMessageBusUpgradeable.Contract.Owner(&_TestMessageBusUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _TestMessageBusUpgradeable.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) Paused() (bool, error) { + return _TestMessageBusUpgradeable.Contract.Paused(&_TestMessageBusUpgradeable.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableCallerSession) Paused() (bool, error) { + return _TestMessageBusUpgradeable.Contract.Paused(&_TestMessageBusUpgradeable.CallOpts) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) EstimateFee(opts *bind.TransactOpts, _dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "estimateFee", _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.EstimateFee(&_TestMessageBusUpgradeable.TransactOpts, _dstChainId, _options) +} + +// EstimateFee is a paid mutator transaction binding the contract method 0x5da6d2c4. +// +// Solidity: function estimateFee(uint256 _dstChainId, bytes _options) returns(uint256) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) EstimateFee(_dstChainId *big.Int, _options []byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.EstimateFee(&_TestMessageBusUpgradeable.TransactOpts, _dstChainId, _options) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) ExecuteMessage(opts *bind.TransactOpts, _srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "executeMessage", _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.ExecuteMessage(&_TestMessageBusUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// ExecuteMessage is a paid mutator transaction binding the contract method 0xa1b058d8. +// +// Solidity: function executeMessage(uint256 _srcChainId, bytes32 _srcAddress, address _dstAddress, uint256 _gasLimit, uint256 _nonce, bytes _message, bytes32 _messageId) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) ExecuteMessage(_srcChainId *big.Int, _srcAddress [32]byte, _dstAddress common.Address, _gasLimit *big.Int, _nonce *big.Int, _message []byte, _messageId [32]byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.ExecuteMessage(&_TestMessageBusUpgradeable.TransactOpts, _srcChainId, _srcAddress, _dstAddress, _gasLimit, _nonce, _message, _messageId) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) Initialize(opts *bind.TransactOpts, _gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "initialize", _gasFeePricing, _authVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) Initialize(_gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.Initialize(&_TestMessageBusUpgradeable.TransactOpts, _gasFeePricing, _authVerifier) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _gasFeePricing, address _authVerifier) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) Initialize(_gasFeePricing common.Address, _authVerifier common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.Initialize(&_TestMessageBusUpgradeable.TransactOpts, _gasFeePricing, _authVerifier) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) Pause() (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.Pause(&_TestMessageBusUpgradeable.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) Pause() (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.Pause(&_TestMessageBusUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) RenounceOwnership() (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.RenounceOwnership(&_TestMessageBusUpgradeable.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.RenounceOwnership(&_TestMessageBusUpgradeable.TransactOpts) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) RescueGas(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "rescueGas", to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.RescueGas(&_TestMessageBusUpgradeable.TransactOpts, to) +} + +// RescueGas is a paid mutator transaction binding the contract method 0x205e157b. +// +// Solidity: function rescueGas(address to) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) RescueGas(to common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.RescueGas(&_TestMessageBusUpgradeable.TransactOpts, to) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) SendMessage(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "sendMessage", _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.SendMessage(&_TestMessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage is a paid mutator transaction binding the contract method 0x72177189. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options, address _refundAddress) payable returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) SendMessage(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte, _refundAddress common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.SendMessage(&_TestMessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options, _refundAddress) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) SendMessage0(opts *bind.TransactOpts, _receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "sendMessage0", _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.SendMessage0(&_TestMessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// SendMessage0 is a paid mutator transaction binding the contract method 0xac8a4c1b. +// +// Solidity: function sendMessage(bytes32 _receiver, uint256 _dstChainId, bytes _message, bytes _options) payable returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) SendMessage0(_receiver [32]byte, _dstChainId *big.Int, _message []byte, _options []byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.SendMessage0(&_TestMessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) +} + +// TestExecuted is a paid mutator transaction binding the contract method 0x28cab9af. +// +// Solidity: function testExecuted(bytes32 messageId, uint8 status, address _dstAddress, uint64 srcChainId, uint64 srcNonce) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) TestExecuted(opts *bind.TransactOpts, messageId [32]byte, status uint8, _dstAddress common.Address, srcChainId uint64, srcNonce uint64) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "testExecuted", messageId, status, _dstAddress, srcChainId, srcNonce) +} + +// TestExecuted is a paid mutator transaction binding the contract method 0x28cab9af. +// +// Solidity: function testExecuted(bytes32 messageId, uint8 status, address _dstAddress, uint64 srcChainId, uint64 srcNonce) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) TestExecuted(messageId [32]byte, status uint8, _dstAddress common.Address, srcChainId uint64, srcNonce uint64) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestExecuted(&_TestMessageBusUpgradeable.TransactOpts, messageId, status, _dstAddress, srcChainId, srcNonce) +} + +// TestExecuted is a paid mutator transaction binding the contract method 0x28cab9af. +// +// Solidity: function testExecuted(bytes32 messageId, uint8 status, address _dstAddress, uint64 srcChainId, uint64 srcNonce) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) TestExecuted(messageId [32]byte, status uint8, _dstAddress common.Address, srcChainId uint64, srcNonce uint64) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestExecuted(&_TestMessageBusUpgradeable.TransactOpts, messageId, status, _dstAddress, srcChainId, srcNonce) +} + +// TestMessageSent is a paid mutator transaction binding the contract method 0x36d09269. +// +// Solidity: function testMessageSent(address sender, uint256 srcChainID, bytes32 receiver, uint256 dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 messageId) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) TestMessageSent(opts *bind.TransactOpts, sender common.Address, srcChainID *big.Int, receiver [32]byte, dstChainId *big.Int, message []byte, nonce uint64, options []byte, fee *big.Int, messageId [32]byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "testMessageSent", sender, srcChainID, receiver, dstChainId, message, nonce, options, fee, messageId) +} + +// TestMessageSent is a paid mutator transaction binding the contract method 0x36d09269. +// +// Solidity: function testMessageSent(address sender, uint256 srcChainID, bytes32 receiver, uint256 dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 messageId) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) TestMessageSent(sender common.Address, srcChainID *big.Int, receiver [32]byte, dstChainId *big.Int, message []byte, nonce uint64, options []byte, fee *big.Int, messageId [32]byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestMessageSent(&_TestMessageBusUpgradeable.TransactOpts, sender, srcChainID, receiver, dstChainId, message, nonce, options, fee, messageId) +} + +// TestMessageSent is a paid mutator transaction binding the contract method 0x36d09269. +// +// Solidity: function testMessageSent(address sender, uint256 srcChainID, bytes32 receiver, uint256 dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 messageId) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) TestMessageSent(sender common.Address, srcChainID *big.Int, receiver [32]byte, dstChainId *big.Int, message []byte, nonce uint64, options []byte, fee *big.Int, messageId [32]byte) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestMessageSent(&_TestMessageBusUpgradeable.TransactOpts, sender, srcChainID, receiver, dstChainId, message, nonce, options, fee, messageId) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TransferOwnership(&_TestMessageBusUpgradeable.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TransferOwnership(&_TestMessageBusUpgradeable.TransactOpts, newOwner) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) Unpause() (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.Unpause(&_TestMessageBusUpgradeable.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) Unpause() (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.Unpause(&_TestMessageBusUpgradeable.TransactOpts) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) UpdateAuthVerifier(opts *bind.TransactOpts, _authVerifier common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "updateAuthVerifier", _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.UpdateAuthVerifier(&_TestMessageBusUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateAuthVerifier is a paid mutator transaction binding the contract method 0xa5c0edf3. +// +// Solidity: function updateAuthVerifier(address _authVerifier) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) UpdateAuthVerifier(_authVerifier common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.UpdateAuthVerifier(&_TestMessageBusUpgradeable.TransactOpts, _authVerifier) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) UpdateGasFeePricing(opts *bind.TransactOpts, _gasFeePricing common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "updateGasFeePricing", _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.UpdateGasFeePricing(&_TestMessageBusUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateGasFeePricing is a paid mutator transaction binding the contract method 0xa66dd384. +// +// Solidity: function updateGasFeePricing(address _gasFeePricing) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) UpdateGasFeePricing(_gasFeePricing common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.UpdateGasFeePricing(&_TestMessageBusUpgradeable.TransactOpts, _gasFeePricing) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) UpdateMessageStatus(opts *bind.TransactOpts, _messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "updateMessageStatus", _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.UpdateMessageStatus(&_TestMessageBusUpgradeable.TransactOpts, _messageId, _status) +} + +// UpdateMessageStatus is a paid mutator transaction binding the contract method 0x9b11079c. +// +// Solidity: function updateMessageStatus(bytes32 _messageId, uint8 _status) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) UpdateMessageStatus(_messageId [32]byte, _status uint8) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.UpdateMessageStatus(&_TestMessageBusUpgradeable.TransactOpts, _messageId, _status) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) WithdrawGasFees(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "withdrawGasFees", to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.WithdrawGasFees(&_TestMessageBusUpgradeable.TransactOpts, to) +} + +// WithdrawGasFees is a paid mutator transaction binding the contract method 0xd6b457b9. +// +// Solidity: function withdrawGasFees(address to) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) WithdrawGasFees(to common.Address) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.WithdrawGasFees(&_TestMessageBusUpgradeable.TransactOpts, to) +} + +// TestMessageBusUpgradeableCallRevertedIterator is returned from FilterCallReverted and is used to iterate over the raw logs and unpacked data for CallReverted events raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableCallRevertedIterator struct { + Event *TestMessageBusUpgradeableCallReverted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TestMessageBusUpgradeableCallRevertedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableCallReverted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TestMessageBusUpgradeableCallRevertedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestMessageBusUpgradeableCallRevertedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestMessageBusUpgradeableCallReverted represents a CallReverted event raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableCallReverted struct { + Reason string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCallReverted is a free log retrieval operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) FilterCallReverted(opts *bind.FilterOpts) (*TestMessageBusUpgradeableCallRevertedIterator, error) { + + logs, sub, err := _TestMessageBusUpgradeable.contract.FilterLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableCallRevertedIterator{contract: _TestMessageBusUpgradeable.contract, event: "CallReverted", logs: logs, sub: sub}, nil +} + +// WatchCallReverted is a free log subscription operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) WatchCallReverted(opts *bind.WatchOpts, sink chan<- *TestMessageBusUpgradeableCallReverted) (event.Subscription, error) { + + logs, sub, err := _TestMessageBusUpgradeable.contract.WatchLogs(opts, "CallReverted") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TestMessageBusUpgradeableCallReverted) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCallReverted is a log parse operation binding the contract event 0xffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f. +// +// Solidity: event CallReverted(string reason) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) ParseCallReverted(log types.Log) (*TestMessageBusUpgradeableCallReverted, error) { + event := new(TestMessageBusUpgradeableCallReverted) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "CallReverted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TestMessageBusUpgradeableExecutedIterator is returned from FilterExecuted and is used to iterate over the raw logs and unpacked data for Executed events raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableExecutedIterator struct { + Event *TestMessageBusUpgradeableExecuted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TestMessageBusUpgradeableExecutedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableExecuted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TestMessageBusUpgradeableExecutedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestMessageBusUpgradeableExecutedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestMessageBusUpgradeableExecuted represents a Executed event raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableExecuted struct { + MessageId [32]byte + Status uint8 + DstAddress common.Address + SrcChainId uint64 + SrcNonce uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterExecuted is a free log retrieval operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) FilterExecuted(opts *bind.FilterOpts, messageId [][32]byte, _dstAddress []common.Address) (*TestMessageBusUpgradeableExecutedIterator, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _TestMessageBusUpgradeable.contract.FilterLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableExecutedIterator{contract: _TestMessageBusUpgradeable.contract, event: "Executed", logs: logs, sub: sub}, nil +} + +// WatchExecuted is a free log subscription operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) WatchExecuted(opts *bind.WatchOpts, sink chan<- *TestMessageBusUpgradeableExecuted, messageId [][32]byte, _dstAddress []common.Address) (event.Subscription, error) { + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + var _dstAddressRule []interface{} + for _, _dstAddressItem := range _dstAddress { + _dstAddressRule = append(_dstAddressRule, _dstAddressItem) + } + + logs, sub, err := _TestMessageBusUpgradeable.contract.WatchLogs(opts, "Executed", messageIdRule, _dstAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TestMessageBusUpgradeableExecuted) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseExecuted is a log parse operation binding the contract event 0x04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65. +// +// Solidity: event Executed(bytes32 indexed messageId, uint8 status, address indexed _dstAddress, uint64 srcChainId, uint64 srcNonce) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) ParseExecuted(log types.Log) (*TestMessageBusUpgradeableExecuted, error) { + event := new(TestMessageBusUpgradeableExecuted) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "Executed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TestMessageBusUpgradeableMessageSentIterator is returned from FilterMessageSent and is used to iterate over the raw logs and unpacked data for MessageSent events raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableMessageSentIterator struct { + Event *TestMessageBusUpgradeableMessageSent // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TestMessageBusUpgradeableMessageSentIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableMessageSent) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TestMessageBusUpgradeableMessageSentIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestMessageBusUpgradeableMessageSentIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestMessageBusUpgradeableMessageSent represents a MessageSent event raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableMessageSent struct { + Sender common.Address + SrcChainID *big.Int + Receiver [32]byte + DstChainId *big.Int + Message []byte + Nonce uint64 + Options []byte + Fee *big.Int + MessageId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterMessageSent is a free log retrieval operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) FilterMessageSent(opts *bind.FilterOpts, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (*TestMessageBusUpgradeableMessageSentIterator, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _TestMessageBusUpgradeable.contract.FilterLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableMessageSentIterator{contract: _TestMessageBusUpgradeable.contract, event: "MessageSent", logs: logs, sub: sub}, nil +} + +// WatchMessageSent is a free log subscription operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) WatchMessageSent(opts *bind.WatchOpts, sink chan<- *TestMessageBusUpgradeableMessageSent, sender []common.Address, dstChainId []*big.Int, messageId [][32]byte) (event.Subscription, error) { + + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + var dstChainIdRule []interface{} + for _, dstChainIdItem := range dstChainId { + dstChainIdRule = append(dstChainIdRule, dstChainIdItem) + } + + var messageIdRule []interface{} + for _, messageIdItem := range messageId { + messageIdRule = append(messageIdRule, messageIdItem) + } + + logs, sub, err := _TestMessageBusUpgradeable.contract.WatchLogs(opts, "MessageSent", senderRule, dstChainIdRule, messageIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TestMessageBusUpgradeableMessageSent) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseMessageSent is a log parse operation binding the contract event 0x864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a. +// +// Solidity: event MessageSent(address indexed sender, uint256 srcChainID, bytes32 receiver, uint256 indexed dstChainId, bytes message, uint64 nonce, bytes options, uint256 fee, bytes32 indexed messageId) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) ParseMessageSent(log types.Log) (*TestMessageBusUpgradeableMessageSent, error) { + event := new(TestMessageBusUpgradeableMessageSent) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "MessageSent", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TestMessageBusUpgradeableOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableOwnershipTransferredIterator struct { + Event *TestMessageBusUpgradeableOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TestMessageBusUpgradeableOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TestMessageBusUpgradeableOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestMessageBusUpgradeableOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestMessageBusUpgradeableOwnershipTransferred represents a OwnershipTransferred event raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*TestMessageBusUpgradeableOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TestMessageBusUpgradeable.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableOwnershipTransferredIterator{contract: _TestMessageBusUpgradeable.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *TestMessageBusUpgradeableOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _TestMessageBusUpgradeable.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TestMessageBusUpgradeableOwnershipTransferred) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) ParseOwnershipTransferred(log types.Log) (*TestMessageBusUpgradeableOwnershipTransferred, error) { + event := new(TestMessageBusUpgradeableOwnershipTransferred) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TestMessageBusUpgradeablePausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeablePausedIterator struct { + Event *TestMessageBusUpgradeablePaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TestMessageBusUpgradeablePausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeablePaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TestMessageBusUpgradeablePausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestMessageBusUpgradeablePausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestMessageBusUpgradeablePaused represents a Paused event raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeablePaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) FilterPaused(opts *bind.FilterOpts) (*TestMessageBusUpgradeablePausedIterator, error) { + + logs, sub, err := _TestMessageBusUpgradeable.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeablePausedIterator{contract: _TestMessageBusUpgradeable.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *TestMessageBusUpgradeablePaused) (event.Subscription, error) { + + logs, sub, err := _TestMessageBusUpgradeable.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TestMessageBusUpgradeablePaused) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) ParsePaused(log types.Log) (*TestMessageBusUpgradeablePaused, error) { + event := new(TestMessageBusUpgradeablePaused) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// TestMessageBusUpgradeableUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableUnpausedIterator struct { + Event *TestMessageBusUpgradeableUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *TestMessageBusUpgradeableUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(TestMessageBusUpgradeableUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *TestMessageBusUpgradeableUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *TestMessageBusUpgradeableUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// TestMessageBusUpgradeableUnpaused represents a Unpaused event raised by the TestMessageBusUpgradeable contract. +type TestMessageBusUpgradeableUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) FilterUnpaused(opts *bind.FilterOpts) (*TestMessageBusUpgradeableUnpausedIterator, error) { + + logs, sub, err := _TestMessageBusUpgradeable.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &TestMessageBusUpgradeableUnpausedIterator{contract: _TestMessageBusUpgradeable.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *TestMessageBusUpgradeableUnpaused) (event.Subscription, error) { + + logs, sub, err := _TestMessageBusUpgradeable.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(TestMessageBusUpgradeableUnpaused) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableFilterer) ParseUnpaused(log types.Log) (*TestMessageBusUpgradeableUnpaused, error) { + event := new(TestMessageBusUpgradeableUnpaused) + if err := _TestMessageBusUpgradeable.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/services/explorer/contracts/message/testmessage/testmessage.contractinfo.json b/services/explorer/contracts/message/testmessage/testmessage.contractinfo.json new file mode 100644 index 0000000000..cae28e8181 --- /dev/null +++ b/services/explorer/contracts/message/testmessage/testmessage.contractinfo.json @@ -0,0 +1 @@ +{"/solidity/TestMessageBusUpgradeable.sol:AddressUpgradeable":{"code":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122018ebd85d3533f626170919b4bbf40d12c72e02e2add596be4439050eeb00bae464736f6c63430008000033","runtime-code":"0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122018ebd85d3533f626170919b4bbf40d12c72e02e2add596be4439050eeb00bae464736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"version\":1}"},"hashes":{}},"/solidity/TestMessageBusUpgradeable.sol:MessageBusReceiverUpgradeable":{"code":"0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220034ca05f6f48abb9ca3ea109f6613964ac8c188902f712ae0a8c2f19af9a501f64736f6c63430008000033","runtime-code":"0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220034ca05f6f48abb9ca3ea109f6613964ac8c188902f712ae0a8c2f19af9a501f64736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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":"0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212202d3dbd32378d2f49d296babf01ce4c62d300f205ee86baf51e535a8613e9648264736f6c63430008000033","runtime-code":"0x6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212202d3dbd32378d2f49d296babf01ce4c62d300f205ee86baf51e535a8613e9648264736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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":"0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea264697066735822122067372238d920e9724cf8967ebf7f7fa47665c686fd5e59f70acf4931e9ab800464736f6c63430008000033","runtime-code":"0x6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea264697066735822122067372238d920e9724cf8967ebf7f7fa47665c686fd5e59f70acf4931e9ab800464736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"version\":1}"},"hashes":{"paused()":"5c975abb"}},"/solidity/TestMessageBusUpgradeable.sol:TestMessageBusUpgradeable":{"code":"0x608060405234801561001057600080fd5b506120e2806100206000396000f3fe60806040526004361061018b5760003560e01c80639af1d35a116100d6578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103ff578063f2fde38b1461041f578063f44d57aa1461043f5761018b565b8063ac8a4c1b146103b5578063affed0e0146103c8578063c4087335146103ea5761018b565b8063a5c0edf3116100b0578063a5c0edf314610360578063a66dd38414610380578063aa70fc0e146103a05761018b565b80639af1d35a1461030b5780639b11079c14610320578063a1b058d8146103405761018b565b80635c975abb11610138578063721771891161011257806372177189146102c15780638456cb59146102d45780638da5cb5b146102e95761018b565b80635c975abb1461025d5780635da6d2c41461027f578063715018a6146102ac5761018b565b806336d092691161016957806336d09269146102085780633f4ba83a14610228578063485cc9551461023d5761018b565b8063205e157b1461019057806325b19fa3146101b257806328cab9af146101e8575b600080fd5b34801561019c57600080fd5b506101b06101ab366004611540565b61045f565b005b3480156101be57600080fd5b506101d26101cd3660046116fc565b61051c565b6040516101df9190611c09565b60405180910390f35b3480156101f457600080fd5b506101b061020336600461173f565b610534565b34801561021457600080fd5b506101b061022336600461159b565b61058e565b34801561023457600080fd5b506101b06105f9565b34801561024957600080fd5b506101b0610258366004611563565b61065c565b34801561026957600080fd5b50610272610738565b6040516101df9190611b9a565b34801561028b57600080fd5b5061029f61029a366004611a0d565b610741565b6040516101df9190611ba5565b3480156102b857600080fd5b506101b0610819565b6101b06102cf36600461181e565b61087c565b3480156102e057600080fd5b506101b0610894565b3480156102f557600080fd5b506102fe6108f5565b6040516101df9190611b24565b34801561031757600080fd5b5061029f610911565b34801561032c57600080fd5b506101b061033b366004611714565b610917565b34801561034c57600080fd5b506101b061035b36600461198b565b6109cb565b34801561036c57600080fd5b506101b061037b366004611540565b610cac565b34801561038c57600080fd5b506101b061039b366004611540565b610d7f565b3480156103ac57600080fd5b506102fe610e52565b6101b06103c336600461179e565b610e6e565b3480156103d457600080fd5b506103dd610eaa565b6040516101df9190611f90565b3480156103f657600080fd5b506102fe610ed2565b34801561040b57600080fd5b506101b061041a366004611540565b610eee565b34801561042b57600080fd5b506101b061043a366004611540565b610f97565b34801561044b57600080fd5b5061029f61045a366004611661565b61102f565b610467611071565b73ffffffffffffffffffffffffffffffffffffffff166104856108f5565b73ffffffffffffffffffffffffffffffffffffffff16146104c15760405162461bcd60e51b81526004016104b890611e14565b60405180910390fd5b600060ca54476104d19190611fbd565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610517573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea6586858560405161057f93929190611c17565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c6040516105e4989796959493929190611f14565b60405180910390a45050505050505050505050565b610601611071565b73ffffffffffffffffffffffffffffffffffffffff1661061f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146106525760405162461bcd60e51b81526004016104b890611e14565b61065a611075565b565b600054610100900460ff166106775760005460ff161561067f565b61067f6110e3565b61069b5760405162461bcd60e51b81526004016104b890611db7565b600054610100900460ff161580156106e3576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6106eb6110f4565b6106f361112b565b6106fc8361115e565b61070582610d38565b801561051757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906107a090889088908890600401611f6d565b602060405180830381600087803b1580156107ba57600080fd5b505af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611973565b9050806108115760405162461bcd60e51b81526004016104b890611cb5565b949350505050565b610821611071565b73ffffffffffffffffffffffffffffffffffffffff1661083f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108725760405162461bcd60e51b81526004016104b890611e14565b61065a6000611185565b61088b878787878787876111fc565b50505050505050565b61089c611071565b73ffffffffffffffffffffffffffffffffffffffff166108ba6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108ed5760405162461bcd60e51b81526004016104b890611e14565b61065a6113cf565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b61091f611071565b73ffffffffffffffffffffffffffffffffffffffff1661093d6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146109705760405162461bcd60e51b81526004016104b890611e14565b600082815260fb60205260409020805482919060ff191660018360028111156109c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6109d3610738565b156109f05760405162461bcd60e51b81526004016104b890611d80565b600081815260fb602052604081205460ff166002811115610a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610a575760405162461bcd60e51b81526004016104b890611e49565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610a8a903390602001611b24565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610ab59190611bf6565b60206040518083038186803b158015610acd57600080fd5b505afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0591906116dc565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610b4a959493929190611bae565b600060405180830381600088803b158015610b6457600080fd5b5087f193505050508015610b76575060015b610bf3573d808015610ba4576040519150601f19603f3d011682016040523d82523d6000602084013e610ba9565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610bd48261142a565b604051610be19190611bf6565b60405180910390a16002915050610bf7565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610c9993929190611c17565b60405180910390a3505050505050505050565b610cb4611071565b73ffffffffffffffffffffffffffffffffffffffff16610cd26108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610d055760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610d385760405162461bcd60e51b81526004016104b890611d49565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d87611071565b73ffffffffffffffffffffffffffffffffffffffff16610da56108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610dd85760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610e0b5760405162461bcd60e51b81526004016104b890611d49565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610e76610738565b15610e935760405162461bcd60e51b81526004016104b890611d80565b610ea2868686868686326111fc565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ef6611071565b73ffffffffffffffffffffffffffffffffffffffff16610f146108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610f475760405162461bcd60e51b81526004016104b890611e14565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610f8d573d6000803e3d6000fd5b5050600060ca5550565b610f9f611071565b73ffffffffffffffffffffffffffffffffffffffff16610fbd6108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610ff05760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff81166110235760405162461bcd60e51b81526004016104b890611cec565b61102c81611185565b50565b60008787878787878760405160200161104e9796959493929190611b45565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b61107d610738565b6110995760405162461bcd60e51b81526004016104b890611c7e565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110cc611071565b6040516110d99190611b24565b60405180910390a1565b60006110ee30611490565b15905090565b600054610100900460ff1661111b5760405162461bcd60e51b81526004016104b890611eb7565b61065a611126611071565b611185565b600054610100900460ff166111525760405162461bcd60e51b81526004016104b890611eb7565b6065805460ff19169055565b600054610100900460ff16610e0b5760405162461bcd60e51b81526004016104b890611eb7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006112066114ce565b9050808714156112285760405162461bcd60e51b81526004016104b890611c47565b6000611235888686610741565b9050803410156112575760405162461bcd60e51b81526004016104b890611e80565b600061128833848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d61102f565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516112f6989796959493929190611f14565b60405180910390a48160ca60008282546113109190611fa5565b909155505060c980546014906113479074010000000000000000000000000000000000000000900467ffffffffffffffff16612004565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156113c35773ffffffffffffffffffffffffffffffffffffffff84166108fc6113998434611fbd565b6040518115909202916000818181858888f193505050501580156113c1573d6000803e3d6000fd5b505b50505050505050505050565b6113d7610738565b156113f45760405162461bcd60e51b81526004016104b890611d80565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110cc611071565b6060604482511015611470575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261052f565b6004820191508180602001905181019061148a91906118b2565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126114e3578182fd5b50813567ffffffffffffffff8111156114fa578182fd5b60208301915083602082850101111561151257600080fd5b9250929050565b80356003811061052f57600080fd5b803567ffffffffffffffff8116811461052f57600080fd5b600060208284031215611551578081fd5b813561155c8161208a565b9392505050565b60008060408385031215611575578081fd5b82356115808161208a565b915060208301356115908161208a565b809150509250929050565b60008060008060008060008060008060006101208c8e0312156115bc578687fd5b6115c68c3561208a565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e013511156115f8578788fd5b6116088e60808f01358f016114d2565b909850965061161960a08e01611528565b95508060c08e0135111561162b578485fd5b5061163c8d60c08e01358e016114d2565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a03121561167b578283fd5b87356116868161208a565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156116bd578283fd5b6116c98a828b016114d2565b989b979a50959850939692959293505050565b6000602082840312156116ed578081fd5b8151801515811461155c578182fd5b60006020828403121561170d578081fd5b5035919050565b60008060408385031215611726578182fd5b8235915061173660208401611519565b90509250929050565b600080600080600060a08688031215611756578081fd5b8535945061176660208701611519565b935060408601356117768161208a565b925061178460608701611528565b915061179260808701611528565b90509295509295909350565b600080600080600080608087890312156117b6578182fd5b8635955060208701359450604087013567ffffffffffffffff808211156117db578384fd5b6117e78a838b016114d2565b909650945060608901359150808211156117ff578384fd5b5061180c89828a016114d2565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611838578081fd5b8735965060208801359550604088013567ffffffffffffffff8082111561185d578283fd5b6118698b838c016114d2565b909750955060608a0135915080821115611881578283fd5b5061188e8a828b016114d2565b90945092505060808801356118a28161208a565b8091505092959891949750929550565b6000602082840312156118c3578081fd5b815167ffffffffffffffff808211156118da578283fd5b818401915084601f8301126118ed578283fd5b8151818111156118ff576118ff61205b565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119415761194161205b565b604052818152838201602001871015611958578485fd5b611969826020830160208701611fd4565b9695505050505050565b600060208284031215611984578081fd5b5051919050565b60008060008060008060008060e0898b0312156119a6578182fd5b883597506020890135965060408901356119bf8161208a565b9550606089013594506080890135935060a089013567ffffffffffffffff8111156119e8578283fd5b6119f48b828c016114d2565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611a21578081fd5b83359250602084013567ffffffffffffffff811115611a3e578182fd5b611a4a868287016114d2565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611ab7816020860160208601611fd4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b20577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611b8d60c083018486611a57565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611bce608083018587611a57565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261155c6020830184611a9f565b6020810161148a8284611ae9565b60608101611c258286611ae9565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611f3460c08301888a611a57565b67ffffffffffffffff871660608401528281036080840152611f57818688611a57565b9150508260a08301529998505050505050505050565b600084825260406020830152611f87604083018486611a57565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611fb857611fb861202c565b500190565b600082821015611fcf57611fcf61202c565b500390565b60005b83811015611fef578181015183820152602001611fd7565b83811115611ffe576000848401525b50505050565b600067ffffffffffffffff808316818114156120225761202261202c565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461102c57600080fdfea2646970667358221220a418715bcbfd5a179f9b7ba89ac37d57a53801d5dd429a861f66e88b2e1b470564736f6c63430008000033","runtime-code":"0x60806040526004361061018b5760003560e01c80639af1d35a116100d6578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103ff578063f2fde38b1461041f578063f44d57aa1461043f5761018b565b8063ac8a4c1b146103b5578063affed0e0146103c8578063c4087335146103ea5761018b565b8063a5c0edf3116100b0578063a5c0edf314610360578063a66dd38414610380578063aa70fc0e146103a05761018b565b80639af1d35a1461030b5780639b11079c14610320578063a1b058d8146103405761018b565b80635c975abb11610138578063721771891161011257806372177189146102c15780638456cb59146102d45780638da5cb5b146102e95761018b565b80635c975abb1461025d5780635da6d2c41461027f578063715018a6146102ac5761018b565b806336d092691161016957806336d09269146102085780633f4ba83a14610228578063485cc9551461023d5761018b565b8063205e157b1461019057806325b19fa3146101b257806328cab9af146101e8575b600080fd5b34801561019c57600080fd5b506101b06101ab366004611540565b61045f565b005b3480156101be57600080fd5b506101d26101cd3660046116fc565b61051c565b6040516101df9190611c09565b60405180910390f35b3480156101f457600080fd5b506101b061020336600461173f565b610534565b34801561021457600080fd5b506101b061022336600461159b565b61058e565b34801561023457600080fd5b506101b06105f9565b34801561024957600080fd5b506101b0610258366004611563565b61065c565b34801561026957600080fd5b50610272610738565b6040516101df9190611b9a565b34801561028b57600080fd5b5061029f61029a366004611a0d565b610741565b6040516101df9190611ba5565b3480156102b857600080fd5b506101b0610819565b6101b06102cf36600461181e565b61087c565b3480156102e057600080fd5b506101b0610894565b3480156102f557600080fd5b506102fe6108f5565b6040516101df9190611b24565b34801561031757600080fd5b5061029f610911565b34801561032c57600080fd5b506101b061033b366004611714565b610917565b34801561034c57600080fd5b506101b061035b36600461198b565b6109cb565b34801561036c57600080fd5b506101b061037b366004611540565b610cac565b34801561038c57600080fd5b506101b061039b366004611540565b610d7f565b3480156103ac57600080fd5b506102fe610e52565b6101b06103c336600461179e565b610e6e565b3480156103d457600080fd5b506103dd610eaa565b6040516101df9190611f90565b3480156103f657600080fd5b506102fe610ed2565b34801561040b57600080fd5b506101b061041a366004611540565b610eee565b34801561042b57600080fd5b506101b061043a366004611540565b610f97565b34801561044b57600080fd5b5061029f61045a366004611661565b61102f565b610467611071565b73ffffffffffffffffffffffffffffffffffffffff166104856108f5565b73ffffffffffffffffffffffffffffffffffffffff16146104c15760405162461bcd60e51b81526004016104b890611e14565b60405180910390fd5b600060ca54476104d19190611fbd565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610517573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea6586858560405161057f93929190611c17565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c6040516105e4989796959493929190611f14565b60405180910390a45050505050505050505050565b610601611071565b73ffffffffffffffffffffffffffffffffffffffff1661061f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146106525760405162461bcd60e51b81526004016104b890611e14565b61065a611075565b565b600054610100900460ff166106775760005460ff161561067f565b61067f6110e3565b61069b5760405162461bcd60e51b81526004016104b890611db7565b600054610100900460ff161580156106e3576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6106eb6110f4565b6106f361112b565b6106fc8361115e565b61070582610d38565b801561051757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906107a090889088908890600401611f6d565b602060405180830381600087803b1580156107ba57600080fd5b505af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611973565b9050806108115760405162461bcd60e51b81526004016104b890611cb5565b949350505050565b610821611071565b73ffffffffffffffffffffffffffffffffffffffff1661083f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108725760405162461bcd60e51b81526004016104b890611e14565b61065a6000611185565b61088b878787878787876111fc565b50505050505050565b61089c611071565b73ffffffffffffffffffffffffffffffffffffffff166108ba6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108ed5760405162461bcd60e51b81526004016104b890611e14565b61065a6113cf565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b61091f611071565b73ffffffffffffffffffffffffffffffffffffffff1661093d6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146109705760405162461bcd60e51b81526004016104b890611e14565b600082815260fb60205260409020805482919060ff191660018360028111156109c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6109d3610738565b156109f05760405162461bcd60e51b81526004016104b890611d80565b600081815260fb602052604081205460ff166002811115610a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610a575760405162461bcd60e51b81526004016104b890611e49565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610a8a903390602001611b24565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610ab59190611bf6565b60206040518083038186803b158015610acd57600080fd5b505afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0591906116dc565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610b4a959493929190611bae565b600060405180830381600088803b158015610b6457600080fd5b5087f193505050508015610b76575060015b610bf3573d808015610ba4576040519150601f19603f3d011682016040523d82523d6000602084013e610ba9565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610bd48261142a565b604051610be19190611bf6565b60405180910390a16002915050610bf7565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610c9993929190611c17565b60405180910390a3505050505050505050565b610cb4611071565b73ffffffffffffffffffffffffffffffffffffffff16610cd26108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610d055760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610d385760405162461bcd60e51b81526004016104b890611d49565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d87611071565b73ffffffffffffffffffffffffffffffffffffffff16610da56108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610dd85760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610e0b5760405162461bcd60e51b81526004016104b890611d49565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610e76610738565b15610e935760405162461bcd60e51b81526004016104b890611d80565b610ea2868686868686326111fc565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ef6611071565b73ffffffffffffffffffffffffffffffffffffffff16610f146108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610f475760405162461bcd60e51b81526004016104b890611e14565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610f8d573d6000803e3d6000fd5b5050600060ca5550565b610f9f611071565b73ffffffffffffffffffffffffffffffffffffffff16610fbd6108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610ff05760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff81166110235760405162461bcd60e51b81526004016104b890611cec565b61102c81611185565b50565b60008787878787878760405160200161104e9796959493929190611b45565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b61107d610738565b6110995760405162461bcd60e51b81526004016104b890611c7e565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110cc611071565b6040516110d99190611b24565b60405180910390a1565b60006110ee30611490565b15905090565b600054610100900460ff1661111b5760405162461bcd60e51b81526004016104b890611eb7565b61065a611126611071565b611185565b600054610100900460ff166111525760405162461bcd60e51b81526004016104b890611eb7565b6065805460ff19169055565b600054610100900460ff16610e0b5760405162461bcd60e51b81526004016104b890611eb7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006112066114ce565b9050808714156112285760405162461bcd60e51b81526004016104b890611c47565b6000611235888686610741565b9050803410156112575760405162461bcd60e51b81526004016104b890611e80565b600061128833848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d61102f565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516112f6989796959493929190611f14565b60405180910390a48160ca60008282546113109190611fa5565b909155505060c980546014906113479074010000000000000000000000000000000000000000900467ffffffffffffffff16612004565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156113c35773ffffffffffffffffffffffffffffffffffffffff84166108fc6113998434611fbd565b6040518115909202916000818181858888f193505050501580156113c1573d6000803e3d6000fd5b505b50505050505050505050565b6113d7610738565b156113f45760405162461bcd60e51b81526004016104b890611d80565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110cc611071565b6060604482511015611470575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261052f565b6004820191508180602001905181019061148a91906118b2565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126114e3578182fd5b50813567ffffffffffffffff8111156114fa578182fd5b60208301915083602082850101111561151257600080fd5b9250929050565b80356003811061052f57600080fd5b803567ffffffffffffffff8116811461052f57600080fd5b600060208284031215611551578081fd5b813561155c8161208a565b9392505050565b60008060408385031215611575578081fd5b82356115808161208a565b915060208301356115908161208a565b809150509250929050565b60008060008060008060008060008060006101208c8e0312156115bc578687fd5b6115c68c3561208a565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e013511156115f8578788fd5b6116088e60808f01358f016114d2565b909850965061161960a08e01611528565b95508060c08e0135111561162b578485fd5b5061163c8d60c08e01358e016114d2565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a03121561167b578283fd5b87356116868161208a565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156116bd578283fd5b6116c98a828b016114d2565b989b979a50959850939692959293505050565b6000602082840312156116ed578081fd5b8151801515811461155c578182fd5b60006020828403121561170d578081fd5b5035919050565b60008060408385031215611726578182fd5b8235915061173660208401611519565b90509250929050565b600080600080600060a08688031215611756578081fd5b8535945061176660208701611519565b935060408601356117768161208a565b925061178460608701611528565b915061179260808701611528565b90509295509295909350565b600080600080600080608087890312156117b6578182fd5b8635955060208701359450604087013567ffffffffffffffff808211156117db578384fd5b6117e78a838b016114d2565b909650945060608901359150808211156117ff578384fd5b5061180c89828a016114d2565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611838578081fd5b8735965060208801359550604088013567ffffffffffffffff8082111561185d578283fd5b6118698b838c016114d2565b909750955060608a0135915080821115611881578283fd5b5061188e8a828b016114d2565b90945092505060808801356118a28161208a565b8091505092959891949750929550565b6000602082840312156118c3578081fd5b815167ffffffffffffffff808211156118da578283fd5b818401915084601f8301126118ed578283fd5b8151818111156118ff576118ff61205b565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119415761194161205b565b604052818152838201602001871015611958578485fd5b611969826020830160208701611fd4565b9695505050505050565b600060208284031215611984578081fd5b5051919050565b60008060008060008060008060e0898b0312156119a6578182fd5b883597506020890135965060408901356119bf8161208a565b9550606089013594506080890135935060a089013567ffffffffffffffff8111156119e8578283fd5b6119f48b828c016114d2565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611a21578081fd5b83359250602084013567ffffffffffffffff811115611a3e578182fd5b611a4a868287016114d2565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611ab7816020860160208601611fd4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b20577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611b8d60c083018486611a57565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611bce608083018587611a57565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261155c6020830184611a9f565b6020810161148a8284611ae9565b60608101611c258286611ae9565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611f3460c08301888a611a57565b67ffffffffffffffff871660608401528281036080840152611f57818688611a57565b9150508260a08301529998505050505050505050565b600084825260406020830152611f87604083018486611a57565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611fb857611fb861202c565b500190565b600082821015611fcf57611fcf61202c565b500390565b60005b83811015611fef578181015183820152602001611fd7565b83811115611ffe576000848401525b50505050565b600067ffffffffffffffff808316818114156120225761202261202c565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461102c57600080fdfea2646970667358221220a418715bcbfd5a179f9b7ba89ac37d57a53801d5dd429a861f66e88b2e1b470564736f6c63430008000033","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}\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:913:0:-:0;;;;;;;;;;;;;;;;;;;","srcMapRuntime":"16024:913: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;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;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:953::-;;7247:2;7235:9;7226:7;7222:23;7218:32;7215:2;;;7268:6;7260;7253:22;7215:2;7306:9;7300:16;7335:18;7376:2;7368:6;7365:14;7362:2;;;7397:6;7389;7382:22;7362:2;7440:6;7429:9;7425:22;7415:32;;7485:7;7478:4;7474:2;7470:13;7466:27;7456:2;;7512:6;7504;7497:22;7456:2;7546;7540:9;7568:2;7564;7561:10;7558:2;;;7574:18;;:::i;:::-;7623:2;7617:9;7758:2;7688:66;7681:4;7677:2;7673:13;7669:86;7661:6;7657:99;7653:108;7811:6;7799:10;7796:22;7791:2;7779:10;7776:18;7773:46;7770:2;;;7822:18;;:::i;:::-;7858:2;7851:22;7882:18;;;7919:11;;;7932:2;7915:20;7912:33;-1:-1:-1;7909:2:1;;;7963:6;7955;7948:22;7909:2;7981:55;8033:2;8028;8020:6;8016:15;8011:2;8007;8003:11;7981:55;:::i;:::-;8055:6;7205:862;-1:-1:-1;;;;;;7205:862:1:o;8072:194::-;;8195:2;8183:9;8174:7;8170:23;8166:32;8163:2;;;8216:6;8208;8201:22;8163:2;-1:-1:-1;8244:16:1;;8153:113;-1:-1:-1;8153:113:1:o;8271:912::-;;;;;;;;;8504:3;8492:9;8483:7;8479:23;8475:33;8472:2;;;8526:6;8518;8511:22;8472:2;8567:9;8554:23;8544:33;;8624:2;8613:9;8609:18;8596:32;8586:42;;8678:2;8667:9;8663:18;8650:32;8691:33;8718:5;8691:33;:::i;:::-;8743:5;-1:-1:-1;8795:2:1;8780:18;;8767:32;;-1:-1:-1;8846:3:1;8831:19;;8818:33;;-1:-1:-1;8902:3:1;8887:19;;8874:33;8930:18;8919:30;;8916:2;;;8967:6;8959;8952:22;8916:2;9011:60;9063:7;9054:6;9043:9;9039:22;9011:60;:::i;:::-;8462:721;;;;-1:-1:-1;8462:721:1;;;;;;8985:86;;9172:3;9157:19;9144:33;;8462:721;-1:-1:-1;;;;8462:721:1:o;9188:499::-;;;;9336:2;9324:9;9315:7;9311:23;9307:32;9304:2;;;9357:6;9349;9342:22;9304:2;9398:9;9385:23;9375:33;;9459:2;9448:9;9444:18;9431:32;9486:18;9478:6;9475:30;9472:2;;;9523:6;9515;9508:22;9472:2;9567:60;9619:7;9610:6;9599:9;9595:22;9567:60;:::i;:::-;9294:393;;9646:8;;-1:-1:-1;9541:86:1;;-1:-1:-1;;;;9294:393:1:o;9692:329::-;;9782:6;9777:3;9770:19;9834:6;9827:5;9820:4;9815:3;9811:14;9798:43;9886:3;9879:4;9870:6;9865:3;9861:16;9857:27;9850:40;10010:4;9940:66;9935:2;9927:6;9923:15;9919:88;9914:3;9910:98;9906:109;9899:116;;9760:261;;;;;:::o;10026:318::-;;10107:5;10101:12;10134:6;10129:3;10122:19;10150:63;10206:6;10199:4;10194:3;10190:14;10183:4;10176:5;10172:16;10150:63;:::i;:::-;10258:2;10246:15;10263:66;10242:88;10233:98;;;;10333:4;10229:109;;10077:267;-1:-1:-1;;10077:267:1:o;10349:296::-;10432:1;10425:5;10422:12;10412:2;;10468:77;10465:1;10458:88;10569:4;10566:1;10559:15;10597:4;10594:1;10587:15;10412:2;10621:18;;10402:243::o;10650:226::-;10826:42;10814:55;;;;10796:74;;10784:2;10769:18;;10751:125::o;10881:654::-;;11190:42;11182:6;11178:55;11167:9;11160:74;11270:6;11265:2;11254:9;11250:18;11243:34;11313:6;11308:2;11297:9;11293:18;11286:34;11356:6;11351:2;11340:9;11336:18;11329:34;11400:6;11394:3;11383:9;11379:19;11372:35;11444:3;11438;11427:9;11423:19;11416:32;11465:64;11524:3;11513:9;11509:19;11501:6;11493;11465:64;:::i;:::-;11457:72;11150:385;-1:-1:-1;;;;;;;;;11150:385:1:o;11540:187::-;11705:14;;11698:22;11680:41;;11668:2;11653:18;;11635:92::o;11732:177::-;11878:25;;;11866:2;11851:18;;11833:76::o;11914:510::-;;12155:6;12144:9;12137:25;12198:6;12193:2;12182:9;12178:18;12171:34;12241:3;12236:2;12225:9;12221:18;12214:31;12262:64;12321:3;12310:9;12306:19;12298:6;12290;12262:64;:::i;:::-;12254:72;;12374:42;12366:6;12362:55;12357:2;12346:9;12342:18;12335:83;12127:297;;;;;;;;:::o;12429:219::-;;12576:2;12565:9;12558:21;12596:46;12638:2;12627:9;12623:18;12615:6;12596:46;:::i;12653:208::-;12797:2;12782:18;;12809:46;12786:9;12837:6;12809:46;:::i;12866:401::-;13062:2;13047:18;;13074:46;13051:9;13102:6;13074:46;:::i;:::-;13139:18;13205:2;13197:6;13193:15;13188:2;13177:9;13173:18;13166:43;13257:2;13249:6;13245:15;13240:2;13229:9;13225:18;13218:43;;13029:238;;;;;;:::o;13498:339::-;13700:2;13682:21;;;13739:2;13719:18;;;13712:30;13778:17;13773:2;13758:18;;13751:45;13828:2;13813:18;;13672:165::o;13842:344::-;14044:2;14026:21;;;14083:2;14063:18;;;14056:30;14122:22;14117:2;14102:18;;14095:50;14177:2;14162:18;;14016:170::o;14191:335::-;14393:2;14375:21;;;14432:2;14412:18;;;14405:30;14471:13;14466:2;14451:18;;14444:41;14517:2;14502:18;;14365:161::o;14531:402::-;14733:2;14715:21;;;14772:2;14752:18;;;14745:30;14811:34;14806:2;14791:18;;14784:62;14882:8;14877:2;14862:18;;14855:36;14923:3;14908:19;;14705:228::o;14938:339::-;15140:2;15122:21;;;15179:2;15159:18;;;15152:30;15218:17;15213:2;15198:18;;15191:45;15268:2;15253:18;;15112:165::o;15282:340::-;15484:2;15466:21;;;15523:2;15503:18;;;15496:30;15562:18;15557:2;15542:18;;15535:46;15613:2;15598:18;;15456:166::o;15627:410::-;15829:2;15811:21;;;15868:2;15848:18;;;15841:30;15907:34;15902:2;15887:18;;15880:62;15978:16;15973:2;15958:18;;15951:44;16027:3;16012:19;;15801:236::o;16042:356::-;16244:2;16226:21;;;16263:18;;;16256:30;16322:34;16317:2;16302:18;;16295:62;16389:2;16374:18;;16216:182::o;16403:348::-;16605:2;16587:21;;;16644:2;16624:18;;;16617:30;16683:26;16678:2;16663:18;;16656:54;16742:2;16727:18;;16577:174::o;16756:344::-;16958:2;16940:21;;;16997:2;16977:18;;;16970:30;17036:22;17031:2;17016:18;;17009:50;17091:2;17076:18;;16930:170::o;17105:407::-;17307:2;17289:21;;;17346:2;17326:18;;;17319:30;17385:34;17380:2;17365:18;;17358:62;17456:13;17451:2;17436:18;;17429:41;17502:3;17487:19;;17279:233::o;17699:746::-;;18022:6;18011:9;18004:25;18065:6;18060:2;18049:9;18045:18;18038:34;18108:3;18103:2;18092:9;18088:18;18081:31;18135:64;18194:3;18183:9;18179:19;18171:6;18163;18135:64;:::i;:::-;18247:18;18239:6;18235:31;18230:2;18219:9;18215:18;18208:59;18316:9;18308:6;18304:22;18298:3;18287:9;18283:19;18276:51;18344;18388:6;18380;18372;18344:51;:::i;:::-;18336:59;;;18432:6;18426:3;18415:9;18411:19;18404:35;17994:451;;;;;;;;;;;:::o;18450:317::-;;18635:6;18624:9;18617:25;18678:2;18673;18662:9;18658:18;18651:30;18698:63;18757:2;18746:9;18742:18;18734:6;18726;18698:63;:::i;:::-;18690:71;18607:160;-1:-1:-1;;;;;18607:160:1:o;18772:200::-;18946:18;18934:31;;;;18916:50;;18904:2;18889:18;;18871:101::o;18977:128::-;;19048:1;19044:6;19041:1;19038:13;19035:2;;;19054:18;;:::i;:::-;-1:-1:-1;19090:9:1;;19025:80::o;19110:125::-;;19178:1;19175;19172:8;19169:2;;;19183:18;;:::i;:::-;-1:-1:-1;19220:9:1;;19159:76::o;19240:258::-;19312:1;19322:113;19336:6;19333:1;19330:13;19322:113;;;19412:11;;;19406:18;19393:11;;;19386:39;19358:2;19351:10;19322:113;;;19453:6;19450:1;19447:13;19444:2;;;19488:1;19479:6;19474:3;19470:16;19463:27;19444:2;;19293:205;;;:::o;19503:209::-;;19569:18;19622:2;19615:5;19611:14;19649:2;19640:7;19637:15;19634:2;;;19655:18;;:::i;:::-;19704:1;19691:15;;19549:163;-1:-1:-1;;;19549:163:1:o;19717:184::-;19769:77;19766:1;19759:88;19866:4;19863:1;19856:15;19890:4;19887:1;19880:15;19906:184;19958:77;19955:1;19948:88;20055:4;20052:1;20045:15;20079:4;20076:1;20069:15;20095:156;20183:42;20176:5;20172:54;20165:5;20162:65;20152:2;;20241:1;20238;20231: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":"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\":\"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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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","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"}}} \ No newline at end of file diff --git a/services/explorer/contracts/message/testmessage/testmessage.metadata.go b/services/explorer/contracts/message/testmessage/testmessage.metadata.go new file mode 100644 index 0000000000..32f7cf3d8a --- /dev/null +++ b/services/explorer/contracts/message/testmessage/testmessage.metadata.go @@ -0,0 +1,25 @@ +// Code generated by synapse abigen DO NOT EDIT. +package testmessage + +import ( + _ "embed" + "encoding/json" + "github.com/ethereum/go-ethereum/common/compiler" +) + +// rawContracts are the json we use to dervive the processed contracts +// +//go:embed testmessage.contractinfo.json +var rawContracts []byte + +// Contracts are unmarshalled on start +var Contracts map[string]*compiler.Contract + +func init() { + // load contract metadata + var err error + err = json.Unmarshal(rawContracts, &Contracts) + if err != nil { + panic(err) + } +} diff --git a/services/explorer/testutil/contract_test.go b/services/explorer/testutil/contract_test.go index c0820a29e1..220763340d 100644 --- a/services/explorer/testutil/contract_test.go +++ b/services/explorer/testutil/contract_test.go @@ -1,6 +1,7 @@ package testutil_test import ( + "fmt" . "github.com/stretchr/testify/assert" "github.com/synapsecns/sanguine/ethergo/contracts" "github.com/synapsecns/sanguine/ethergo/deployer" @@ -12,6 +13,8 @@ func (s *SimulatedSuite) GetDeployedContractsFromRegistry(registry deployer.Cont deployedContracts = make(map[int]contracts.ContractType) for _, contractType := range testutil.AllContractTypes { + fmt.Println("YOOOO contractType", contractType, testutil.AllContractTypes) + if registry.IsContractDeployed(contractType) { deployedContracts[contractType.ID()] = contractType } diff --git a/services/explorer/testutil/contracttype.go b/services/explorer/testutil/contracttype.go index 84503172ea..48ecafa990 100644 --- a/services/explorer/testutil/contracttype.go +++ b/services/explorer/testutil/contracttype.go @@ -1,10 +1,12 @@ package testutil import ( + "fmt" "github.com/ethereum/go-ethereum/common/compiler" "github.com/synapsecns/sanguine/ethergo/contracts" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge" "github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig" + "github.com/synapsecns/sanguine/services/explorer/contracts/message" "github.com/synapsecns/sanguine/services/explorer/contracts/swap" ) @@ -42,8 +44,8 @@ const ( SynapseBridgeType contractTypeImpl = 1 // SwapFlashLoanType is the swap contract type. SwapFlashLoanType contractTypeImpl = 2 - // MessageBusUpgradableType is the messaging contract type. - MessageBusUpgradableType contractTypeImpl = 3 + // MessageBusUpgradeableType is the messaging contract type. + MessageBusUpgradeableType contractTypeImpl = 3 ) // ID gets the contract type as an id. @@ -63,6 +65,7 @@ func (c contractTypeImpl) Name() string { // ContractInfo gets the source code of every contract. See TODO above. // TODO these should use contract name and maybe come out of the generator. func (c contractTypeImpl) ContractInfo() *compiler.Contract { + fmt.Println("YOOOO") switch c { case BridgeConfigTypeV3: return bridgeconfig.Contracts["/solidity/BridgeConfigV3_flat.sol:BridgeConfigV3"] @@ -70,8 +73,8 @@ func (c contractTypeImpl) ContractInfo() *compiler.Contract { return bridge.Contracts["/solidity/SynapseBridgeV1_flat.sol:SynapseBridge"] case SwapFlashLoanType: return swap.Contracts["/solidity/SwapFlashLoanV1_flat.sol:SwapFlashLoan"] - case MessageBusUpgradableType: - return swap.Contracts["/solidity/MessageBusUpgradeable_flat.sol:MessageBusUpgradeable"] + case MessageBusUpgradeableType: + return message.Contracts["/solidity/MessageBusUpgradeable_flat.sol:MessageBusUpgradeable"] default: panic("not yet implemented") } diff --git a/services/explorer/testutil/contracttypeimpl_string.go b/services/explorer/testutil/contracttypeimpl_string.go index ae8e7d0294..9f15b1b34c 100644 --- a/services/explorer/testutil/contracttypeimpl_string.go +++ b/services/explorer/testutil/contracttypeimpl_string.go @@ -11,12 +11,12 @@ func _() { _ = x[BridgeConfigTypeV3-0] _ = x[SynapseBridgeType-1] _ = x[SwapFlashLoanType-2] - _ = x[MessageBusUpgradableType-3] + _ = x[MessageBusUpgradeableType-3] } -const _contractTypeImpl_name = "BridgeConfigTypeV3SynapseBridgeTypeSwapFlashLoanTypeMessageBusUpgradableType" +const _contractTypeImpl_name = "BridgeConfigTypeV3SynapseBridgeTypeSwapFlashLoanTypeMessageBusUpgradeableType" -var _contractTypeImpl_index = [...]uint8{0, 18, 35, 52, 76} +var _contractTypeImpl_index = [...]uint8{0, 18, 35, 52, 77} func (i contractTypeImpl) String() string { if i < 0 || i >= contractTypeImpl(len(_contractTypeImpl_index)-1) { diff --git a/services/explorer/testutil/deployers.go b/services/explorer/testutil/deployers.go index 125f31f6e3..70b473457c 100644 --- a/services/explorer/testutil/deployers.go +++ b/services/explorer/testutil/deployers.go @@ -30,8 +30,8 @@ type SwapFlashLoanDeployer struct { *deployer.BaseDeployer } -// MessageBusUpgradableDeployer is the type of the Message Bus deployer. -type MessageBusUpgradableDeployer struct { +// MessageBusUpgradeableDeployer is the type of the Message Bus deployer. +type MessageBusUpgradeableDeployer struct { *deployer.BaseDeployer } @@ -50,9 +50,9 @@ func NewSwapFlashLoanDeployer(registry deployer.GetOnlyContractRegistry, backend return SwapFlashLoanDeployer{deployer.NewSimpleDeployer(registry, backend, SwapFlashLoanType)} } -// NewMessageBusUpgradableDeployer creates a new message bus upgradable client. -func NewMessageBusUpgradableDeployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer { - return MessageBusUpgradableDeployer{deployer.NewSimpleDeployer(registry, backend, MessageBusUpgradableType)} +// NewMessageBusUpgradeableDeployer creates a new message bus upgradable client. +func NewMessageBusUpgradeableDeployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer { + return MessageBusUpgradeableDeployer{deployer.NewSimpleDeployer(registry, backend, MessageBusUpgradeableType)} } // Deploy deploys bridge config v3 @@ -111,7 +111,7 @@ func (n SwapFlashLoanDeployer) Deploy(ctx context.Context) (contracts.DeployedCo // Deploy deploys Message Bus Upgradable // nolint: dupl -func (n MessageBusUpgradableDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error) { +func (n MessageBusUpgradeableDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error) { return n.DeploySimpleContract(ctx, func(transactOps *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, interface{}, error) { return message.DeployMessageBusUpgradeable(transactOps, backend) }, func(address common.Address, backend bind.ContractBackend) (interface{}, error) { @@ -122,4 +122,4 @@ func (n MessageBusUpgradableDeployer) Deploy(ctx context.Context) (contracts.Dep var _ deployer.ContractDeployer = &BridgeConfigV3Deployer{} var _ deployer.ContractDeployer = &SynapseBridgeDeployer{} var _ deployer.ContractDeployer = &SwapFlashLoanDeployer{} -var _ deployer.ContractDeployer = &MessageBusUpgradableDeployer{} +var _ deployer.ContractDeployer = &MessageBusUpgradeableDeployer{} diff --git a/services/explorer/testutil/manager.go b/services/explorer/testutil/manager.go index 01cc65dad2..a4056c5c3e 100644 --- a/services/explorer/testutil/manager.go +++ b/services/explorer/testutil/manager.go @@ -9,7 +9,7 @@ import ( func NewDeployManager(t *testing.T) *DeployManager { t.Helper() - parentManager := manager.NewDeployerManager(t, NewBridgeConfigV3Deployer, NewSynapseBridgeDeployer, NewSwapFlashLoanDeployer, NewMessageBusUpgradableDeployer) + parentManager := manager.NewDeployerManager(t, NewBridgeConfigV3Deployer, NewSynapseBridgeDeployer, NewSwapFlashLoanDeployer, NewMessageBusUpgradeableDeployer) return &DeployManager{parentManager} } diff --git a/services/explorer/testutil/typecast.go b/services/explorer/testutil/typecast.go index 23a58b42c6..a1feeba81d 100644 --- a/services/explorer/testutil/typecast.go +++ b/services/explorer/testutil/typecast.go @@ -47,11 +47,11 @@ func (d *DeployManager) GetSwapFlashLoan(ctx context.Context, backend backends.S return swapContract, swapHandle } -// GetMessageBusUpgradable gets a typecast swap contract. -func (d *DeployManager) GetMessageBusUpgradable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *message.MessageRef) { +// GetMessageBusUpgradeable gets a typecast swap contract. +func (d *DeployManager) GetMessageBusUpgradeable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *message.MessageRef) { d.T().Helper() - messageContract := d.GetContractRegistry(backend).Get(ctx, MessageBusUpgradableType) + messageContract := d.GetContractRegistry(backend).Get(ctx, MessageBusUpgradeableType) messageHandle, ok := messageContract.ContractHandle().(*message.MessageRef) assert.True(d.T(), ok) diff --git a/services/explorer/testutil/typecast_test.go b/services/explorer/testutil/typecast_test.go index 3c5d017cee..6922820ed2 100644 --- a/services/explorer/testutil/typecast_test.go +++ b/services/explorer/testutil/typecast_test.go @@ -11,7 +11,7 @@ func (s SimulatedSuite) TestTypecast() { NotNil(s.T(), bridgeHandle) _, swapHandle := s.deployManager.GetSwapFlashLoan(s.GetTestContext(), s.testBackend) NotNil(s.T(), swapHandle) - _, messageHandle := s.deployManager.GetMessageBusUpgradable(s.GetTestContext(), s.testBackend) + _, messageHandle := s.deployManager.GetMessageBusUpgradeable(s.GetTestContext(), s.testBackend) NotNil(s.T(), messageHandle) }) } diff --git a/services/explorer/types/message/doc.go b/services/explorer/types/message/doc.go new file mode 100644 index 0000000000..10d65eaf61 --- /dev/null +++ b/services/explorer/types/message/doc.go @@ -0,0 +1,2 @@ +// Package message provides types for Message events. +package message diff --git a/services/explorer/types/message/event.go b/services/explorer/types/message/event.go new file mode 100644 index 0000000000..8a8fcdb020 --- /dev/null +++ b/services/explorer/types/message/event.go @@ -0,0 +1,49 @@ +package message + +import ( + "github.com/ethereum/go-ethereum/common" + "math/big" +) + +// MessageLog is the interface for all message events. +// +//nolint:interfacebloat +type MessageLog interface { + // GetContractAddress returns the contract address of the log. + GetContractAddress() common.Address + // GetBlockNumber returns the block number of the log.' + GetBlockNumber() uint64 + // GetTxHash returns the transaction hash of the log. + GetTxHash() common.Hash + // GetEventType returns the event type of the log. + GetEventType() EventType + // GetEventIndex returns the index of the log. + GetEventIndex() uint64 + + // GetMessageId returns the message id of the event. + GetMessageId() *[32]byte + // GetStatus returns the status of the event. + GetStatus() *string + // GetSourceAddress gets the address that the message will be passed from. + GetSourceAddress() *common.Address + // GetDestinationAddress gets the address that the message will be passed to. + GetDestinationAddress() *common.Address + // GetSourceChainID returns the chain id of the message's source chain. + GetSourceChainID() *big.Int + // GetDestinationChainID returns the chain id of the message's destination chain. + GetDestinationChainID() *big.Int + // GetGasLimit returns the gas limit to be passed alongside the message, depending on the fee paid on the source chain. + GetGasLimit() *big.Int + // GetSourceNonce returns the source nonce of the message. + GetSourceNonce() *big.Int + // GetNonce returns the nonce of the message. + GetNonce() *big.Int + // GetMessage gets the message. + GetMessage() *[]byte + // GetReceiver returns the receiver of the event. + GetReceiver() *[32]byte + // GetOptions gets the message. + GetOptions() *[]byte + // GetFee returns the fee of the message. + GetFee() *big.Int +} diff --git a/services/explorer/types/message/eventtype.go b/services/explorer/types/message/eventtype.go new file mode 100644 index 0000000000..b6cc4084c8 --- /dev/null +++ b/services/explorer/types/message/eventtype.go @@ -0,0 +1,23 @@ +package message + +// EventType is the type of the swap event. +// +//go:generate go run golang.org/x/tools/cmd/stringer -type=EventType +type EventType uint8 + +const ( + // ExecutedEvent is the message executed (sent) event. + ExecutedEvent EventType = iota + // MessageSentEvent is the message sent event. + MessageSentEvent +) + +// AllEventTypes is a list of the event types. +func AllEventTypes() []EventType { + return []EventType{ExecutedEvent, MessageSentEvent} +} + +// Int gets the int value of the event type. +func (i EventType) Int() uint8 { + return uint8(i) +} diff --git a/services/explorer/types/message/eventtype_string.go b/services/explorer/types/message/eventtype_string.go new file mode 100644 index 0000000000..f0b5f50c2e --- /dev/null +++ b/services/explorer/types/message/eventtype_string.go @@ -0,0 +1,24 @@ +// Code generated by "stringer -type=EventType"; DO NOT EDIT. + +package message + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[ExecutedEvent-0] + _ = x[MessageSentEvent-1] +} + +const _EventType_name = "ExecutedEventMessageSentEvent" + +var _EventType_index = [...]uint8{0, 13, 29} + +func (i EventType) String() string { + if i >= EventType(len(_EventType_index)-1) { + return "EventType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _EventType_name[_EventType_index[i]:_EventType_index[i+1]] +} From 7e02467566ded421368ac128243f4e2a78f68c89 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Oct 2022 01:09:15 -0400 Subject: [PATCH 05/10] test contract infra --- .../contracts/message/testmessage/helpers.go | 4 ++-- .../testutil/testcontracts/contracttype.go | 4 ++++ .../testutil/testcontracts/deployers.go | 22 +++++++++++++++++++ .../testutil/testcontracts/manager.go | 2 ++ .../testutil/testcontracts/typecast.go | 13 +++++++++++ 5 files changed, 43 insertions(+), 2 deletions(-) diff --git a/services/explorer/contracts/message/testmessage/helpers.go b/services/explorer/contracts/message/testmessage/helpers.go index bdf9dca694..84c21802e2 100644 --- a/services/explorer/contracts/message/testmessage/helpers.go +++ b/services/explorer/contracts/message/testmessage/helpers.go @@ -18,9 +18,9 @@ func (s TestMessageRef) Address() common.Address { return s.address } -// NewMessageRef gets a bound Message Bus Upgradeable contract and the address of the contract +// NewTestMessageRef gets a bound Message Bus Upgradeable contract and the address of the contract // nolint: golint -func NewMessageRef(address common.Address, backend bind.ContractBackend) (*TestMessageRef, error) { +func NewTestMessageRef(address common.Address, backend bind.ContractBackend) (*TestMessageRef, error) { messageBusUpgradeable, err := NewTestMessageBusUpgradeable(address, backend) if err != nil { return nil, err diff --git a/services/explorer/testutil/testcontracts/contracttype.go b/services/explorer/testutil/testcontracts/contracttype.go index 390ee2ee12..9ec27931a1 100644 --- a/services/explorer/testutil/testcontracts/contracttype.go +++ b/services/explorer/testutil/testcontracts/contracttype.go @@ -42,6 +42,8 @@ const ( TestSynapseBridgeType // TestSwapFlashLoanType is the swap contract type. TestSwapFlashLoanType + // TestMessageBusUpgradeableType is the message bus contract type. + TestMessageBusUpgradeableType ) // ID gets the contract type as an id. @@ -68,6 +70,8 @@ func (c contractTypeImpl) ContractInfo() *compiler.Contract { return testbridge.Contracts["/solidity/TestSynapseBridge.sol:TestSynapseBridge"] case TestSwapFlashLoanType: return testswap.Contracts["/solidity/TestSwapFlashLoan.sol:TestSwapFlashLoan"] + case TestMessageBusUpgradeableType: + return testswap.Contracts["/solidity/TestMessageBusUpgradeable.sol:TestMessageBusUpgradeable"] default: panic("not yet implemented") diff --git a/services/explorer/testutil/testcontracts/deployers.go b/services/explorer/testutil/testcontracts/deployers.go index f736288bb7..96f61d4af0 100644 --- a/services/explorer/testutil/testcontracts/deployers.go +++ b/services/explorer/testutil/testcontracts/deployers.go @@ -11,10 +11,32 @@ import ( "github.com/synapsecns/sanguine/ethergo/deployer" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge/testbridge" "github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig" + "github.com/synapsecns/sanguine/services/explorer/contracts/message/testmessage" "github.com/synapsecns/sanguine/services/explorer/contracts/swap/testswap" "github.com/synapsecns/sanguine/services/explorer/testutil" ) +// TestMessageBusUpgradeableDeployer is the type of the test message bus upgradeable deployer. +type TestMessageBusUpgradeableDeployer struct { + *deployer.BaseDeployer +} + +// NewTestMessageBusUpgradeableDeployer creates a new test bridge deployer. +func NewTestMessageBusUpgradeableDeployer(registry deployer.GetOnlyContractRegistry, backend backends.SimulatedTestBackend) deployer.ContractDeployer { + return TestMessageBusUpgradeableDeployer{deployer.NewSimpleDeployer(registry, backend, TestMessageBusUpgradeableType)} +} + +// Deploy deploys a test message. +func (t TestMessageBusUpgradeableDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error) { + return t.DeploySimpleContract(ctx, func(transactOps *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, interface{}, error) { + return testmessage.DeployMessageBusUpgradeable(transactOps, backend) + }, func(address common.Address, backend bind.ContractBackend) (interface{}, error) { + return testmessage.NewTestMessageRef(address, backend) + }) +} + +var _ deployer.ContractDeployer = &TestMessageBusUpgradeableDeployer{} + // TestSynapseBridgeDeployer is the type of the test bridge deployer. type TestSynapseBridgeDeployer struct { *deployer.BaseDeployer diff --git a/services/explorer/testutil/testcontracts/manager.go b/services/explorer/testutil/testcontracts/manager.go index da5cd9b2be..69539b6309 100644 --- a/services/explorer/testutil/testcontracts/manager.go +++ b/services/explorer/testutil/testcontracts/manager.go @@ -15,6 +15,8 @@ func NewDeployManager(t *testing.T) *DeployManager { NewBridgeConfigV3Deployer, NewTestSynapseBridgeDeployer, + + NewTestMessageBusUpgradeableDeployer, ) return &DeployManager{parentManager} } diff --git a/services/explorer/testutil/testcontracts/typecast.go b/services/explorer/testutil/testcontracts/typecast.go index dd36460136..61ec4a25f8 100644 --- a/services/explorer/testutil/testcontracts/typecast.go +++ b/services/explorer/testutil/testcontracts/typecast.go @@ -7,6 +7,7 @@ import ( "github.com/synapsecns/sanguine/ethergo/contracts" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge/testbridge" "github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig" + "github.com/synapsecns/sanguine/services/explorer/contracts/message/testmessage" "github.com/synapsecns/sanguine/services/explorer/contracts/swap/testswap" "github.com/synapsecns/sanguine/services/explorer/testutil" ) @@ -46,3 +47,15 @@ func (d *DeployManager) GetTestSwapFlashLoan(ctx context.Context, backend backen return swapContract, swapHandle } + +// GetMessageBusUpgradeable gets a typecast test swap contract. +func (d *DeployManager) GetMessageBusUpgradeable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testmessage.TestMessageRef) { + d.T().Helper() + + messageContract := d.GetContractRegistry(backend).Get(ctx, TestMessageBusUpgradeableType) + + messageHandle, ok := messageContract.ContractHandle().(*testmessage.TestMessageRef) + assert.True(d.T(), ok) + + return messageContract, messageHandle +} From 9768b5cbd18c325ac24d7e5ba691ba45000c07df Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Oct 2022 01:32:05 -0400 Subject: [PATCH 06/10] store --- services/explorer/db/sql/model.go | 47 ++++++++++++++++++++++++ services/explorer/db/sql/store.go | 2 +- services/explorer/types/message/event.go | 2 +- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/services/explorer/db/sql/model.go b/services/explorer/db/sql/model.go index 34572b674c..0c9a1033f9 100644 --- a/services/explorer/db/sql/model.go +++ b/services/explorer/db/sql/model.go @@ -205,3 +205,50 @@ type SwapEvent struct { // TimeStamp is the timestamp of the block in which the event occurred. TimeStamp *uint64 `gorm:"column:timestamp"` } + +// MessageEvent stores data for emitted events from the Message contract. +type MessageEvent struct { + // InsertTime is the time the event was inserted into the database + InsertTime uint64 `gorm:"column:insert_time"` + // ContractAddress is the address of the contract that generated the event + ContractAddress string `gorm:"column:contract_address"` + // ChainID is the chain id of the contract that generated the event + ChainID uint32 `gorm:"column:chain_id"` + // BlockNumber is the block number of the event + BlockNumber uint64 `gorm:"column:block_number"` + // TxHash is the transaction hash of the event + TxHash string `gorm:"column:tx_hash"` + // EventType is the type of the event + EventType uint8 `gorm:"column:event_type"` + // EventIndex is the index of the log + EventIndex uint64 `gorm:"column:event_index"` + // Sender is the address of the sender + Sender string `gorm:"column:sender"` + // MessageId is the message id of the event. + MessageId string `gorm:"column:message_id"` + // SourceChainID is the chain id of the message's source chain. + SourceChainID *big.Int `gorm:"column:source_chain_id;type:UInt256"` + + // Status is the status of the event. + Status *string `gorm:"column:status"` + // GetSourceAddress is the address that the message will be passed from. + SourceAddress *string `gorm:"column:source_address"` + // DestinationAddress is the address that the message will be passed to. + DestinationAddress *string `gorm:"column:destination_address"` + // DestinationChainID is the chain id of the message's destination chain. + DestinationChainID *big.Int `gorm:"column:destination_chain_id;type:UInt256"` + // GasLimit is the gas limit to be passed alongside the message, depending on the fee paid on the source chain. + GasLimit *big.Int `gorm:"column:gas_limit;type:UInt256"` + // SourceNonce is the source nonce of the message. + SourceNonce *big.Int `gorm:"column:source_nonce;type:UInt256"` + // Nonce is the nonce of the message. + Nonce *big.Int `gorm:"column:nonce;type:UInt256"` + // Message is the message. + Message *string `gorm:"column:message"` + // Receiver is the receiver of the event. + Receiver *string `gorm:"column:receiver"` + // Options is the message. + Options *string `gorm:"column:options"` + // Fee is the fee of the message. + Fee *big.Int `gorm:"column:fee;type:UInt256"` +} diff --git a/services/explorer/db/sql/store.go b/services/explorer/db/sql/store.go index e4332517a9..a99ce8e84f 100644 --- a/services/explorer/db/sql/store.go +++ b/services/explorer/db/sql/store.go @@ -35,7 +35,7 @@ func OpenGormClickhouse(ctx context.Context, address string) (*Store, error) { } // load all models - err = clickhouseDB.WithContext(ctx).Set("gorm:table_options", "ENGINE=ReplacingMergeTree(insert_time) ORDER BY (event_index, block_number, event_type, tx_hash, chain_id, contract_address)").AutoMigrate(&SwapEvent{}, &BridgeEvent{}) + err = clickhouseDB.WithContext(ctx).Set("gorm:table_options", "ENGINE=ReplacingMergeTree(insert_time) ORDER BY (event_index, block_number, event_type, tx_hash, chain_id, contract_address)").AutoMigrate(&SwapEvent{}, &BridgeEvent{}, &MessageEvent{}) if err != nil { return nil, fmt.Errorf("could not migrate on clickhouse: %w", err) } diff --git a/services/explorer/types/message/event.go b/services/explorer/types/message/event.go index 8a8fcdb020..356dc8878d 100644 --- a/services/explorer/types/message/event.go +++ b/services/explorer/types/message/event.go @@ -37,7 +37,7 @@ type MessageLog interface { // GetSourceNonce returns the source nonce of the message. GetSourceNonce() *big.Int // GetNonce returns the nonce of the message. - GetNonce() *big.Int + GetNonce() *big.Int //TODO ask Trajan about src vs nonce // GetMessage gets the message. GetMessage() *[]byte // GetReceiver returns the receiver of the event. From 9620e201e3051f058ae934a274121a0e587276d0 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Oct 2022 01:52:45 -0400 Subject: [PATCH 07/10] db, write, store, with passing test --- services/explorer/consumer/parser.go | 4 +-- services/explorer/db/consumerinterface.go | 2 +- services/explorer/db/sql/writer.go | 8 +++++- services/explorer/db/writer_test.go | 31 +++++++++++++++++++++-- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/services/explorer/consumer/parser.go b/services/explorer/consumer/parser.go index 23cc03597a..0333e83ca1 100644 --- a/services/explorer/consumer/parser.go +++ b/services/explorer/consumer/parser.go @@ -326,7 +326,7 @@ func (p *BridgeParser) ParseAndStore(ctx context.Context, log ethTypes.Log, chai } bridgeEvent.Sender = sender - err = p.consumerDB.StoreEvent(ctx, &bridgeEvent, nil) + err = p.consumerDB.StoreEvent(ctx, &bridgeEvent, nil, nil) if err != nil { return fmt.Errorf("could not store event: %w", err) } @@ -505,7 +505,7 @@ func (p *SwapParser) ParseAndStore(ctx context.Context, log ethTypes.Log, chainI } // Store bridgeEvent - err = p.consumerDB.StoreEvent(ctx, nil, &swapEvent) + err = p.consumerDB.StoreEvent(ctx, nil, &swapEvent, nil) if err != nil { return fmt.Errorf("could not store event: %w", err) } diff --git a/services/explorer/db/consumerinterface.go b/services/explorer/db/consumerinterface.go index ee06afc28e..3da3932c50 100644 --- a/services/explorer/db/consumerinterface.go +++ b/services/explorer/db/consumerinterface.go @@ -10,7 +10,7 @@ import ( // ConsumerDBWriter is the interface for writing to the ConsumerDB. type ConsumerDBWriter interface { // StoreEvent stores an event. - StoreEvent(ctx context.Context, bridgeEvent *sql.BridgeEvent, swapEvent *sql.SwapEvent) error + StoreEvent(ctx context.Context, bridgeEvent *sql.BridgeEvent, swapEvent *sql.SwapEvent, messageEvent *sql.MessageEvent) error // UNSAFE_DB gets the underlying gorm db. This is not intended for use in production. // //nolint:golint diff --git a/services/explorer/db/sql/writer.go b/services/explorer/db/sql/writer.go index 07af9e7502..badc999c30 100644 --- a/services/explorer/db/sql/writer.go +++ b/services/explorer/db/sql/writer.go @@ -6,7 +6,7 @@ import ( ) // StoreEvent stores a generic event that has the proper fields set by `eventToBridgeEvent`. -func (s *Store) StoreEvent(ctx context.Context, bridgeEvent *BridgeEvent, swapEvent *SwapEvent) error { +func (s *Store) StoreEvent(ctx context.Context, bridgeEvent *BridgeEvent, swapEvent *SwapEvent, messageEvent *MessageEvent) error { if bridgeEvent != nil { dbTx := s.UNSAFE_DB().WithContext(ctx).Create(*bridgeEvent) if dbTx.Error != nil { @@ -19,5 +19,11 @@ func (s *Store) StoreEvent(ctx context.Context, bridgeEvent *BridgeEvent, swapEv return fmt.Errorf("failed to store swap event: %w", dbTx.Error) } } + if messageEvent != nil { + dbTx := s.UNSAFE_DB().WithContext(ctx).Create(*messageEvent) + if dbTx.Error != nil { + return fmt.Errorf("failed to store message event: %w", dbTx.Error) + } + } return nil } diff --git a/services/explorer/db/writer_test.go b/services/explorer/db/writer_test.go index fab864dc73..898aafbba1 100644 --- a/services/explorer/db/writer_test.go +++ b/services/explorer/db/writer_test.go @@ -7,6 +7,7 @@ import ( . "github.com/stretchr/testify/assert" model "github.com/synapsecns/sanguine/services/explorer/db/sql" bridgeTypes "github.com/synapsecns/sanguine/services/explorer/types/bridge" + messageTypes "github.com/synapsecns/sanguine/services/explorer/types/message" "math/big" ) @@ -25,7 +26,7 @@ func (t *DBSuite) TestBridgeWrite() { Recipient: sql.NullString{String: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), Valid: true}, DestinationChainID: big.NewInt(gofakeit.Int64()), } - err := t.db.StoreEvent(t.GetTestContext(), bridgeEvent, nil) + err := t.db.StoreEvent(t.GetTestContext(), bridgeEvent, nil, nil) Nil(t.T(), err) } @@ -45,6 +46,32 @@ func (t *DBSuite) TestSwapWrite() { SoldID: big.NewInt(gofakeit.Int64()), BoughtID: big.NewInt(gofakeit.Int64()), } - err := t.db.StoreEvent(t.GetTestContext(), nil, swapEvent) + err := t.db.StoreEvent(t.GetTestContext(), nil, swapEvent, nil) + Nil(t.T(), err) +} + +func (t *DBSuite) TestMessageWrite() { + defer t.cleanup() + testString := gofakeit.Sentence(10) + address := common.BigToAddress(big.NewInt(gofakeit.Int64())).String() + messageEvent := &model.MessageEvent{ + InsertTime: gofakeit.Uint64(), + ContractAddress: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), + ChainID: gofakeit.Uint32(), + EventType: messageTypes.MessageSentEvent.Int(), + BlockNumber: gofakeit.Uint64(), + TxHash: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), + MessageId: testString, + SourceChainID: big.NewInt(gofakeit.Int64()), + + SourceAddress: &address, + DestinationChainID: big.NewInt(gofakeit.Int64()), + Nonce: big.NewInt(gofakeit.Int64()), + Fee: big.NewInt(gofakeit.Int64()), + Options: &testString, + Message: &testString, + Receiver: &address, + } + err := t.db.StoreEvent(t.GetTestContext(), nil, nil, messageEvent) Nil(t.T(), err) } From 521ba113484e3b6cb66dfd0b180c3f052c17fa6e Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Oct 2022 03:40:32 -0400 Subject: [PATCH 08/10] parsing --- services/explorer/consumer/parser.go | 201 ++++++++++++++---- .../explorer/contracts/message/sendreceive.go | 189 ++++++++++++++++ services/explorer/contracts/message/topics.go | 57 +++++ services/explorer/db/sql/model.go | 18 +- services/explorer/db/writer_test.go | 12 +- services/explorer/types/message/event.go | 31 ++- 6 files changed, 436 insertions(+), 72 deletions(-) create mode 100644 services/explorer/contracts/message/sendreceive.go create mode 100644 services/explorer/contracts/message/topics.go diff --git a/services/explorer/consumer/parser.go b/services/explorer/consumer/parser.go index 0333e83ca1..9b15cd98de 100644 --- a/services/explorer/consumer/parser.go +++ b/services/explorer/consumer/parser.go @@ -9,10 +9,12 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/synapsecns/sanguine/core" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge" + "github.com/synapsecns/sanguine/services/explorer/contracts/message" "github.com/synapsecns/sanguine/services/explorer/contracts/swap" "github.com/synapsecns/sanguine/services/explorer/db" model "github.com/synapsecns/sanguine/services/explorer/db/sql" bridgeTypes "github.com/synapsecns/sanguine/services/explorer/types/bridge" + messageTypes "github.com/synapsecns/sanguine/services/explorer/types/message" swapTypes "github.com/synapsecns/sanguine/services/explorer/types/swap" "math/big" "time" @@ -49,6 +51,8 @@ type Parser interface { ParseAndStore(ctx context.Context, log ethTypes.Log, chainID uint32) error } +/* BRIDGE PARSING */ + // BridgeParser parses events from the bridge contract. type BridgeParser struct { // consumerDB is the database to store parsed data in @@ -79,50 +83,12 @@ func (p *BridgeParser) EventType(log ethTypes.Log) (_ bridgeTypes.EventType, ok if eventType == nil { continue } - return *eventType, true } // return an unknown event to avoid cases where user failed to check the event type return bridgeTypes.EventType(len(bridgeTypes.AllEventTypes()) + 2), false } -// SwapParser parses events from the swap contract. -type SwapParser struct { - // consumerDB is the database to store parsed data in - consumerDB db.ConsumerDB - // swap is the address of the bridge - swapAddress common.Address - // Filterer is the swap Filterer we use to parse events - Filterer *swap.SwapFlashLoanFilterer - // consumerFetcher is the Fetcher for sender and timestamp - consumerFetcher *Fetcher - // swapFetcher is the fetcher for token data from swaps. - swapFetcher SwapFetcher -} - -// NewSwapParser creates a new parser for a given bridge. -func NewSwapParser(consumerDB db.ConsumerDB, swapAddress common.Address, swapFetcher SwapFetcher, consumerFetcher *Fetcher) (*SwapParser, error) { - filterer, err := swap.NewSwapFlashLoanFilterer(swapAddress, nil) - if err != nil { - return nil, fmt.Errorf("could not create %T: %w", bridge.SynapseBridgeFilterer{}, err) - } - return &SwapParser{consumerDB, swapAddress, filterer, consumerFetcher, swapFetcher}, nil -} - -// EventType returns the event type of a swap log. -func (p *SwapParser) EventType(log ethTypes.Log) (_ swapTypes.EventType, ok bool) { - for _, logTopic := range log.Topics { - eventType := swap.EventTypeFromTopic(logTopic) - if eventType == nil { - continue - } - - return *eventType, true - } - // return an unknown event to avoid cases where user failed to check the event type - return swapTypes.EventType(len(swapTypes.AllEventTypes()) + 2), false -} - // eventToBridgeEvent stores a bridge event. func eventToBridgeEvent(event bridgeTypes.EventLog, chainID uint32) model.BridgeEvent { var recipient sql.NullString @@ -333,6 +299,45 @@ func (p *BridgeParser) ParseAndStore(ctx context.Context, log ethTypes.Log, chai return nil } +/* SWAP PARSING */ + +// SwapParser parses events from the swap contract. +type SwapParser struct { + // consumerDB is the database to store parsed data in + consumerDB db.ConsumerDB + // swap is the address of the bridge + swapAddress common.Address + // Filterer is the swap Filterer we use to parse events + Filterer *swap.SwapFlashLoanFilterer + // consumerFetcher is the Fetcher for sender and timestamp + consumerFetcher *Fetcher + // swapFetcher is the fetcher for token data from swaps. + swapFetcher SwapFetcher +} + +// NewSwapParser creates a new parser for a given bridge. +func NewSwapParser(consumerDB db.ConsumerDB, swapAddress common.Address, swapFetcher SwapFetcher, consumerFetcher *Fetcher) (*SwapParser, error) { + filterer, err := swap.NewSwapFlashLoanFilterer(swapAddress, nil) + if err != nil { + return nil, fmt.Errorf("could not create %T: %w", bridge.SynapseBridgeFilterer{}, err) + } + return &SwapParser{consumerDB, swapAddress, filterer, consumerFetcher, swapFetcher}, nil +} + +// EventType returns the event type of a swap log. +func (p *SwapParser) EventType(log ethTypes.Log) (_ swapTypes.EventType, ok bool) { + for _, logTopic := range log.Topics { + eventType := swap.EventTypeFromTopic(logTopic) + if eventType == nil { + continue + } + + return *eventType, true + } + // return an unknown event to avoid cases where user failed to check the event type + return swapTypes.EventType(len(swapTypes.AllEventTypes()) + 2), false +} + // eventToSwapEvent stores a swap event. func eventToSwapEvent(event swapTypes.EventLog, chainID uint32) model.SwapEvent { var buyer sql.NullString @@ -511,3 +516,123 @@ func (p *SwapParser) ParseAndStore(ctx context.Context, log ethTypes.Log, chainI } return nil } + +/* MESSAGE PARSING */ + +// MessageParser parses events from the message contract. +type MessageParser struct { + // consumerDB is the database to store parsed data in + consumerDB db.ConsumerDB + // Filterer is the message Filterer we use to parse events + Filterer *message.MessageBusUpgradeableFilterer + // messageAddress is the address of the message + messageAddress common.Address + // consumerFetcher is the Fetcher for sender and timestamp + consumerFetcher *Fetcher +} + +// NewMessageParser creates a new parser for a given message. +func NewMessageParser(consumerDB db.ConsumerDB, messageAddress common.Address, consumerFetcher *Fetcher) (*MessageParser, error) { + filterer, err := message.NewMessageBusUpgradeableFilterer(messageAddress, nil) + if err != nil { + return nil, fmt.Errorf("could not create %T: %w", message.MessageBusReceiverUpgradeableFilterer{}, err) + } + return &MessageParser{consumerDB, filterer, messageAddress, consumerFetcher}, nil +} + +// EventType returns the event type of a message log. +func (m *MessageParser) EventType(log ethTypes.Log) (_ messageTypes.EventType, ok bool) { + for _, logTopic := range log.Topics { + eventType := message.EventTypeFromTopic(logTopic) + if eventType == nil { + continue + } + return *eventType, true + } + // return an unknown event to avoid cases where user failed to check the event type + return messageTypes.EventType(len(messageTypes.AllEventTypes()) + 2), false +} + +// eventToMessageEvent stores a message event. +func eventToMessageEvent(event messageTypes.EventLog, chainID uint32) model.MessageEvent { + return model.MessageEvent{ + InsertTime: uint64(time.Now().UnixNano()), + ContractAddress: event.GetContractAddress().String(), + ChainID: chainID, + EventType: event.GetEventType().Int(), + BlockNumber: event.GetBlockNumber(), + TxHash: event.GetTxHash().String(), + EventIndex: event.GetEventIndex(), + Sender: "", + MessageId: event.GetMessageId(), + SourceChainID: event.GetSourceChainID(), + + Status: ToNullString(event.GetStatus()), + SourceAddress: ToNullString(event.GetSourceAddress()), + DestinationAddress: ToNullString(event.GetDestinationAddress()), + DestinationChainID: event.GetDestinationChainID(), + Nonce: event.GetNonce(), + Message: ToNullString(event.GetMessage()), + Receiver: ToNullString(event.GetReceiver()), + Options: ToNullString(event.GetOptions()), + Fee: event.GetFee(), + TimeStamp: nil, + } +} + +// ParseAndStore parses the message logs and stores them in the database. +// +// nolint:gocognit,cyclop,dupl +func (m *MessageParser) ParseAndStore(ctx context.Context, log ethTypes.Log, chainID uint32) error { + logTopic := log.Topics[0] + iFace, err := func(log ethTypes.Log) (messageTypes.EventLog, error) { + switch logTopic { + case message.Topic(messageTypes.ExecutedEvent): + iFace, err := m.Filterer.ParseExecuted(log) + if err != nil { + return nil, fmt.Errorf("could not parse token : %w", err) + } + return iFace, nil + case message.Topic(messageTypes.MessageSentEvent): + iFace, err := m.Filterer.ParseMessageSent(log) + if err != nil { + return nil, fmt.Errorf("could not parse sent message: %w", err) + } + return iFace, nil + + default: + return nil, fmt.Errorf("unknown topic: %s", logTopic.Hex()) + } + }(log) + + if err != nil { + // Switch failed. + return err + } + + // populate message event type so following operations can mature the event data. + messageEvent := eventToMessageEvent(iFace, chainID) + + // Get timestamp from consumer + timeStamp, err := m.consumerFetcher.fetchClient.GetBlockTime(ctx, int(chainID), int(iFace.GetBlockNumber())) + // If we have a timestamp, populate the following attributes of messageEvent. + if err == nil { + timeStampBig := uint64(*timeStamp.Response) + messageEvent.TimeStamp = &timeStampBig + } + sender, err := m.consumerFetcher.FetchTxSender(ctx, chainID, iFace.GetTxHash().String()) + if err != nil { + if !core.IsTest() { + return fmt.Errorf("could not fetch tx sender: %w", err) + } + logger.Errorf("could not get tx sender: %v", err) + sender = "FAKE_SENDER" + } + messageEvent.Sender = sender + + err = m.consumerDB.StoreEvent(ctx, nil, nil, &messageEvent) + if err != nil { + return fmt.Errorf("could not store event: %w", err) + } + return nil +} diff --git a/services/explorer/contracts/message/sendreceive.go b/services/explorer/contracts/message/sendreceive.go new file mode 100644 index 0000000000..4367708a0f --- /dev/null +++ b/services/explorer/contracts/message/sendreceive.go @@ -0,0 +1,189 @@ +//nolint:revive,golint +package message + +import ( + "github.com/ethereum/go-ethereum/common" + ethTypes "github.com/ethereum/go-ethereum/core/types" + "github.com/synapsecns/sanguine/services/explorer/types/message" + "math/big" +) + +// GetEventType gets the execute event type. +func (m MessageBusUpgradeableExecuted) GetEventType() message.EventType { + return message.ExecutedEvent +} + +// GetRaw gets the raw logs. +func (m MessageBusUpgradeableExecuted) GetRaw() ethTypes.Log { + return m.Raw +} + +// GetContractAddress gets the contract address the event occurred on. +func (m MessageBusUpgradeableExecuted) GetContractAddress() common.Address { + return m.Raw.Address +} + +// GetBlockNumber gets the block number for the event. +func (m MessageBusUpgradeableExecuted) GetBlockNumber() uint64 { + return m.Raw.BlockNumber +} + +// GetTxHash gets the unique identifier (txhash) for the Execute event. +func (m MessageBusUpgradeableExecuted) GetTxHash() common.Hash { + return m.Raw.TxHash +} + +// GetEventIndex gets the block index of the event. +func (m MessageBusUpgradeableExecuted) GetEventIndex() uint64 { + return uint64(m.Raw.Index) +} + +// GetMessageId gets the message id for the event. +func (m MessageBusUpgradeableExecuted) GetMessageId() string { + return common.Bytes2Hex(m.MessageId[:]) +} + +// GetSourceChainID gets the source chain id for the event. +func (m MessageBusUpgradeableExecuted) GetSourceChainID() *big.Int { + return big.NewInt(int64(m.SrcChainId)) +} + +// GetSourceAddress gets the source address for the event. +func (m MessageBusUpgradeableExecuted) GetSourceAddress() *string { + return nil +} + +// GetStatus gets the status for the event. +func (m MessageBusUpgradeableExecuted) GetStatus() *string { + txStatus := []string{"Null", "Success", "Fail"} + return &txStatus[m.Status] +} + +// GetDestinationAddress gets the destination address for the event. +func (m MessageBusUpgradeableExecuted) GetDestinationAddress() *string { + destinationAddress := m.DstAddress.String() + return &destinationAddress +} + +// GetDestinationChainID gets the destination chain id for the event. +func (m MessageBusUpgradeableExecuted) GetDestinationChainID() *big.Int { + return nil +} + +// GetNonce gets the source nonce for the event. +func (m MessageBusUpgradeableExecuted) GetNonce() *big.Int { + return big.NewInt(int64(m.SrcNonce)) +} + +// GetMessage gets the message for the event. +func (m MessageBusUpgradeableExecuted) GetMessage() *string { + return nil +} + +// GetReceiver gets the receiver for the event. +func (m MessageBusUpgradeableExecuted) GetReceiver() *string { + return nil +} + +// GetOptions gets the options for the event. +func (m MessageBusUpgradeableExecuted) GetOptions() *string { + return nil +} + +// GetFee gets the fee for the event. +func (m MessageBusUpgradeableExecuted) GetFee() *big.Int { + return nil +} + +var _ message.EventLog = &MessageBusUpgradeableExecuted{} + +// GetEventType gets the execute event type. +func (m MessageBusUpgradeableMessageSent) GetEventType() message.EventType { + return message.ExecutedEvent +} + +// GetRaw gets the raw logs. +func (m MessageBusUpgradeableMessageSent) GetRaw() ethTypes.Log { + return m.Raw +} + +// GetContractAddress gets the contract address the event occurred on. +func (m MessageBusUpgradeableMessageSent) GetContractAddress() common.Address { + return m.Raw.Address +} + +// GetBlockNumber gets the block number for the event. +func (m MessageBusUpgradeableMessageSent) GetBlockNumber() uint64 { + return m.Raw.BlockNumber +} + +// GetTxHash gets the unique identifier (txhash) for the Execute event. +func (m MessageBusUpgradeableMessageSent) GetTxHash() common.Hash { + return m.Raw.TxHash +} + +// GetEventIndex gets the block index of the event. +func (m MessageBusUpgradeableMessageSent) GetEventIndex() uint64 { + return uint64(m.Raw.Index) +} + +// GetMessageId gets the message id for the event. +func (m MessageBusUpgradeableMessageSent) GetMessageId() string { + return common.Bytes2Hex(m.MessageId[:]) +} + +// GetSourceChainID gets the source chain id for the event. +func (m MessageBusUpgradeableMessageSent) GetSourceChainID() *big.Int { + return m.SrcChainID +} + +// GetSourceAddress gets the source address for the event. +func (m MessageBusUpgradeableMessageSent) GetSourceAddress() *string { + sourceAddress := m.Sender.String() + return &sourceAddress +} + +// GetStatus gets the status for the event. +func (m MessageBusUpgradeableMessageSent) GetStatus() *string { + return nil +} + +// GetDestinationAddress gets the destination address for the event. +func (m MessageBusUpgradeableMessageSent) GetDestinationAddress() *string { + return nil +} + +// GetDestinationChainID gets the destination chain id for the event. +func (m MessageBusUpgradeableMessageSent) GetDestinationChainID() *big.Int { + return m.DstChainId +} + +// GetNonce gets the source nonce for the event. +func (m MessageBusUpgradeableMessageSent) GetNonce() *big.Int { + return big.NewInt(int64(m.Nonce)) +} + +// GetMessage gets the message for the event. +func (m MessageBusUpgradeableMessageSent) GetMessage() *string { + message := common.Bytes2Hex(m.Message[:]) + return &message +} + +// GetReceiver gets the receiver for the event. +func (m MessageBusUpgradeableMessageSent) GetReceiver() *string { + receiver := common.Bytes2Hex(m.Receiver[:]) + return &receiver +} + +// GetOptions gets the options for the event. +func (m MessageBusUpgradeableMessageSent) GetOptions() *string { + options := common.Bytes2Hex(m.Options[:]) + return &options +} + +// GetFee gets the fee for the event. +func (m MessageBusUpgradeableMessageSent) GetFee() *big.Int { + return m.Fee +} + +var _ message.EventLog = &MessageBusUpgradeableMessageSent{} diff --git a/services/explorer/contracts/message/topics.go b/services/explorer/contracts/message/topics.go new file mode 100644 index 0000000000..876b6a268f --- /dev/null +++ b/services/explorer/contracts/message/topics.go @@ -0,0 +1,57 @@ +package message + +import ( + "bytes" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" + "github.com/synapsecns/sanguine/services/explorer/types/message" + "strings" +) + +func init() { + var err error + parsedMessage, err := abi.JSON(strings.NewReader(MessageBusUpgradeableMetaData.ABI)) + if err != nil { + panic(err) + } + + ExecutedTopic = parsedMessage.Events["Executed"].ID + + MessageSentTopic = parsedMessage.Events["MessageSent"].ID + +} + +// ExecutedTopic is the topic used for receiving messages. +var ExecutedTopic common.Hash + +// MessageSentTopic is the topic used for sending messages. +var MessageSentTopic common.Hash + +// TopicMap maps events to topics. +// this is returned as a function to assert immutability. +func TopicMap() map[message.EventType]common.Hash { + return map[message.EventType]common.Hash{ + message.ExecutedEvent: ExecutedTopic, + message.MessageSentEvent: MessageSentTopic, + } +} + +// EventTypeFromTopic gets the event type from the topic +// returns nil if the topic is not found. +func EventTypeFromTopic(ogTopic common.Hash) *message.EventType { + for eventType, topic := range TopicMap() { + if bytes.Equal(ogTopic.Bytes(), topic.Bytes()) { + return &eventType + } + } + return nil +} + +// Topic gets the topic from the event type. +func Topic(eventType message.EventType) common.Hash { + topicHash, ok := TopicMap()[message.EventType(eventType.Int())] + if !ok { + panic("unknown event") + } + return topicHash +} diff --git a/services/explorer/db/sql/model.go b/services/explorer/db/sql/model.go index 0c9a1033f9..fc7f9f8863 100644 --- a/services/explorer/db/sql/model.go +++ b/services/explorer/db/sql/model.go @@ -230,25 +230,23 @@ type MessageEvent struct { SourceChainID *big.Int `gorm:"column:source_chain_id;type:UInt256"` // Status is the status of the event. - Status *string `gorm:"column:status"` + Status sql.NullString `gorm:"column:status"` // GetSourceAddress is the address that the message will be passed from. - SourceAddress *string `gorm:"column:source_address"` + SourceAddress sql.NullString `gorm:"column:source_address"` // DestinationAddress is the address that the message will be passed to. - DestinationAddress *string `gorm:"column:destination_address"` + DestinationAddress sql.NullString `gorm:"column:destination_address"` // DestinationChainID is the chain id of the message's destination chain. DestinationChainID *big.Int `gorm:"column:destination_chain_id;type:UInt256"` - // GasLimit is the gas limit to be passed alongside the message, depending on the fee paid on the source chain. - GasLimit *big.Int `gorm:"column:gas_limit;type:UInt256"` - // SourceNonce is the source nonce of the message. - SourceNonce *big.Int `gorm:"column:source_nonce;type:UInt256"` // Nonce is the nonce of the message. Nonce *big.Int `gorm:"column:nonce;type:UInt256"` // Message is the message. - Message *string `gorm:"column:message"` + Message sql.NullString `gorm:"column:message"` // Receiver is the receiver of the event. - Receiver *string `gorm:"column:receiver"` + Receiver sql.NullString `gorm:"column:receiver"` // Options is the message. - Options *string `gorm:"column:options"` + Options sql.NullString `gorm:"column:options"` // Fee is the fee of the message. Fee *big.Int `gorm:"column:fee;type:UInt256"` + // TimeStamp is the fee of the message. + TimeStamp *uint64 `gorm:"column:timestamp"` } diff --git a/services/explorer/db/writer_test.go b/services/explorer/db/writer_test.go index 898aafbba1..dd2399e6ab 100644 --- a/services/explorer/db/writer_test.go +++ b/services/explorer/db/writer_test.go @@ -52,8 +52,6 @@ func (t *DBSuite) TestSwapWrite() { func (t *DBSuite) TestMessageWrite() { defer t.cleanup() - testString := gofakeit.Sentence(10) - address := common.BigToAddress(big.NewInt(gofakeit.Int64())).String() messageEvent := &model.MessageEvent{ InsertTime: gofakeit.Uint64(), ContractAddress: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), @@ -61,16 +59,16 @@ func (t *DBSuite) TestMessageWrite() { EventType: messageTypes.MessageSentEvent.Int(), BlockNumber: gofakeit.Uint64(), TxHash: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), - MessageId: testString, + MessageId: gofakeit.Sentence(10), SourceChainID: big.NewInt(gofakeit.Int64()), - SourceAddress: &address, + SourceAddress: sql.NullString{String: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), Valid: true}, DestinationChainID: big.NewInt(gofakeit.Int64()), Nonce: big.NewInt(gofakeit.Int64()), Fee: big.NewInt(gofakeit.Int64()), - Options: &testString, - Message: &testString, - Receiver: &address, + Options: sql.NullString{String: gofakeit.Sentence(10), Valid: true}, + Message: sql.NullString{String: gofakeit.Sentence(10), Valid: true}, + Receiver: sql.NullString{String: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), Valid: true}, } err := t.db.StoreEvent(t.GetTestContext(), nil, nil, messageEvent) Nil(t.T(), err) diff --git a/services/explorer/types/message/event.go b/services/explorer/types/message/event.go index 356dc8878d..e72370c53f 100644 --- a/services/explorer/types/message/event.go +++ b/services/explorer/types/message/event.go @@ -5,10 +5,10 @@ import ( "math/big" ) -// MessageLog is the interface for all message events. +// EventLog is the interface for all message events. // //nolint:interfacebloat -type MessageLog interface { +type EventLog interface { // GetContractAddress returns the contract address of the log. GetContractAddress() common.Address // GetBlockNumber returns the block number of the log.' @@ -19,31 +19,28 @@ type MessageLog interface { GetEventType() EventType // GetEventIndex returns the index of the log. GetEventIndex() uint64 - // GetMessageId returns the message id of the event. - GetMessageId() *[32]byte + GetMessageId() string + // GetSourceChainID returns the chain id of the message's source chain. + GetSourceChainID() *big.Int + + // GetSourceAddress gets the address that the message will be passed from. + GetSourceAddress() *string // GetStatus returns the status of the event. GetStatus() *string - // GetSourceAddress gets the address that the message will be passed from. - GetSourceAddress() *common.Address // GetDestinationAddress gets the address that the message will be passed to. - GetDestinationAddress() *common.Address - // GetSourceChainID returns the chain id of the message's source chain. - GetSourceChainID() *big.Int + GetDestinationAddress() *string // GetDestinationChainID returns the chain id of the message's destination chain. GetDestinationChainID() *big.Int - // GetGasLimit returns the gas limit to be passed alongside the message, depending on the fee paid on the source chain. - GetGasLimit() *big.Int - // GetSourceNonce returns the source nonce of the message. - GetSourceNonce() *big.Int + // GetNonce returns the nonce of the message. - GetNonce() *big.Int //TODO ask Trajan about src vs nonce + GetNonce() *big.Int // GetMessage gets the message. - GetMessage() *[]byte + GetMessage() *string // GetReceiver returns the receiver of the event. - GetReceiver() *[32]byte + GetReceiver() *string // GetOptions gets the message. - GetOptions() *[]byte + GetOptions() *string // GetFee returns the fee of the message. GetFee() *big.Int } From aa185ff888ae05812a23470196c4f523c609020c Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Oct 2022 05:47:07 -0400 Subject: [PATCH 09/10] backfill/parsing full test, added tests to test contracts testutils --- services/explorer/consumer/backfill/chain.go | 17 +++- .../explorer/consumer/backfill/chain_test.go | 89 ++++++++++++++++++- services/explorer/consumer/parser.go | 20 ++--- .../explorer/contracts/message/sendreceive.go | 14 +-- services/explorer/contracts/message/topics.go | 1 - services/explorer/db/mocks/consumer_db.go | 10 +-- services/explorer/db/sql/model.go | 2 +- services/explorer/db/writer_test.go | 2 +- services/explorer/testutil/contract_test.go | 3 - services/explorer/testutil/contracttype.go | 2 - .../testutil/testcontracts/contract_test.go | 47 ++++++++++ .../testutil/testcontracts/contracttype.go | 3 +- .../testcontracts/contracttypeimpl_string.go | 5 +- .../testutil/testcontracts/deployers.go | 2 +- .../testutil/testcontracts/suite_test.go | 40 +++++++++ .../testutil/testcontracts/typecast.go | 4 +- .../testutil/testcontracts/typecast_test.go | 17 ++++ services/explorer/types/message/event.go | 4 +- 18 files changed, 239 insertions(+), 43 deletions(-) create mode 100644 services/explorer/testutil/testcontracts/contract_test.go create mode 100644 services/explorer/testutil/testcontracts/suite_test.go create mode 100644 services/explorer/testutil/testcontracts/typecast_test.go diff --git a/services/explorer/consumer/backfill/chain.go b/services/explorer/consumer/backfill/chain.go index 8ce3a9cceb..ee4b3f25d7 100644 --- a/services/explorer/consumer/backfill/chain.go +++ b/services/explorer/consumer/backfill/chain.go @@ -31,10 +31,14 @@ type ChainBackfiller struct { bridgeConfigAddress common.Address // fetcher is the fetcher to use to fetch logs. fetcher consumer.Fetcher + // messageParser is the parser to use to parse message events. + messageParser *consumer.MessageParser + // messageAddress is the address of the message contract. + messageAddress common.Address } // NewChainBackfiller creates a new backfiller for a chain. -func NewChainBackfiller(chainID uint32, consumerDB db.ConsumerDB, fetchBlockIncrement uint64, bridgeParser *consumer.BridgeParser, bridgeAddress common.Address, swapParsers map[common.Address]*consumer.SwapParser, fetcher consumer.Fetcher, bridgeConfigAddress common.Address) *ChainBackfiller { +func NewChainBackfiller(chainID uint32, consumerDB db.ConsumerDB, fetchBlockIncrement uint64, bridgeParser *consumer.BridgeParser, bridgeAddress common.Address, swapParsers map[common.Address]*consumer.SwapParser, fetcher consumer.Fetcher, bridgeConfigAddress common.Address, messageParser *consumer.MessageParser, messageAddress common.Address) *ChainBackfiller { failedLogs := atomic.Uint32{} failedLogs.Store(0) return &ChainBackfiller{ @@ -46,6 +50,8 @@ func NewChainBackfiller(chainID uint32, consumerDB db.ConsumerDB, fetchBlockIncr swapParsers: swapParsers, fetcher: fetcher, bridgeConfigAddress: bridgeConfigAddress, + messageParser: messageParser, + messageAddress: messageAddress, } } @@ -109,16 +115,19 @@ func (c *ChainBackfiller) processLogs(ctx context.Context, logs []ethTypes.Log) log := log g.Go(func() error { var eventParser consumer.Parser - if log.Address == c.bridgeAddress { + switch log.Address { + case c.bridgeAddress: eventParser = c.bridgeParser - } else { + case c.messageAddress: + eventParser = c.messageParser + default: if c.swapParsers[log.Address] == nil { logger.Warnf("no parser found for contract %s", log.Address.Hex()) return nil } eventParser = c.swapParsers[log.Address] } - + fmt.Println("hey") err := eventParser.ParseAndStore(groupCtx, log, c.chainID) if err != nil { return fmt.Errorf("could not parse and store log: %w", err) diff --git a/services/explorer/consumer/backfill/chain_test.go b/services/explorer/consumer/backfill/chain_test.go index df0fabdc6c..9a52938f1d 100644 --- a/services/explorer/consumer/backfill/chain_test.go +++ b/services/explorer/consumer/backfill/chain_test.go @@ -13,6 +13,7 @@ import ( "github.com/synapsecns/sanguine/services/explorer/db/sql" "github.com/synapsecns/sanguine/services/explorer/testutil/testcontracts" bridgeTypes "github.com/synapsecns/sanguine/services/explorer/types/bridge" + messageTypes "github.com/synapsecns/sanguine/services/explorer/types/message" swapTypes "github.com/synapsecns/sanguine/services/explorer/types/swap" "math/big" ) @@ -24,12 +25,15 @@ func arrayToTokenIndexMap(input []*big.Int) map[uint8]string { } return output } + +// nolint:maintidx func (b *BackfillSuite) TestBackfill() { testChainID := b.testBackend.GetBigChainID() bridgeContract, bridgeRef := b.testDeployManager.GetTestSynapseBridge(b.GetTestContext(), b.testBackend) swapContractA, swapRefA := b.testDeployManager.GetTestSwapFlashLoan(b.GetTestContext(), b.testBackend) testDeployManagerB := testcontracts.NewDeployManager(b.T()) swapContractB, swapRefB := testDeployManagerB.GetTestSwapFlashLoan(b.GetTestContext(), b.testBackend) + messageContract, messageRef := b.testDeployManager.GetTestMessageBusUpgradeable(b.GetTestContext(), b.testBackend) transactOpts := b.testBackend.GetTxContext(b.GetTestContext(), nil) @@ -117,7 +121,20 @@ func (b *BackfillSuite) TestBackfill() { flashLoanLog, err := b.storeTestLog(swapTx, uint32(testChainID.Uint64()), 9) Nil(b.T(), err) + // Store every message event. + messageTx, err := messageRef.TestExecuted(transactOpts.TransactOpts, [32]byte{byte(gofakeit.Uint64())}, uint8(gofakeit.Number(0, 2)), common.BigToAddress(big.NewInt(gofakeit.Int64())), gofakeit.Uint64(), gofakeit.Uint64()) + Nil(b.T(), err) + executedLog, err := b.storeTestLog(messageTx, uint32(testChainID.Uint64()), 3) + Nil(b.T(), err) + + messageTx, err = messageRef.TestMessageSent(transactOpts.TransactOpts, common.BigToAddress(big.NewInt(gofakeit.Int64())), big.NewInt(int64(gofakeit.Uint32())), [32]byte{byte(gofakeit.Uint64())}, big.NewInt(int64(gofakeit.Uint32())), []byte{byte(gofakeit.Uint64())}, gofakeit.Uint64(), []byte{byte(gofakeit.Uint64())}, big.NewInt(int64(gofakeit.Uint32())), [32]byte{byte(gofakeit.Uint64())}) + Nil(b.T(), err) + messageSentLog, err := b.storeTestLog(messageTx, uint32(testChainID.Uint64()), 4) + Nil(b.T(), err) + // set up a ChainBackfiller + + // bridge bcf, err := consumer.NewBridgeConfigFetcher(b.bridgeConfigContract.Address(), b.testBackend) Nil(b.T(), err) bp, err := consumer.NewBridgeParser(b.db, bridgeContract.Address(), *bcf, b.consumerFetcher) @@ -134,11 +151,16 @@ func (b *BackfillSuite) TestBackfill() { Nil(b.T(), err) spB, err := consumer.NewSwapParser(b.db, swapContractB.Address(), *srB, b.consumerFetcher) Nil(b.T(), err) + + // message + mbp, err := consumer.NewMessageParser(b.db, messageContract.Address(), b.consumerFetcher) + Nil(b.T(), err) + spMap := map[common.Address]*consumer.SwapParser{} spMap[swapContractA.Address()] = spA spMap[swapContractB.Address()] = spB f := consumer.NewFetcher(b.gqlClient) - chainBackfiller := backfill.NewChainBackfiller(uint32(testChainID.Uint64()), b.db, 3, bp, bridgeContract.Address(), spMap, *f, b.bridgeConfigContract.Address()) + chainBackfiller := backfill.NewChainBackfiller(uint32(testChainID.Uint64()), b.db, 3, bp, bridgeContract.Address(), spMap, *f, b.bridgeConfigContract.Address(), mbp, messageContract.Address()) // backfill the blocks err = chainBackfiller.Backfill(b.GetTestContext(), 0, 12) @@ -150,6 +172,9 @@ func (b *BackfillSuite) TestBackfill() { swapEvents := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Find(&sql.SwapEvent{}).Count(&count) Nil(b.T(), swapEvents.Error) Equal(b.T(), int64(10), count) + messageEvents := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Find(&sql.MessageEvent{}).Count(&count) + Nil(b.T(), messageEvents.Error) + Equal(b.T(), int64(2), count) // Test bridge parity err = b.depositParity(depositLog, bp, uint32(testChainID.Uint64())) @@ -194,6 +219,12 @@ func (b *BackfillSuite) TestBackfill() { Nil(b.T(), err) err = b.flashLoanParity(flashLoanLog, spA, uint32(testChainID.Uint64())) Nil(b.T(), err) + + // Test message parity + err = b.executedParity(executedLog, mbp, uint32(testChainID.Uint64())) + Nil(b.T(), err) + err = b.messageSentParity(messageSentLog, mbp, uint32(testChainID.Uint64())) + Nil(b.T(), err) } func (b *BackfillSuite) storeTestLog(tx *types.Transaction, chainID uint32, blockNumber uint64) (*types.Log, error) { @@ -890,3 +921,59 @@ func (b *BackfillSuite) flashLoanParity(log *types.Log, parser *consumer.SwapPar Equal(b.T(), feeArray, storedLog.AmountFee) return nil } + +//nolint:dupl +func (b *BackfillSuite) executedParity(log *types.Log, parser *consumer.MessageParser, chainID uint32) error { + // parse the log + parsedLog, err := parser.Filterer.ParseExecuted(*log) + if err != nil { + return fmt.Errorf("error parsing log: %w", err) + } + var storedLog sql.MessageEvent + var count int64 + events := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Model(&sql.MessageEvent{}). + Where(&sql.MessageEvent{ + ContractAddress: log.Address.String(), + ChainID: chainID, + EventType: messageTypes.ExecutedEvent.Int(), + BlockNumber: log.BlockNumber, + TxHash: log.TxHash.String(), + + MessageID: common.Bytes2Hex(parsedLog.MessageId[:]), + SourceChainID: big.NewInt(int64(parsedLog.SrcChainId)), + }). + Find(&storedLog).Count(&count) + if events.Error != nil { + return fmt.Errorf("error querying for event: %w", events.Error) + } + Equal(b.T(), int64(1), count) + return nil +} + +//nolint:dupl +func (b *BackfillSuite) messageSentParity(log *types.Log, parser *consumer.MessageParser, chainID uint32) error { + // parse the log + parsedLog, err := parser.Filterer.ParseMessageSent(*log) + if err != nil { + return fmt.Errorf("error parsing log: %w", err) + } + var storedLog sql.MessageEvent + var count int64 + events := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Model(&sql.MessageEvent{}). + Where(&sql.MessageEvent{ + ContractAddress: log.Address.String(), + ChainID: chainID, + EventType: messageTypes.MessageSentEvent.Int(), + BlockNumber: log.BlockNumber, + TxHash: log.TxHash.String(), + + MessageID: common.Bytes2Hex(parsedLog.MessageId[:]), + SourceChainID: parsedLog.SrcChainID, + }). + Find(&storedLog).Count(&count) + if events.Error != nil { + return fmt.Errorf("error querying for event: %w", events.Error) + } + Equal(b.T(), int64(1), count) + return nil +} diff --git a/services/explorer/consumer/parser.go b/services/explorer/consumer/parser.go index 9b15cd98de..3fb895ffc1 100644 --- a/services/explorer/consumer/parser.go +++ b/services/explorer/consumer/parser.go @@ -564,7 +564,7 @@ func eventToMessageEvent(event messageTypes.EventLog, chainID uint32) model.Mess TxHash: event.GetTxHash().String(), EventIndex: event.GetEventIndex(), Sender: "", - MessageId: event.GetMessageId(), + MessageID: event.GetMessageID(), SourceChainID: event.GetSourceChainID(), Status: ToNullString(event.GetStatus()), @@ -620,15 +620,15 @@ func (m *MessageParser) ParseAndStore(ctx context.Context, log ethTypes.Log, cha timeStampBig := uint64(*timeStamp.Response) messageEvent.TimeStamp = &timeStampBig } - sender, err := m.consumerFetcher.FetchTxSender(ctx, chainID, iFace.GetTxHash().String()) - if err != nil { - if !core.IsTest() { - return fmt.Errorf("could not fetch tx sender: %w", err) - } - logger.Errorf("could not get tx sender: %v", err) - sender = "FAKE_SENDER" - } - messageEvent.Sender = sender + // sender, err := m.consumerFetcher.FetchTxSender(ctx, chainID, iFace.GetTxHash().String()) + // if err != nil { + // if !core.IsTest() { + // return fmt.Errorf("could not fetch tx sender: %w", err) + // } + // logger.Errorf("could not get tx sender: %v", err) + // sender = "FAKE_SENDER" + //} + // messageEvent.Sender = sender err = m.consumerDB.StoreEvent(ctx, nil, nil, &messageEvent) if err != nil { diff --git a/services/explorer/contracts/message/sendreceive.go b/services/explorer/contracts/message/sendreceive.go index 4367708a0f..dc6fb6a699 100644 --- a/services/explorer/contracts/message/sendreceive.go +++ b/services/explorer/contracts/message/sendreceive.go @@ -38,8 +38,8 @@ func (m MessageBusUpgradeableExecuted) GetEventIndex() uint64 { return uint64(m.Raw.Index) } -// GetMessageId gets the message id for the event. -func (m MessageBusUpgradeableExecuted) GetMessageId() string { +// GetMessageID gets the message id for the event. +func (m MessageBusUpgradeableExecuted) GetMessageID() string { return common.Bytes2Hex(m.MessageId[:]) } @@ -99,7 +99,7 @@ var _ message.EventLog = &MessageBusUpgradeableExecuted{} // GetEventType gets the execute event type. func (m MessageBusUpgradeableMessageSent) GetEventType() message.EventType { - return message.ExecutedEvent + return message.MessageSentEvent } // GetRaw gets the raw logs. @@ -127,8 +127,8 @@ func (m MessageBusUpgradeableMessageSent) GetEventIndex() uint64 { return uint64(m.Raw.Index) } -// GetMessageId gets the message id for the event. -func (m MessageBusUpgradeableMessageSent) GetMessageId() string { +// GetMessageID gets the message id for the event. +func (m MessageBusUpgradeableMessageSent) GetMessageID() string { return common.Bytes2Hex(m.MessageId[:]) } @@ -165,7 +165,7 @@ func (m MessageBusUpgradeableMessageSent) GetNonce() *big.Int { // GetMessage gets the message for the event. func (m MessageBusUpgradeableMessageSent) GetMessage() *string { - message := common.Bytes2Hex(m.Message[:]) + message := common.Bytes2Hex(m.Message) return &message } @@ -177,7 +177,7 @@ func (m MessageBusUpgradeableMessageSent) GetReceiver() *string { // GetOptions gets the options for the event. func (m MessageBusUpgradeableMessageSent) GetOptions() *string { - options := common.Bytes2Hex(m.Options[:]) + options := common.Bytes2Hex(m.Options) return &options } diff --git a/services/explorer/contracts/message/topics.go b/services/explorer/contracts/message/topics.go index 876b6a268f..75ee016b05 100644 --- a/services/explorer/contracts/message/topics.go +++ b/services/explorer/contracts/message/topics.go @@ -18,7 +18,6 @@ func init() { ExecutedTopic = parsedMessage.Events["Executed"].ID MessageSentTopic = parsedMessage.Events["MessageSent"].ID - } // ExecutedTopic is the topic used for receiving messages. diff --git a/services/explorer/db/mocks/consumer_db.go b/services/explorer/db/mocks/consumer_db.go index 278d0c5183..564636cfc7 100644 --- a/services/explorer/db/mocks/consumer_db.go +++ b/services/explorer/db/mocks/consumer_db.go @@ -270,13 +270,13 @@ func (_m *ConsumerDB) ReadBlockNumberByChainID(ctx context.Context, eventType in return r0, r1 } -// StoreEvent provides a mock function with given fields: ctx, bridgeEvent, swapEvent -func (_m *ConsumerDB) StoreEvent(ctx context.Context, bridgeEvent *sql.BridgeEvent, swapEvent *sql.SwapEvent) error { - ret := _m.Called(ctx, bridgeEvent, swapEvent) +// StoreEvent provides a mock function with given fields: ctx, bridgeEvent, swapEvent, messageEvent +func (_m *ConsumerDB) StoreEvent(ctx context.Context, bridgeEvent *sql.BridgeEvent, swapEvent *sql.SwapEvent, messageEvent *sql.MessageEvent) error { + ret := _m.Called(ctx, bridgeEvent, swapEvent, messageEvent) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *sql.BridgeEvent, *sql.SwapEvent) error); ok { - r0 = rf(ctx, bridgeEvent, swapEvent) + if rf, ok := ret.Get(0).(func(context.Context, *sql.BridgeEvent, *sql.SwapEvent, *sql.MessageEvent) error); ok { + r0 = rf(ctx, bridgeEvent, swapEvent, messageEvent) } else { r0 = ret.Error(0) } diff --git a/services/explorer/db/sql/model.go b/services/explorer/db/sql/model.go index fc7f9f8863..056a51eba6 100644 --- a/services/explorer/db/sql/model.go +++ b/services/explorer/db/sql/model.go @@ -225,7 +225,7 @@ type MessageEvent struct { // Sender is the address of the sender Sender string `gorm:"column:sender"` // MessageId is the message id of the event. - MessageId string `gorm:"column:message_id"` + MessageID string `gorm:"column:message_id"` // SourceChainID is the chain id of the message's source chain. SourceChainID *big.Int `gorm:"column:source_chain_id;type:UInt256"` diff --git a/services/explorer/db/writer_test.go b/services/explorer/db/writer_test.go index dd2399e6ab..e48354b9f0 100644 --- a/services/explorer/db/writer_test.go +++ b/services/explorer/db/writer_test.go @@ -59,7 +59,7 @@ func (t *DBSuite) TestMessageWrite() { EventType: messageTypes.MessageSentEvent.Int(), BlockNumber: gofakeit.Uint64(), TxHash: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), - MessageId: gofakeit.Sentence(10), + MessageID: gofakeit.Sentence(10), SourceChainID: big.NewInt(gofakeit.Int64()), SourceAddress: sql.NullString{String: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), Valid: true}, diff --git a/services/explorer/testutil/contract_test.go b/services/explorer/testutil/contract_test.go index 220763340d..c0820a29e1 100644 --- a/services/explorer/testutil/contract_test.go +++ b/services/explorer/testutil/contract_test.go @@ -1,7 +1,6 @@ package testutil_test import ( - "fmt" . "github.com/stretchr/testify/assert" "github.com/synapsecns/sanguine/ethergo/contracts" "github.com/synapsecns/sanguine/ethergo/deployer" @@ -13,8 +12,6 @@ func (s *SimulatedSuite) GetDeployedContractsFromRegistry(registry deployer.Cont deployedContracts = make(map[int]contracts.ContractType) for _, contractType := range testutil.AllContractTypes { - fmt.Println("YOOOO contractType", contractType, testutil.AllContractTypes) - if registry.IsContractDeployed(contractType) { deployedContracts[contractType.ID()] = contractType } diff --git a/services/explorer/testutil/contracttype.go b/services/explorer/testutil/contracttype.go index 48ecafa990..ba6946b1e1 100644 --- a/services/explorer/testutil/contracttype.go +++ b/services/explorer/testutil/contracttype.go @@ -1,7 +1,6 @@ package testutil import ( - "fmt" "github.com/ethereum/go-ethereum/common/compiler" "github.com/synapsecns/sanguine/ethergo/contracts" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge" @@ -65,7 +64,6 @@ func (c contractTypeImpl) Name() string { // ContractInfo gets the source code of every contract. See TODO above. // TODO these should use contract name and maybe come out of the generator. func (c contractTypeImpl) ContractInfo() *compiler.Contract { - fmt.Println("YOOOO") switch c { case BridgeConfigTypeV3: return bridgeconfig.Contracts["/solidity/BridgeConfigV3_flat.sol:BridgeConfigV3"] diff --git a/services/explorer/testutil/testcontracts/contract_test.go b/services/explorer/testutil/testcontracts/contract_test.go new file mode 100644 index 0000000000..43103d3297 --- /dev/null +++ b/services/explorer/testutil/testcontracts/contract_test.go @@ -0,0 +1,47 @@ +package testcontracts_test + +import ( + . "github.com/stretchr/testify/assert" + "github.com/synapsecns/sanguine/ethergo/contracts" + "github.com/synapsecns/sanguine/ethergo/deployer" + "github.com/synapsecns/sanguine/services/explorer/testutil/testcontracts" +) + +// GetDeployedContractsFromRegistry gets any registered contract types that are present in the registry. +func (s *SimulatedSuite) GetDeployedContractsFromRegistry(registry deployer.ContractRegistry) (deployedContracts map[int]contracts.ContractType) { + deployedContracts = make(map[int]contracts.ContractType) + + for _, contractType := range testcontracts.AllContractTypes { + if registry.IsContractDeployed(contractType) { + deployedContracts[contractType.ID()] = contractType + } + } + return deployedContracts +} + +// TestDependencies asserts all dependencies are included in contracts. +// TODO: this should be included in ethergo. +func (s *SimulatedSuite) TestDependencies() { + s.deployManager = testcontracts.NewDeployManager(s.T()) + wrappedBackend := s.testBackend + registeredContracts := s.deployManager.GetContractRegistry(wrappedBackend).RegisteredDeployers() + + // test until all contacts are done + for _, contract := range registeredContracts { + s.deployManager = testcontracts.NewDeployManager(s.T()) + contractRegistry := s.deployManager.GetContractRegistry(wrappedBackend) + Equal(s.T(), len(s.GetDeployedContractsFromRegistry(contractRegistry)), 0) + + // the contract is currently on the wrong backend, so we need to make it on the right backend + dc := contractRegistry.Get(s.GetTestContext(), contract.ContractType()) + Equal(s.T(), dc.ChainID().String(), wrappedBackend.GetBigChainID().String()) + + deployedContracts := s.GetDeployedContractsFromRegistry(contractRegistry) + // make sure dependency count is equal (adding our own contract to there expected amount) + Equal(s.T(), len(deployedContracts), len(contract.Dependencies())+1) + for _, dep := range contract.Dependencies() { + _, hasDep := deployedContracts[dep.ID()] + True(s.T(), hasDep) + } + } +} diff --git a/services/explorer/testutil/testcontracts/contracttype.go b/services/explorer/testutil/testcontracts/contracttype.go index 9ec27931a1..e84130fb12 100644 --- a/services/explorer/testutil/testcontracts/contracttype.go +++ b/services/explorer/testutil/testcontracts/contracttype.go @@ -5,6 +5,7 @@ import ( "github.com/synapsecns/sanguine/ethergo/contracts" "github.com/synapsecns/sanguine/services/explorer/contracts/bridge/testbridge" "github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig" + "github.com/synapsecns/sanguine/services/explorer/contracts/message/testmessage" "github.com/synapsecns/sanguine/services/explorer/contracts/swap/testswap" ) @@ -71,7 +72,7 @@ func (c contractTypeImpl) ContractInfo() *compiler.Contract { case TestSwapFlashLoanType: return testswap.Contracts["/solidity/TestSwapFlashLoan.sol:TestSwapFlashLoan"] case TestMessageBusUpgradeableType: - return testswap.Contracts["/solidity/TestMessageBusUpgradeable.sol:TestMessageBusUpgradeable"] + return testmessage.Contracts["/solidity/TestMessageBusUpgradeable.sol:TestMessageBusUpgradeable"] default: panic("not yet implemented") diff --git a/services/explorer/testutil/testcontracts/contracttypeimpl_string.go b/services/explorer/testutil/testcontracts/contracttypeimpl_string.go index 211cd523cc..eb69873faa 100644 --- a/services/explorer/testutil/testcontracts/contracttypeimpl_string.go +++ b/services/explorer/testutil/testcontracts/contracttypeimpl_string.go @@ -11,11 +11,12 @@ func _() { _ = x[TestBridgeConfigTypeV3-0] _ = x[TestSynapseBridgeType-1] _ = x[TestSwapFlashLoanType-2] + _ = x[TestMessageBusUpgradeableType-3] } -const _contractTypeImpl_name = "TestBridgeConfigTypeV3TestSynapseBridgeTypeTestSwapFlashLoanType" +const _contractTypeImpl_name = "TestBridgeConfigTypeV3TestSynapseBridgeTypeTestSwapFlashLoanTypeTestMessageBusUpgradeableType" -var _contractTypeImpl_index = [...]uint8{0, 22, 43, 64} +var _contractTypeImpl_index = [...]uint8{0, 22, 43, 64, 93} func (i contractTypeImpl) String() string { if i < 0 || i >= contractTypeImpl(len(_contractTypeImpl_index)-1) { diff --git a/services/explorer/testutil/testcontracts/deployers.go b/services/explorer/testutil/testcontracts/deployers.go index 96f61d4af0..4729da2a9b 100644 --- a/services/explorer/testutil/testcontracts/deployers.go +++ b/services/explorer/testutil/testcontracts/deployers.go @@ -29,7 +29,7 @@ func NewTestMessageBusUpgradeableDeployer(registry deployer.GetOnlyContractRegis // Deploy deploys a test message. func (t TestMessageBusUpgradeableDeployer) Deploy(ctx context.Context) (contracts.DeployedContract, error) { return t.DeploySimpleContract(ctx, func(transactOps *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, interface{}, error) { - return testmessage.DeployMessageBusUpgradeable(transactOps, backend) + return testmessage.DeployTestMessageBusUpgradeable(transactOps, backend) }, func(address common.Address, backend bind.ContractBackend) (interface{}, error) { return testmessage.NewTestMessageRef(address, backend) }) diff --git a/services/explorer/testutil/testcontracts/suite_test.go b/services/explorer/testutil/testcontracts/suite_test.go new file mode 100644 index 0000000000..4811a2b212 --- /dev/null +++ b/services/explorer/testutil/testcontracts/suite_test.go @@ -0,0 +1,40 @@ +package testcontracts_test + +import ( + "github.com/stretchr/testify/suite" + "github.com/synapsecns/sanguine/core/testsuite" + "github.com/synapsecns/sanguine/ethergo/backends" + "github.com/synapsecns/sanguine/ethergo/backends/simulated" + "github.com/synapsecns/sanguine/services/explorer/testutil/testcontracts" + "testing" +) + +// SimulatedSuite is used to test individual contract deployments to make sure other tests don't break. +type SimulatedSuite struct { + *testsuite.TestSuite + // testBackend is the test backend + testBackend backends.SimulatedTestBackend + // deployManager is the deploy helper + deployManager *testcontracts.DeployManager +} + +// SetupTest sets up a test. +func (s *SimulatedSuite) SetupTest() { + s.TestSuite.SetupTest() + + s.testBackend = simulated.NewSimulatedBackend(s.GetTestContext(), s.T()) + s.deployManager = testcontracts.NewDeployManager(s.T()) + s.deployManager.GetContractRegistry(s.testBackend) +} + +// NewSimulatedSuite creates a end-to-end test suite. +func NewSimulatedSuite(tb testing.TB) *SimulatedSuite { + tb.Helper() + return &SimulatedSuite{ + TestSuite: testsuite.NewTestSuite(tb), + } +} + +func TestSimulatedSuite(t *testing.T) { + suite.Run(t, NewSimulatedSuite(t)) +} diff --git a/services/explorer/testutil/testcontracts/typecast.go b/services/explorer/testutil/testcontracts/typecast.go index 61ec4a25f8..7593ef48f2 100644 --- a/services/explorer/testutil/testcontracts/typecast.go +++ b/services/explorer/testutil/testcontracts/typecast.go @@ -48,8 +48,8 @@ func (d *DeployManager) GetTestSwapFlashLoan(ctx context.Context, backend backen return swapContract, swapHandle } -// GetMessageBusUpgradeable gets a typecast test swap contract. -func (d *DeployManager) GetMessageBusUpgradeable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testmessage.TestMessageRef) { +// GetTestMessageBusUpgradeable gets a typecast test swap contract. +func (d *DeployManager) GetTestMessageBusUpgradeable(ctx context.Context, backend backends.SimulatedTestBackend) (contract contracts.DeployedContract, handle *testmessage.TestMessageRef) { d.T().Helper() messageContract := d.GetContractRegistry(backend).Get(ctx, TestMessageBusUpgradeableType) diff --git a/services/explorer/testutil/testcontracts/typecast_test.go b/services/explorer/testutil/testcontracts/typecast_test.go new file mode 100644 index 0000000000..05e90e66fe --- /dev/null +++ b/services/explorer/testutil/testcontracts/typecast_test.go @@ -0,0 +1,17 @@ +package testcontracts_test + +import . "github.com/stretchr/testify/assert" + +// TestTypecast tests the typecast. +func (s SimulatedSuite) TestTypecast() { + NotPanics(s.T(), func() { + _, bridgeConfigHandle := s.deployManager.GetBridgeConfigV3(s.GetTestContext(), s.testBackend) + NotNil(s.T(), bridgeConfigHandle) + _, bridgeHandle := s.deployManager.GetTestSynapseBridge(s.GetTestContext(), s.testBackend) + NotNil(s.T(), bridgeHandle) + _, swapHandle := s.deployManager.GetTestSwapFlashLoan(s.GetTestContext(), s.testBackend) + NotNil(s.T(), swapHandle) + _, messageHandle := s.deployManager.GetTestMessageBusUpgradeable(s.GetTestContext(), s.testBackend) + NotNil(s.T(), messageHandle) + }) +} diff --git a/services/explorer/types/message/event.go b/services/explorer/types/message/event.go index e72370c53f..f55881a7ad 100644 --- a/services/explorer/types/message/event.go +++ b/services/explorer/types/message/event.go @@ -19,8 +19,8 @@ type EventLog interface { GetEventType() EventType // GetEventIndex returns the index of the log. GetEventIndex() uint64 - // GetMessageId returns the message id of the event. - GetMessageId() string + // GetMessageID returns the message id of the event. + GetMessageID() string // GetSourceChainID returns the chain id of the message's source chain. GetSourceChainID() *big.Int From 44057ba2dc6f51dbd744c2d6ba8a956198f5f5b2 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 14 Oct 2022 16:24:28 -0400 Subject: [PATCH 10/10] addressing comments + add CallReverted event --- services/explorer/consumer/backfill/chain.go | 1 - .../explorer/consumer/backfill/chain_test.go | 53 ++++++-- services/explorer/consumer/parser.go | 40 ++----- .../explorer/contracts/message/sendreceive.go | 113 +++++++++++++++++- .../contract/TestMessageBusUpgradeable.sol | 7 ++ .../message/testmessage/testmessage.abigen.go | 34 +++++- .../testmessage/testmessage.contractinfo.json | 2 +- services/explorer/contracts/message/topics.go | 10 +- services/explorer/db/consumerinterface.go | 3 +- services/explorer/db/mocks/consumer_db.go | 12 +- services/explorer/db/sql/model.go | 14 ++- services/explorer/db/sql/writer.go | 18 +-- services/explorer/db/writer_test.go | 23 ++-- services/explorer/types/message/event.go | 4 +- services/explorer/types/message/eventtype.go | 4 +- .../types/message/eventtype_string.go | 5 +- 16 files changed, 254 insertions(+), 89 deletions(-) diff --git a/services/explorer/consumer/backfill/chain.go b/services/explorer/consumer/backfill/chain.go index ee4b3f25d7..d8b493e625 100644 --- a/services/explorer/consumer/backfill/chain.go +++ b/services/explorer/consumer/backfill/chain.go @@ -127,7 +127,6 @@ func (c *ChainBackfiller) processLogs(ctx context.Context, logs []ethTypes.Log) } eventParser = c.swapParsers[log.Address] } - fmt.Println("hey") err := eventParser.ParseAndStore(groupCtx, log, c.chainID) if err != nil { return fmt.Errorf("could not parse and store log: %w", err) diff --git a/services/explorer/consumer/backfill/chain_test.go b/services/explorer/consumer/backfill/chain_test.go index 9a52938f1d..8f1e117db1 100644 --- a/services/explorer/consumer/backfill/chain_test.go +++ b/services/explorer/consumer/backfill/chain_test.go @@ -124,12 +124,17 @@ func (b *BackfillSuite) TestBackfill() { // Store every message event. messageTx, err := messageRef.TestExecuted(transactOpts.TransactOpts, [32]byte{byte(gofakeit.Uint64())}, uint8(gofakeit.Number(0, 2)), common.BigToAddress(big.NewInt(gofakeit.Int64())), gofakeit.Uint64(), gofakeit.Uint64()) Nil(b.T(), err) - executedLog, err := b.storeTestLog(messageTx, uint32(testChainID.Uint64()), 3) + executedLog, err := b.storeTestLog(messageTx, uint32(testChainID.Uint64()), 5) Nil(b.T(), err) - messageTx, err = messageRef.TestMessageSent(transactOpts.TransactOpts, common.BigToAddress(big.NewInt(gofakeit.Int64())), big.NewInt(int64(gofakeit.Uint32())), [32]byte{byte(gofakeit.Uint64())}, big.NewInt(int64(gofakeit.Uint32())), []byte{byte(gofakeit.Uint64())}, gofakeit.Uint64(), []byte{byte(gofakeit.Uint64())}, big.NewInt(int64(gofakeit.Uint32())), [32]byte{byte(gofakeit.Uint64())}) + messageTx, err = messageRef.TestMessageSent(transactOpts.TransactOpts, common.BigToAddress(big.NewInt(gofakeit.Int64())), big.NewInt(int64(gofakeit.Uint32())), [32]byte{byte(gofakeit.Uint64())}, big.NewInt(int64(gofakeit.Uint32())), []byte(gofakeit.Paragraph(2, 5, 30, " ")), gofakeit.Uint64(), []byte{byte(gofakeit.Uint64())}, big.NewInt(int64(gofakeit.Uint32())), [32]byte{byte(gofakeit.Uint64())}) Nil(b.T(), err) - messageSentLog, err := b.storeTestLog(messageTx, uint32(testChainID.Uint64()), 4) + messageSentLog, err := b.storeTestLog(messageTx, uint32(testChainID.Uint64()), 6) + Nil(b.T(), err) + + messageTx, err = messageRef.TestCallReverted(transactOpts.TransactOpts, gofakeit.Paragraph(2, 4, 20, " ")) + Nil(b.T(), err) + callRevertedLog, err := b.storeTestLog(messageTx, uint32(testChainID.Uint64()), 7) Nil(b.T(), err) // set up a ChainBackfiller @@ -163,7 +168,7 @@ func (b *BackfillSuite) TestBackfill() { chainBackfiller := backfill.NewChainBackfiller(uint32(testChainID.Uint64()), b.db, 3, bp, bridgeContract.Address(), spMap, *f, b.bridgeConfigContract.Address(), mbp, messageContract.Address()) // backfill the blocks - err = chainBackfiller.Backfill(b.GetTestContext(), 0, 12) + err = chainBackfiller.Backfill(b.GetTestContext(), 0, 14) Nil(b.T(), err) var count int64 bridgeEvents := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Find(&sql.BridgeEvent{}).Count(&count) @@ -174,7 +179,7 @@ func (b *BackfillSuite) TestBackfill() { Equal(b.T(), int64(10), count) messageEvents := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Find(&sql.MessageEvent{}).Count(&count) Nil(b.T(), messageEvents.Error) - Equal(b.T(), int64(2), count) + Equal(b.T(), int64(3), count) // Test bridge parity err = b.depositParity(depositLog, bp, uint32(testChainID.Uint64())) @@ -225,6 +230,8 @@ func (b *BackfillSuite) TestBackfill() { Nil(b.T(), err) err = b.messageSentParity(messageSentLog, mbp, uint32(testChainID.Uint64())) Nil(b.T(), err) + err = b.callRevertedParity(callRevertedLog, mbp, uint32(testChainID.Uint64())) + Nil(b.T(), err) } func (b *BackfillSuite) storeTestLog(tx *types.Transaction, chainID uint32, blockNumber uint64) (*types.Log, error) { @@ -939,7 +946,7 @@ func (b *BackfillSuite) executedParity(log *types.Log, parser *consumer.MessageP BlockNumber: log.BlockNumber, TxHash: log.TxHash.String(), - MessageID: common.Bytes2Hex(parsedLog.MessageId[:]), + MessageID: gosql.NullString{String: common.Bytes2Hex(parsedLog.MessageId[:]), Valid: true}, SourceChainID: big.NewInt(int64(parsedLog.SrcChainId)), }). Find(&storedLog).Count(&count) @@ -947,6 +954,8 @@ func (b *BackfillSuite) executedParity(log *types.Log, parser *consumer.MessageP return fmt.Errorf("error querying for event: %w", events.Error) } Equal(b.T(), int64(1), count) + Equal(b.T(), big.NewInt(int64(parsedLog.SrcNonce)), storedLog.Nonce) + Equal(b.T(), parsedLog.DstAddress.String(), storedLog.DestinationAddress.String) return nil } @@ -967,7 +976,7 @@ func (b *BackfillSuite) messageSentParity(log *types.Log, parser *consumer.Messa BlockNumber: log.BlockNumber, TxHash: log.TxHash.String(), - MessageID: common.Bytes2Hex(parsedLog.MessageId[:]), + MessageID: gosql.NullString{String: common.Bytes2Hex(parsedLog.MessageId[:]), Valid: true}, SourceChainID: parsedLog.SrcChainID, }). Find(&storedLog).Count(&count) @@ -975,5 +984,35 @@ func (b *BackfillSuite) messageSentParity(log *types.Log, parser *consumer.Messa return fmt.Errorf("error querying for event: %w", events.Error) } Equal(b.T(), int64(1), count) + Equal(b.T(), common.Bytes2Hex(parsedLog.Message), storedLog.Message.String) + Equal(b.T(), parsedLog.Fee, storedLog.Fee) + Equal(b.T(), common.Bytes2Hex(parsedLog.Receiver[:]), storedLog.Receiver.String) + + return nil +} + +//nolint:dupl +func (b *BackfillSuite) callRevertedParity(log *types.Log, parser *consumer.MessageParser, chainID uint32) error { + // parse the log + parsedLog, err := parser.Filterer.ParseCallReverted(*log) + if err != nil { + return fmt.Errorf("error parsing log: %w", err) + } + var storedLog sql.MessageEvent + var count int64 + events := b.db.UNSAFE_DB().WithContext(b.GetTestContext()).Model(&sql.MessageEvent{}). + Where(&sql.MessageEvent{ + ContractAddress: log.Address.String(), + ChainID: chainID, + EventType: messageTypes.CallRevertedEvent.Int(), + BlockNumber: log.BlockNumber, + TxHash: log.TxHash.String(), + }). + Find(&storedLog).Count(&count) + if events.Error != nil { + return fmt.Errorf("error querying for event: %w", events.Error) + } + Equal(b.T(), int64(1), count) + Equal(b.T(), parsedLog.Reason, storedLog.RevertedReason.String) return nil } diff --git a/services/explorer/consumer/parser.go b/services/explorer/consumer/parser.go index 3fb895ffc1..447318705d 100644 --- a/services/explorer/consumer/parser.go +++ b/services/explorer/consumer/parser.go @@ -292,7 +292,7 @@ func (p *BridgeParser) ParseAndStore(ctx context.Context, log ethTypes.Log, chai } bridgeEvent.Sender = sender - err = p.consumerDB.StoreEvent(ctx, &bridgeEvent, nil, nil) + err = p.consumerDB.StoreEvent(ctx, &bridgeEvent) if err != nil { return fmt.Errorf("could not store event: %w", err) } @@ -324,20 +324,6 @@ func NewSwapParser(consumerDB db.ConsumerDB, swapAddress common.Address, swapFet return &SwapParser{consumerDB, swapAddress, filterer, consumerFetcher, swapFetcher}, nil } -// EventType returns the event type of a swap log. -func (p *SwapParser) EventType(log ethTypes.Log) (_ swapTypes.EventType, ok bool) { - for _, logTopic := range log.Topics { - eventType := swap.EventTypeFromTopic(logTopic) - if eventType == nil { - continue - } - - return *eventType, true - } - // return an unknown event to avoid cases where user failed to check the event type - return swapTypes.EventType(len(swapTypes.AllEventTypes()) + 2), false -} - // eventToSwapEvent stores a swap event. func eventToSwapEvent(event swapTypes.EventLog, chainID uint32) model.SwapEvent { var buyer sql.NullString @@ -510,7 +496,7 @@ func (p *SwapParser) ParseAndStore(ctx context.Context, log ethTypes.Log, chainI } // Store bridgeEvent - err = p.consumerDB.StoreEvent(ctx, nil, &swapEvent, nil) + err = p.consumerDB.StoreEvent(ctx, &swapEvent) if err != nil { return fmt.Errorf("could not store event: %w", err) } @@ -564,7 +550,7 @@ func eventToMessageEvent(event messageTypes.EventLog, chainID uint32) model.Mess TxHash: event.GetTxHash().String(), EventIndex: event.GetEventIndex(), Sender: "", - MessageID: event.GetMessageID(), + MessageID: ToNullString(event.GetMessageID()), SourceChainID: event.GetSourceChainID(), Status: ToNullString(event.GetStatus()), @@ -577,6 +563,7 @@ func eventToMessageEvent(event messageTypes.EventLog, chainID uint32) model.Mess Options: ToNullString(event.GetOptions()), Fee: event.GetFee(), TimeStamp: nil, + RevertedReason: ToNullString(event.GetRevertReason()), } } @@ -599,6 +586,12 @@ func (m *MessageParser) ParseAndStore(ctx context.Context, log ethTypes.Log, cha return nil, fmt.Errorf("could not parse sent message: %w", err) } return iFace, nil + case message.Topic(messageTypes.CallRevertedEvent): + iFace, err := m.Filterer.ParseCallReverted(log) + if err != nil { + return nil, fmt.Errorf("could not parse sent message: %w", err) + } + return iFace, nil default: return nil, fmt.Errorf("unknown topic: %s", logTopic.Hex()) @@ -620,17 +613,8 @@ func (m *MessageParser) ParseAndStore(ctx context.Context, log ethTypes.Log, cha timeStampBig := uint64(*timeStamp.Response) messageEvent.TimeStamp = &timeStampBig } - // sender, err := m.consumerFetcher.FetchTxSender(ctx, chainID, iFace.GetTxHash().String()) - // if err != nil { - // if !core.IsTest() { - // return fmt.Errorf("could not fetch tx sender: %w", err) - // } - // logger.Errorf("could not get tx sender: %v", err) - // sender = "FAKE_SENDER" - //} - // messageEvent.Sender = sender - - err = m.consumerDB.StoreEvent(ctx, nil, nil, &messageEvent) + + err = m.consumerDB.StoreEvent(ctx, &messageEvent) if err != nil { return fmt.Errorf("could not store event: %w", err) } diff --git a/services/explorer/contracts/message/sendreceive.go b/services/explorer/contracts/message/sendreceive.go index dc6fb6a699..fed2a1bcbb 100644 --- a/services/explorer/contracts/message/sendreceive.go +++ b/services/explorer/contracts/message/sendreceive.go @@ -39,8 +39,9 @@ func (m MessageBusUpgradeableExecuted) GetEventIndex() uint64 { } // GetMessageID gets the message id for the event. -func (m MessageBusUpgradeableExecuted) GetMessageID() string { - return common.Bytes2Hex(m.MessageId[:]) +func (m MessageBusUpgradeableExecuted) GetMessageID() *string { + messageID := common.Bytes2Hex(m.MessageId[:]) + return &messageID } // GetSourceChainID gets the source chain id for the event. @@ -95,6 +96,11 @@ func (m MessageBusUpgradeableExecuted) GetFee() *big.Int { return nil } +// GetRevertReason gets the fee for the event. +func (m MessageBusUpgradeableExecuted) GetRevertReason() *string { + return nil +} + var _ message.EventLog = &MessageBusUpgradeableExecuted{} // GetEventType gets the execute event type. @@ -128,8 +134,9 @@ func (m MessageBusUpgradeableMessageSent) GetEventIndex() uint64 { } // GetMessageID gets the message id for the event. -func (m MessageBusUpgradeableMessageSent) GetMessageID() string { - return common.Bytes2Hex(m.MessageId[:]) +func (m MessageBusUpgradeableMessageSent) GetMessageID() *string { + messageID := common.Bytes2Hex(m.MessageId[:]) + return &messageID } // GetSourceChainID gets the source chain id for the event. @@ -186,4 +193,102 @@ func (m MessageBusUpgradeableMessageSent) GetFee() *big.Int { return m.Fee } +// GetRevertReason gets the fee for the event. +func (m MessageBusUpgradeableMessageSent) GetRevertReason() *string { + return nil +} + var _ message.EventLog = &MessageBusUpgradeableMessageSent{} + +// GetEventType gets the execute event type. +func (m MessageBusUpgradeableCallReverted) GetEventType() message.EventType { + return message.CallRevertedEvent +} + +// GetRaw gets the raw logs. +func (m MessageBusUpgradeableCallReverted) GetRaw() ethTypes.Log { + return m.Raw +} + +// GetContractAddress gets the contract address the event occurred on. +func (m MessageBusUpgradeableCallReverted) GetContractAddress() common.Address { + return m.Raw.Address +} + +// GetBlockNumber gets the block number for the event. +func (m MessageBusUpgradeableCallReverted) GetBlockNumber() uint64 { + return m.Raw.BlockNumber +} + +// GetTxHash gets the unique identifier (txhash) for the Execute event. +func (m MessageBusUpgradeableCallReverted) GetTxHash() common.Hash { + return m.Raw.TxHash +} + +// GetEventIndex gets the block index of the event. +func (m MessageBusUpgradeableCallReverted) GetEventIndex() uint64 { + return uint64(m.Raw.Index) +} + +// GetMessageID gets the message id for the event. +func (m MessageBusUpgradeableCallReverted) GetMessageID() *string { + return nil +} + +// GetSourceChainID gets the source chain id for the event. +func (m MessageBusUpgradeableCallReverted) GetSourceChainID() *big.Int { + return nil +} + +// GetSourceAddress gets the source address for the event. +func (m MessageBusUpgradeableCallReverted) GetSourceAddress() *string { + return nil +} + +// GetStatus gets the status for the event. +func (m MessageBusUpgradeableCallReverted) GetStatus() *string { + return nil +} + +// GetDestinationAddress gets the destination address for the event. +func (m MessageBusUpgradeableCallReverted) GetDestinationAddress() *string { + return nil +} + +// GetDestinationChainID gets the destination chain id for the event. +func (m MessageBusUpgradeableCallReverted) GetDestinationChainID() *big.Int { + return nil +} + +// GetNonce gets the source nonce for the event. +func (m MessageBusUpgradeableCallReverted) GetNonce() *big.Int { + return nil +} + +// GetMessage gets the message for the event. +func (m MessageBusUpgradeableCallReverted) GetMessage() *string { + return nil +} + +// GetReceiver gets the receiver for the event. +func (m MessageBusUpgradeableCallReverted) GetReceiver() *string { + return nil +} + +// GetOptions gets the options for the event. +func (m MessageBusUpgradeableCallReverted) GetOptions() *string { + return nil +} + +// GetFee gets the fee for the event. +func (m MessageBusUpgradeableCallReverted) GetFee() *big.Int { + return nil +} + +// GetRevertReason gets the fee for the event. +func (m MessageBusUpgradeableCallReverted) GetRevertReason() *string { + reason := m.Reason + return &reason +} + +var _ message.EventLog = &MessageBusUpgradeableCallReverted{} diff --git a/services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol b/services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol index 2ef4a44242..5d1d520523 100644 --- a/services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol +++ b/services/explorer/contracts/message/testmessage/contract/TestMessageBusUpgradeable.sol @@ -632,6 +632,13 @@ contract TestMessageBusUpgradeable is MessageBusUpgradeable { messageId ); } + function testCallReverted( + string calldata reason + ) external { + emit CallReverted( + reason + ); + } } diff --git a/services/explorer/contracts/message/testmessage/testmessage.abigen.go b/services/explorer/contracts/message/testmessage/testmessage.abigen.go index bc1c6a1ca5..5863cba93b 100644 --- a/services/explorer/contracts/message/testmessage/testmessage.abigen.go +++ b/services/explorer/contracts/message/testmessage/testmessage.abigen.go @@ -31,7 +31,7 @@ var ( // AddressUpgradeableMetaData contains all meta data concerning the AddressUpgradeable contract. var AddressUpgradeableMetaData = &bind.MetaData{ ABI: "[]", - Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122018ebd85d3533f626170919b4bbf40d12c72e02e2add596be4439050eeb00bae464736f6c63430008000033", + Bin: "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122080a8feece8aebd5a29ba816e7ad476af307ac260e3acdf96fefde8ba65c780f564736f6c63430008000033", } // AddressUpgradeableABI is the input ABI used to generate the binding from. @@ -1259,7 +1259,7 @@ var MessageBusReceiverUpgradeableMetaData = &bind.MetaData{ "a5c0edf3": "updateAuthVerifier(address)", "9b11079c": "updateMessageStatus(bytes32,uint8)", }, - Bin: "0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220034ca05f6f48abb9ca3ea109f6613964ac8c188902f712ae0a8c2f19af9a501f64736f6c63430008000033", + Bin: "0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220cee79873fb2a09b77d4bc866527128d03b9dfc2cf18612a3e711d9dd54fce98464736f6c63430008000033", } // MessageBusReceiverUpgradeableABI is the input ABI used to generate the binding from. @@ -2394,7 +2394,7 @@ var MessageBusSenderUpgradeableMetaData = &bind.MetaData{ "a66dd384": "updateGasFeePricing(address)", "d6b457b9": "withdrawGasFees(address)", }, - Bin: "0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212202d3dbd32378d2f49d296babf01ce4c62d300f205ee86baf51e535a8613e9648264736f6c63430008000033", + Bin: "0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea2646970667358221220d9b4cb52b2968bd04d9a99e5cfad1610f75b886346400d381e742051528a901964736f6c63430008000033", } // MessageBusSenderUpgradeableABI is the input ABI used to generate the binding from. @@ -3542,7 +3542,7 @@ var MessageBusUpgradeableMetaData = &bind.MetaData{ "9b11079c": "updateMessageStatus(bytes32,uint8)", "d6b457b9": "withdrawGasFees(address)", }, - Bin: "0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea264697066735822122067372238d920e9724cf8967ebf7f7fa47665c686fd5e59f70acf4931e9ab800464736f6c63430008000033", + Bin: "0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea2646970667358221220131d19f31d38b0c80dcd99484abda79d51675a25ae643279d41130dcf95e80b264736f6c63430008000033", } // MessageBusUpgradeableABI is the input ABI used to generate the binding from. @@ -5988,7 +5988,7 @@ func (_PausableUpgradeable *PausableUpgradeableFilterer) ParseUnpaused(log types // TestMessageBusUpgradeableMetaData contains all meta data concerning the TestMessageBusUpgradeable contract. var TestMessageBusUpgradeableMetaData = &bind.MetaData{ - 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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.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\":\"addresspayable\",\"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\":\"addresspayable\",\"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\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"},{\"internalType\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + 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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.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\":\"addresspayable\",\"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\":\"addresspayable\",\"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\":\"enumMessageBusReceiverUpgradeable.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\":\"enumMessageBusReceiverUpgradeable.TxStatus\",\"name\":\"_status\",\"type\":\"uint8\"}],\"name\":\"updateMessageStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawGasFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Sigs: map[string]string{ "c4087335": "authVerifier()", "f44d57aa": "computeMessageId(address,uint256,bytes32,uint256,uint256,bytes)", @@ -6006,6 +6006,7 @@ var TestMessageBusUpgradeableMetaData = &bind.MetaData{ "205e157b": "rescueGas(address)", "ac8a4c1b": "sendMessage(bytes32,uint256,bytes,bytes)", "72177189": "sendMessage(bytes32,uint256,bytes,bytes,address)", + "446e9045": "testCallReverted(string)", "28cab9af": "testExecuted(bytes32,uint8,address,uint64,uint64)", "36d09269": "testMessageSent(address,uint256,bytes32,uint256,bytes,uint64,bytes,uint256,bytes32)", "f2fde38b": "transferOwnership(address)", @@ -6015,7 +6016,7 @@ var TestMessageBusUpgradeableMetaData = &bind.MetaData{ "9b11079c": "updateMessageStatus(bytes32,uint8)", "d6b457b9": "withdrawGasFees(address)", }, - Bin: "0x608060405234801561001057600080fd5b506120e2806100206000396000f3fe60806040526004361061018b5760003560e01c80639af1d35a116100d6578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103ff578063f2fde38b1461041f578063f44d57aa1461043f5761018b565b8063ac8a4c1b146103b5578063affed0e0146103c8578063c4087335146103ea5761018b565b8063a5c0edf3116100b0578063a5c0edf314610360578063a66dd38414610380578063aa70fc0e146103a05761018b565b80639af1d35a1461030b5780639b11079c14610320578063a1b058d8146103405761018b565b80635c975abb11610138578063721771891161011257806372177189146102c15780638456cb59146102d45780638da5cb5b146102e95761018b565b80635c975abb1461025d5780635da6d2c41461027f578063715018a6146102ac5761018b565b806336d092691161016957806336d09269146102085780633f4ba83a14610228578063485cc9551461023d5761018b565b8063205e157b1461019057806325b19fa3146101b257806328cab9af146101e8575b600080fd5b34801561019c57600080fd5b506101b06101ab366004611540565b61045f565b005b3480156101be57600080fd5b506101d26101cd3660046116fc565b61051c565b6040516101df9190611c09565b60405180910390f35b3480156101f457600080fd5b506101b061020336600461173f565b610534565b34801561021457600080fd5b506101b061022336600461159b565b61058e565b34801561023457600080fd5b506101b06105f9565b34801561024957600080fd5b506101b0610258366004611563565b61065c565b34801561026957600080fd5b50610272610738565b6040516101df9190611b9a565b34801561028b57600080fd5b5061029f61029a366004611a0d565b610741565b6040516101df9190611ba5565b3480156102b857600080fd5b506101b0610819565b6101b06102cf36600461181e565b61087c565b3480156102e057600080fd5b506101b0610894565b3480156102f557600080fd5b506102fe6108f5565b6040516101df9190611b24565b34801561031757600080fd5b5061029f610911565b34801561032c57600080fd5b506101b061033b366004611714565b610917565b34801561034c57600080fd5b506101b061035b36600461198b565b6109cb565b34801561036c57600080fd5b506101b061037b366004611540565b610cac565b34801561038c57600080fd5b506101b061039b366004611540565b610d7f565b3480156103ac57600080fd5b506102fe610e52565b6101b06103c336600461179e565b610e6e565b3480156103d457600080fd5b506103dd610eaa565b6040516101df9190611f90565b3480156103f657600080fd5b506102fe610ed2565b34801561040b57600080fd5b506101b061041a366004611540565b610eee565b34801561042b57600080fd5b506101b061043a366004611540565b610f97565b34801561044b57600080fd5b5061029f61045a366004611661565b61102f565b610467611071565b73ffffffffffffffffffffffffffffffffffffffff166104856108f5565b73ffffffffffffffffffffffffffffffffffffffff16146104c15760405162461bcd60e51b81526004016104b890611e14565b60405180910390fd5b600060ca54476104d19190611fbd565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610517573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea6586858560405161057f93929190611c17565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c6040516105e4989796959493929190611f14565b60405180910390a45050505050505050505050565b610601611071565b73ffffffffffffffffffffffffffffffffffffffff1661061f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146106525760405162461bcd60e51b81526004016104b890611e14565b61065a611075565b565b600054610100900460ff166106775760005460ff161561067f565b61067f6110e3565b61069b5760405162461bcd60e51b81526004016104b890611db7565b600054610100900460ff161580156106e3576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6106eb6110f4565b6106f361112b565b6106fc8361115e565b61070582610d38565b801561051757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906107a090889088908890600401611f6d565b602060405180830381600087803b1580156107ba57600080fd5b505af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611973565b9050806108115760405162461bcd60e51b81526004016104b890611cb5565b949350505050565b610821611071565b73ffffffffffffffffffffffffffffffffffffffff1661083f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108725760405162461bcd60e51b81526004016104b890611e14565b61065a6000611185565b61088b878787878787876111fc565b50505050505050565b61089c611071565b73ffffffffffffffffffffffffffffffffffffffff166108ba6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108ed5760405162461bcd60e51b81526004016104b890611e14565b61065a6113cf565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b61091f611071565b73ffffffffffffffffffffffffffffffffffffffff1661093d6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146109705760405162461bcd60e51b81526004016104b890611e14565b600082815260fb60205260409020805482919060ff191660018360028111156109c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6109d3610738565b156109f05760405162461bcd60e51b81526004016104b890611d80565b600081815260fb602052604081205460ff166002811115610a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610a575760405162461bcd60e51b81526004016104b890611e49565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610a8a903390602001611b24565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610ab59190611bf6565b60206040518083038186803b158015610acd57600080fd5b505afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0591906116dc565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610b4a959493929190611bae565b600060405180830381600088803b158015610b6457600080fd5b5087f193505050508015610b76575060015b610bf3573d808015610ba4576040519150601f19603f3d011682016040523d82523d6000602084013e610ba9565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610bd48261142a565b604051610be19190611bf6565b60405180910390a16002915050610bf7565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610c9993929190611c17565b60405180910390a3505050505050505050565b610cb4611071565b73ffffffffffffffffffffffffffffffffffffffff16610cd26108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610d055760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610d385760405162461bcd60e51b81526004016104b890611d49565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d87611071565b73ffffffffffffffffffffffffffffffffffffffff16610da56108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610dd85760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610e0b5760405162461bcd60e51b81526004016104b890611d49565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610e76610738565b15610e935760405162461bcd60e51b81526004016104b890611d80565b610ea2868686868686326111fc565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ef6611071565b73ffffffffffffffffffffffffffffffffffffffff16610f146108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610f475760405162461bcd60e51b81526004016104b890611e14565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610f8d573d6000803e3d6000fd5b5050600060ca5550565b610f9f611071565b73ffffffffffffffffffffffffffffffffffffffff16610fbd6108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610ff05760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff81166110235760405162461bcd60e51b81526004016104b890611cec565b61102c81611185565b50565b60008787878787878760405160200161104e9796959493929190611b45565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b61107d610738565b6110995760405162461bcd60e51b81526004016104b890611c7e565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110cc611071565b6040516110d99190611b24565b60405180910390a1565b60006110ee30611490565b15905090565b600054610100900460ff1661111b5760405162461bcd60e51b81526004016104b890611eb7565b61065a611126611071565b611185565b600054610100900460ff166111525760405162461bcd60e51b81526004016104b890611eb7565b6065805460ff19169055565b600054610100900460ff16610e0b5760405162461bcd60e51b81526004016104b890611eb7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006112066114ce565b9050808714156112285760405162461bcd60e51b81526004016104b890611c47565b6000611235888686610741565b9050803410156112575760405162461bcd60e51b81526004016104b890611e80565b600061128833848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d61102f565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516112f6989796959493929190611f14565b60405180910390a48160ca60008282546113109190611fa5565b909155505060c980546014906113479074010000000000000000000000000000000000000000900467ffffffffffffffff16612004565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156113c35773ffffffffffffffffffffffffffffffffffffffff84166108fc6113998434611fbd565b6040518115909202916000818181858888f193505050501580156113c1573d6000803e3d6000fd5b505b50505050505050505050565b6113d7610738565b156113f45760405162461bcd60e51b81526004016104b890611d80565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110cc611071565b6060604482511015611470575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261052f565b6004820191508180602001905181019061148a91906118b2565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126114e3578182fd5b50813567ffffffffffffffff8111156114fa578182fd5b60208301915083602082850101111561151257600080fd5b9250929050565b80356003811061052f57600080fd5b803567ffffffffffffffff8116811461052f57600080fd5b600060208284031215611551578081fd5b813561155c8161208a565b9392505050565b60008060408385031215611575578081fd5b82356115808161208a565b915060208301356115908161208a565b809150509250929050565b60008060008060008060008060008060006101208c8e0312156115bc578687fd5b6115c68c3561208a565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e013511156115f8578788fd5b6116088e60808f01358f016114d2565b909850965061161960a08e01611528565b95508060c08e0135111561162b578485fd5b5061163c8d60c08e01358e016114d2565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a03121561167b578283fd5b87356116868161208a565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156116bd578283fd5b6116c98a828b016114d2565b989b979a50959850939692959293505050565b6000602082840312156116ed578081fd5b8151801515811461155c578182fd5b60006020828403121561170d578081fd5b5035919050565b60008060408385031215611726578182fd5b8235915061173660208401611519565b90509250929050565b600080600080600060a08688031215611756578081fd5b8535945061176660208701611519565b935060408601356117768161208a565b925061178460608701611528565b915061179260808701611528565b90509295509295909350565b600080600080600080608087890312156117b6578182fd5b8635955060208701359450604087013567ffffffffffffffff808211156117db578384fd5b6117e78a838b016114d2565b909650945060608901359150808211156117ff578384fd5b5061180c89828a016114d2565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611838578081fd5b8735965060208801359550604088013567ffffffffffffffff8082111561185d578283fd5b6118698b838c016114d2565b909750955060608a0135915080821115611881578283fd5b5061188e8a828b016114d2565b90945092505060808801356118a28161208a565b8091505092959891949750929550565b6000602082840312156118c3578081fd5b815167ffffffffffffffff808211156118da578283fd5b818401915084601f8301126118ed578283fd5b8151818111156118ff576118ff61205b565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119415761194161205b565b604052818152838201602001871015611958578485fd5b611969826020830160208701611fd4565b9695505050505050565b600060208284031215611984578081fd5b5051919050565b60008060008060008060008060e0898b0312156119a6578182fd5b883597506020890135965060408901356119bf8161208a565b9550606089013594506080890135935060a089013567ffffffffffffffff8111156119e8578283fd5b6119f48b828c016114d2565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611a21578081fd5b83359250602084013567ffffffffffffffff811115611a3e578182fd5b611a4a868287016114d2565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611ab7816020860160208601611fd4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b20577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611b8d60c083018486611a57565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611bce608083018587611a57565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261155c6020830184611a9f565b6020810161148a8284611ae9565b60608101611c258286611ae9565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611f3460c08301888a611a57565b67ffffffffffffffff871660608401528281036080840152611f57818688611a57565b9150508260a08301529998505050505050505050565b600084825260406020830152611f87604083018486611a57565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611fb857611fb861202c565b500190565b600082821015611fcf57611fcf61202c565b500390565b60005b83811015611fef578181015183820152602001611fd7565b83811115611ffe576000848401525b50505050565b600067ffffffffffffffff808316818114156120225761202261202c565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461102c57600080fdfea2646970667358221220a418715bcbfd5a179f9b7ba89ac37d57a53801d5dd429a861f66e88b2e1b470564736f6c63430008000033", + Bin: "0x608060405234801561001057600080fd5b5061219e806100206000396000f3fe6080604052600436106101965760003560e01c80638da5cb5b116100e1578063aa70fc0e1161008a578063c408733511610064578063c408733514610415578063d6b457b91461042a578063f2fde38b1461044a578063f44d57aa1461046a57610196565b8063aa70fc0e146103cb578063ac8a4c1b146103e0578063affed0e0146103f357610196565b8063a1b058d8116100bb578063a1b058d81461036b578063a5c0edf31461038b578063a66dd384146103ab57610196565b80638da5cb5b146103145780639af1d35a146103365780639b11079c1461034b57610196565b8063485cc95511610143578063715018a61161011d578063715018a6146102d757806372177189146102ec5780638456cb59146102ff57610196565b8063485cc955146102685780635c975abb146102885780635da6d2c4146102aa57610196565b806336d092691161017457806336d09269146102135780633f4ba83a14610233578063446e90451461024857610196565b8063205e157b1461019b57806325b19fa3146101bd57806328cab9af146101f3575b600080fd5b3480156101a757600080fd5b506101bb6101b63660046115a8565b61048a565b005b3480156101c957600080fd5b506101dd6101d8366004611764565b610547565b6040516101ea9190611cb1565b60405180910390f35b3480156101ff57600080fd5b506101bb61020e3660046117a7565b61055f565b34801561021f57600080fd5b506101bb61022e366004611603565b6105b9565b34801561023f57600080fd5b506101bb610624565b34801561025457600080fd5b506101bb61026336600461191a565b610687565b34801561027457600080fd5b506101bb6102833660046115cb565b6106c4565b34801561029457600080fd5b5061029d6107a0565b6040516101ea9190611c42565b3480156102b657600080fd5b506102ca6102c5366004611ab5565b6107a9565b6040516101ea9190611c4d565b3480156102e357600080fd5b506101bb610881565b6101bb6102fa366004611886565b6108e4565b34801561030b57600080fd5b506101bb6108fc565b34801561032057600080fd5b5061032961095d565b6040516101ea9190611bcc565b34801561034257600080fd5b506102ca610979565b34801561035757600080fd5b506101bb61036636600461177c565b61097f565b34801561037757600080fd5b506101bb610386366004611a33565b610a33565b34801561039757600080fd5b506101bb6103a63660046115a8565b610d14565b3480156103b757600080fd5b506101bb6103c63660046115a8565b610de7565b3480156103d757600080fd5b50610329610eba565b6101bb6103ee366004611806565b610ed6565b3480156103ff57600080fd5b50610408610f12565b6040516101ea919061204c565b34801561042157600080fd5b50610329610f3a565b34801561043657600080fd5b506101bb6104453660046115a8565b610f56565b34801561045657600080fd5b506101bb6104653660046115a8565b610fff565b34801561047657600080fd5b506102ca6104853660046116c9565b611097565b6104926110d9565b73ffffffffffffffffffffffffffffffffffffffff166104b061095d565b73ffffffffffffffffffffffffffffffffffffffff16146104ec5760405162461bcd60e51b81526004016104e390611ed0565b60405180910390fd5b600060ca54476104fc9190612079565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610542573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea658685856040516105aa93929190611cbf565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c60405161060f989796959493929190611fd0565b60405180910390a45050505050505050505050565b61062c6110d9565b73ffffffffffffffffffffffffffffffffffffffff1661064a61095d565b73ffffffffffffffffffffffffffffffffffffffff161461067d5760405162461bcd60e51b81526004016104e390611ed0565b6106856110dd565b565b7fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f82826040516106b8929190611cef565b60405180910390a15050565b600054610100900460ff166106df5760005460ff16156106e7565b6106e761114b565b6107035760405162461bcd60e51b81526004016104e390611e73565b600054610100900460ff1615801561074b576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b61075361115c565b61075b611193565b610764836111c6565b61076d82610da0565b801561054257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061080890889088908890600401612029565b602060405180830381600087803b15801561082257600080fd5b505af1158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a9190611a1b565b9050806108795760405162461bcd60e51b81526004016104e390611d71565b949350505050565b6108896110d9565b73ffffffffffffffffffffffffffffffffffffffff166108a761095d565b73ffffffffffffffffffffffffffffffffffffffff16146108da5760405162461bcd60e51b81526004016104e390611ed0565b61068560006111ed565b6108f387878787878787611264565b50505050505050565b6109046110d9565b73ffffffffffffffffffffffffffffffffffffffff1661092261095d565b73ffffffffffffffffffffffffffffffffffffffff16146109555760405162461bcd60e51b81526004016104e390611ed0565b610685611437565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b6109876110d9565b73ffffffffffffffffffffffffffffffffffffffff166109a561095d565b73ffffffffffffffffffffffffffffffffffffffff16146109d85760405162461bcd60e51b81526004016104e390611ed0565b600082815260fb60205260409020805482919060ff19166001836002811115610a2a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610a3b6107a0565b15610a585760405162461bcd60e51b81526004016104e390611e3c565b600081815260fb602052604081205460ff166002811115610aa2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610abf5760405162461bcd60e51b81526004016104e390611f05565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610af2903390602001611bcc565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610b1d9190611c9e565b60206040518083038186803b158015610b3557600080fd5b505afa158015610b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6d9190611744565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610bb2959493929190611c56565b600060405180830381600088803b158015610bcc57600080fd5b5087f193505050508015610bde575060015b610c5b573d808015610c0c576040519150601f19603f3d011682016040523d82523d6000602084013e610c11565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610c3c82611492565b604051610c499190611c9e565b60405180910390a16002915050610c5f565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610cb1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610d0193929190611cbf565b60405180910390a3505050505050505050565b610d1c6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610d3a61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610d6d5760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff8116610da05760405162461bcd60e51b81526004016104e390611e05565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610def6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610e0d61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610e405760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff8116610e735760405162461bcd60e51b81526004016104e390611e05565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610ede6107a0565b15610efb5760405162461bcd60e51b81526004016104e390611e3c565b610f0a86868686868632611264565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610f5e6110d9565b73ffffffffffffffffffffffffffffffffffffffff16610f7c61095d565b73ffffffffffffffffffffffffffffffffffffffff1614610faf5760405162461bcd60e51b81526004016104e390611ed0565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610ff5573d6000803e3d6000fd5b5050600060ca5550565b6110076110d9565b73ffffffffffffffffffffffffffffffffffffffff1661102561095d565b73ffffffffffffffffffffffffffffffffffffffff16146110585760405162461bcd60e51b81526004016104e390611ed0565b73ffffffffffffffffffffffffffffffffffffffff811661108b5760405162461bcd60e51b81526004016104e390611da8565b611094816111ed565b50565b6000878787878787876040516020016110b69796959493929190611bed565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6110e56107a0565b6111015760405162461bcd60e51b81526004016104e390611d3a565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6111346110d9565b6040516111419190611bcc565b60405180910390a1565b6000611156306114f8565b15905090565b600054610100900460ff166111835760405162461bcd60e51b81526004016104e390611f73565b61068561118e6110d9565b6111ed565b600054610100900460ff166111ba5760405162461bcd60e51b81526004016104e390611f73565b6065805460ff19169055565b600054610100900460ff16610e735760405162461bcd60e51b81526004016104e390611f73565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061126e611536565b9050808714156112905760405162461bcd60e51b81526004016104e390611d03565b600061129d8886866107a9565b9050803410156112bf5760405162461bcd60e51b81526004016104e390611f3c565b60006112f033848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d611097565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c60405161135e989796959493929190611fd0565b60405180910390a48160ca60008282546113789190612061565b909155505060c980546014906113af9074010000000000000000000000000000000000000000900467ffffffffffffffff166120c0565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508134111561142b5773ffffffffffffffffffffffffffffffffffffffff84166108fc6114018434612079565b6040518115909202916000818181858888f19350505050158015611429573d6000803e3d6000fd5b505b50505050505050505050565b61143f6107a0565b1561145c5760405162461bcd60e51b81526004016104e390611e3c565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586111346110d9565b60606044825110156114d8575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261055a565b600482019150818060200190518101906114f2919061195a565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f84011261154b578182fd5b50813567ffffffffffffffff811115611562578182fd5b60208301915083602082850101111561157a57600080fd5b9250929050565b80356003811061055a57600080fd5b803567ffffffffffffffff8116811461055a57600080fd5b6000602082840312156115b9578081fd5b81356115c481612146565b9392505050565b600080604083850312156115dd578081fd5b82356115e881612146565b915060208301356115f881612146565b809150509250929050565b60008060008060008060008060008060006101208c8e031215611624578687fd5b61162e8c35612146565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e01351115611660578788fd5b6116708e60808f01358f0161153a565b909850965061168160a08e01611590565b95508060c08e01351115611693578485fd5b506116a48d60c08e01358e0161153a565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a0312156116e3578283fd5b87356116ee81612146565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115611725578283fd5b6117318a828b0161153a565b989b979a50959850939692959293505050565b600060208284031215611755578081fd5b815180151581146115c4578182fd5b600060208284031215611775578081fd5b5035919050565b6000806040838503121561178e578182fd5b8235915061179e60208401611581565b90509250929050565b600080600080600060a086880312156117be578081fd5b853594506117ce60208701611581565b935060408601356117de81612146565b92506117ec60608701611590565b91506117fa60808701611590565b90509295509295909350565b6000806000806000806080878903121561181e578384fd5b8635955060208701359450604087013567ffffffffffffffff80821115611843578586fd5b61184f8a838b0161153a565b90965094506060890135915080821115611867578384fd5b5061187489828a0161153a565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156118a0578081fd5b8735965060208801359550604088013567ffffffffffffffff808211156118c5578283fd5b6118d18b838c0161153a565b909750955060608a01359150808211156118e9578283fd5b506118f68a828b0161153a565b909450925050608088013561190a81612146565b8091505092959891949750929550565b6000806020838503121561192c578182fd5b823567ffffffffffffffff811115611942578283fd5b61194e8582860161153a565b90969095509350505050565b60006020828403121561196b578081fd5b815167ffffffffffffffff80821115611982578283fd5b818401915084601f830112611995578283fd5b8151818111156119a7576119a7612117565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119e9576119e9612117565b604052818152838201602001871015611a00578485fd5b611a11826020830160208701612090565b9695505050505050565b600060208284031215611a2c578081fd5b5051919050565b60008060008060008060008060e0898b031215611a4e578182fd5b88359750602089013596506040890135611a6781612146565b9550606089013594506080890135935060a089013567ffffffffffffffff811115611a90578283fd5b611a9c8b828c0161153a565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611ac9578081fd5b83359250602084013567ffffffffffffffff811115611ae6578182fd5b611af28682870161153a565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611b5f816020860160208601612090565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611bc8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611c3560c083018486611aff565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611c76608083018587611aff565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b6000602082526115c46020830184611b47565b602081016114f28284611b91565b60608101611ccd8286611b91565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b600060208252610879602083018486611aff565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611ff060c08301888a611aff565b67ffffffffffffffff871660608401528281036080840152612013818688611aff565b9150508260a08301529998505050505050505050565b600084825260406020830152612043604083018486611aff565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115612074576120746120e8565b500190565b60008282101561208b5761208b6120e8565b500390565b60005b838110156120ab578181015183820152602001612093565b838111156120ba576000848401525b50505050565b600067ffffffffffffffff808316818114156120de576120de6120e8565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461109457600080fdfea2646970667358221220fef43194b018b6863a536385d79656e3665256ba23ebc2bf6c0f1668f830bae764736f6c63430008000033", } // TestMessageBusUpgradeableABI is the input ABI used to generate the binding from. @@ -6605,6 +6606,27 @@ func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) Se return _TestMessageBusUpgradeable.Contract.SendMessage0(&_TestMessageBusUpgradeable.TransactOpts, _receiver, _dstChainId, _message, _options) } +// TestCallReverted is a paid mutator transaction binding the contract method 0x446e9045. +// +// Solidity: function testCallReverted(string reason) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactor) TestCallReverted(opts *bind.TransactOpts, reason string) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.contract.Transact(opts, "testCallReverted", reason) +} + +// TestCallReverted is a paid mutator transaction binding the contract method 0x446e9045. +// +// Solidity: function testCallReverted(string reason) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableSession) TestCallReverted(reason string) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestCallReverted(&_TestMessageBusUpgradeable.TransactOpts, reason) +} + +// TestCallReverted is a paid mutator transaction binding the contract method 0x446e9045. +// +// Solidity: function testCallReverted(string reason) returns() +func (_TestMessageBusUpgradeable *TestMessageBusUpgradeableTransactorSession) TestCallReverted(reason string) (*types.Transaction, error) { + return _TestMessageBusUpgradeable.Contract.TestCallReverted(&_TestMessageBusUpgradeable.TransactOpts, reason) +} + // TestExecuted is a paid mutator transaction binding the contract method 0x28cab9af. // // Solidity: function testExecuted(bytes32 messageId, uint8 status, address _dstAddress, uint64 srcChainId, uint64 srcNonce) returns() diff --git a/services/explorer/contracts/message/testmessage/testmessage.contractinfo.json b/services/explorer/contracts/message/testmessage/testmessage.contractinfo.json index cae28e8181..aab9b61681 100644 --- a/services/explorer/contracts/message/testmessage/testmessage.contractinfo.json +++ b/services/explorer/contracts/message/testmessage/testmessage.contractinfo.json @@ -1 +1 @@ -{"/solidity/TestMessageBusUpgradeable.sol:AddressUpgradeable":{"code":"0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122018ebd85d3533f626170919b4bbf40d12c72e02e2add596be4439050eeb00bae464736f6c63430008000033","runtime-code":"0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122018ebd85d3533f626170919b4bbf40d12c72e02e2add596be4439050eeb00bae464736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"version\":1}"},"hashes":{}},"/solidity/TestMessageBusUpgradeable.sol:MessageBusReceiverUpgradeable":{"code":"0x608060405234801561001057600080fd5b50610e73806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220034ca05f6f48abb9ca3ea109f6613964ac8c188902f712ae0a8c2f19af9a501f64736f6c63430008000033","runtime-code":"0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80639b11079c11610076578063a5c0edf31161005b578063a5c0edf31461012b578063c40873351461013e578063f2fde38b14610146576100a3565b80639b11079c14610105578063a1b058d814610118576100a3565b806325b19fa3146100a85780635c975abb146100d1578063715018a6146100e65780638da5cb5b146100f0575b600080fd5b6100bb6100b6366004610972565b610159565b6040516100c89190610c69565b60405180910390f35b6100d9610171565b6040516100c89190610bd1565b6100ee61017a565b005b6100f8610202565b6040516100c89190610bb0565b6100ee61011336600461098a565b61021e565b6100ee610126366004610a7d565b61030a565b6100ee610139366004610931565b61063d565b6100f8610744565b6100ee610154366004610931565b610760565b60008181526098602052604090205460ff165b919050565b60655460ff1690565b61018261082c565b73ffffffffffffffffffffffffffffffffffffffff166101a0610202565b73ffffffffffffffffffffffffffffffffffffffff16146101f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b60405180910390fd5b6102006000610830565b565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b61022661082c565b73ffffffffffffffffffffffffffffffffffffffff16610244610202565b73ffffffffffffffffffffffffffffffffffffffff1614610291576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610301577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b610312610171565b15610349576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d3b565b60008181526098602052604081205460ff166002811115610393577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146103ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610da7565b60975460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d906103fd903390602001610bb0565b6040516020818303038152906040526040518263ffffffff1660e01b81526004016104289190610c56565b60206040518083038186803b15801561044057600080fd5b505afa158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610952565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b81526004016104bd959493929190610bdc565b600060405180830381600088803b1580156104d757600080fd5b5087f1935050505080156104e9575060015b610566573d808015610517576040519150601f19603f3d011682016040523d82523d6000602084013e61051c565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610547826108a7565b6040516105549190610c56565b60405180910390a1600291505061056a565b5060015b600082815260986020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660018360028111156105da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c8960405161062a93929190610c77565b60405180910390a3505050505050505050565b61064561082c565b73ffffffffffffffffffffffffffffffffffffffff16610663610202565b73ffffffffffffffffffffffffffffffffffffffff16146106b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff81166106fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d04565b609780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60975473ffffffffffffffffffffffffffffffffffffffff1681565b61076861082c565b73ffffffffffffffffffffffffffffffffffffffff16610786610202565b73ffffffffffffffffffffffffffffffffffffffff16146107d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610d72565b73ffffffffffffffffffffffffffffffffffffffff8116610820576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101ed90610ca7565b61082981610830565b50565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606044825110156108ed575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261016c565b6004820191508180602001905181019061090791906109bc565b92915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016c57600080fd5b600060208284031215610942578081fd5b61094b8261090d565b9392505050565b600060208284031215610963578081fd5b8151801515811461094b578182fd5b600060208284031215610983578081fd5b5035919050565b6000806040838503121561099c578081fd5b823591506020830135600381106109b1578182fd5b809150509250929050565b6000602082840312156109cd578081fd5b815167ffffffffffffffff808211156109e4578283fd5b818401915084601f8301126109f7578283fd5b815181811115610a0957610a09610e0e565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401168201018181108482111715610a4b57610a4b610e0e565b604052818152838201602001871015610a62578485fd5b610a73826020830160208701610dde565b9695505050505050565b60008060008060008060008060e0898b031215610a98578384fd5b8835975060208901359650610aaf60408a0161090d565b9550606089013594506080890135935060a089013567ffffffffffffffff80821115610ad9578485fd5b818b0191508b601f830112610aec578485fd5b813581811115610afa578586fd5b8c6020828501011115610b0b578586fd5b60208301955080945050505060c089013590509295985092959890939650565b60008151808452610b43816020860160208601610dde565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610bac577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b901515815260200190565b600086825285602083015260806040830152836080830152838560a08401378060a0858401015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116830101905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261094b6020830184610b2b565b602081016109078284610b75565b60608101610c858286610b75565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60005b83811015610df9578181015183820152602001610de1565b83811115610e08576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220034ca05f6f48abb9ca3ea109f6613964ac8c188902f712ae0a8c2f19af9a501f64736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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":"0x608060405234801561001057600080fd5b50611149806100206000396000f3fe6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212202d3dbd32378d2f49d296babf01ce4c62d300f205ee86baf51e535a8613e9648264736f6c63430008000033","runtime-code":"0x6080604052600436106100dd5760003560e01c8063a66dd3841161007f578063affed0e011610059578063affed0e014610203578063d6b457b914610225578063f2fde38b14610245578063f44d57aa14610265576100dd565b8063a66dd384146101bb578063aa70fc0e146101db578063ac8a4c1b146101f0576100dd565b8063715018a6116100bb578063715018a61461015c57806372177189146101715780638da5cb5b146101845780639af1d35a146101a6576100dd565b8063205e157b146100e25780635c975abb146101045780635da6d2c41461012f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610b4f565b610285565b005b34801561011057600080fd5b5061011961035c565b6040516101269190610e21565b60405180910390f35b34801561013b57600080fd5b5061014f61014a366004610d19565b610365565b6040516101269190610e2c565b34801561016857600080fd5b50610102610457565b61010261017f366004610c6d565b6104d6565b34801561019057600080fd5b506101996104ee565b6040516101269190610dab565b3480156101b257600080fd5b5061014f61050a565b3480156101c757600080fd5b506101026101d6366004610b4f565b610510565b3480156101e757600080fd5b50610199610617565b6101026101fe366004610bed565b610633565b34801561020f57600080fd5b50610218610689565b6040516101269190611056565b34801561023157600080fd5b50610102610240366004610b4f565b6106b1565b34801561025157600080fd5b50610102610260366004610b4f565b610774565b34801561027157600080fd5b5061014f610280366004610b72565b610840565b61028d610882565b73ffffffffffffffffffffffffffffffffffffffff166102ab6104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610301576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60405180910390fd5b600060ca54476103119190611083565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610357573d6000803e3d6000fd5b505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906103c490889088908890600401611033565b602060405180830381600087803b1580156103de57600080fd5b505af11580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610d01565b90508061044f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e6c565b949350505050565b61045f610882565b73ffffffffffffffffffffffffffffffffffffffff1661047d6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b6104d46000610886565b565b6104e5878787878787876108fd565b50505050505050565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610518610882565b73ffffffffffffffffffffffffffffffffffffffff166105366104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610583576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff81166105d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f00565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b61063b61035c565b15610672576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f37565b610681868686868686326108fd565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b6106b9610882565b73ffffffffffffffffffffffffffffffffffffffff166106d76104ee565b73ffffffffffffffffffffffffffffffffffffffff1614610724576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f1935050505015801561076a573d6000803e3d6000fd5b5050600060ca5550565b61077c610882565b73ffffffffffffffffffffffffffffffffffffffff1661079a6104ee565b73ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610f6e565b73ffffffffffffffffffffffffffffffffffffffff8116610834576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610ea3565b61083d81610886565b50565b60008787878787878760405160200161085f9796959493929190610dcc565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610907610b04565b905080871415610943576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610e35565b6000610950888686610365565b90508034101561098c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f890610fa3565b60006109bd33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610840565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c604051610a2b989796959493929190610fda565b60405180910390a48160ca6000828254610a45919061106b565b909155505060c98054601490610a7c9074010000000000000000000000000000000000000000900467ffffffffffffffff1661109a565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081341115610af85773ffffffffffffffffffffffffffffffffffffffff84166108fc610ace8434611083565b6040518115909202916000818181858888f19350505050158015610af6573d6000803e3d6000fd5b505b50505050505050505050565b4690565b60008083601f840112610b19578182fd5b50813567ffffffffffffffff811115610b30578182fd5b602083019150836020828501011115610b4857600080fd5b9250929050565b600060208284031215610b60578081fd5b8135610b6b816110f1565b9392505050565b600080600080600080600060c0888a031215610b8c578283fd5b8735610b97816110f1565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff811115610bce578283fd5b610bda8a828b01610b08565b989b979a50959850939692959293505050565b60008060008060008060808789031215610c05578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115610c2a578384fd5b610c368a838b01610b08565b90965094506060890135915080821115610c4e578384fd5b50610c5b89828a01610b08565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215610c87578283fd5b8735965060208801359550604088013567ffffffffffffffff80821115610cac578485fd5b610cb88b838c01610b08565b909750955060608a0135915080821115610cd0578485fd5b50610cdd8a828b01610b08565b9094509250506080880135610cf1816110f1565b8091505092959891949750929550565b600060208284031215610d12578081fd5b5051919050565b600080600060408486031215610d2d578283fd5b83359250602084013567ffffffffffffffff811115610d4a578283fd5b610d5686828701610b08565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152610e1460c083018486610d63565b9998505050505050505050565b901515815260200190565b90815260200190565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b600089825288602083015260c06040830152610ffa60c08301888a610d63565b67ffffffffffffffff87166060840152828103608084015261101d818688610d63565b9150508260a08301529998505050505050505050565b60008482526040602083015261104d604083018486610d63565b95945050505050565b67ffffffffffffffff91909116815260200190565b6000821982111561107e5761107e6110c2565b500190565b600082821015611095576110956110c2565b500390565b600067ffffffffffffffff808316818114156110b8576110b86110c2565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461083d57600080fdfea26469706673582212202d3dbd32378d2f49d296babf01ce4c62d300f205ee86baf51e535a8613e9648264736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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":"0x608060405234801561001057600080fd5b50611e77806100206000396000f3fe6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea264697066735822122067372238d920e9724cf8967ebf7f7fa47665c686fd5e59f70acf4931e9ab800464736f6c63430008000033","runtime-code":"0x6080604052600436106101755760003560e01c80639b11079c116100cb578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103a9578063f2fde38b146103c9578063f44d57aa146103e957610175565b8063ac8a4c1b1461035f578063affed0e014610372578063c40873351461039457610175565b8063a5c0edf3116100b0578063a5c0edf31461030a578063a66dd3841461032a578063aa70fc0e1461034a57610175565b80639b11079c146102ca578063a1b058d8146102ea57610175565b80635da6d2c41161012d5780638456cb59116101075780638456cb591461027e5780638da5cb5b146102935780639af1d35a146102b557610175565b80635da6d2c414610229578063715018a614610256578063721771891461026b57610175565b80633f4ba83a1161015e5780633f4ba83a146101d2578063485cc955146101e75780635c975abb1461020757610175565b8063205e157b1461017a57806325b19fa31461019c575b600080fd5b34801561018657600080fd5b5061019a6101953660046113fe565b610409565b005b3480156101a857600080fd5b506101bc6101b73660046114f4565b6104c6565b6040516101c9919061199e565b60405180910390f35b3480156101de57600080fd5b5061019a6104de565b3480156101f357600080fd5b5061019a610202366004611421565b610541565b34801561021357600080fd5b5061021c61061d565b6040516101c9919061192f565b34801561023557600080fd5b506102496102443660046117a2565b610626565b6040516101c9919061193a565b34801561026257600080fd5b5061019a6106fe565b61019a6102793660046115b3565b610761565b34801561028a57600080fd5b5061019a610779565b34801561029f57600080fd5b506102a86107da565b6040516101c991906118b9565b3480156102c157600080fd5b506102496107f6565b3480156102d657600080fd5b5061019a6102e536600461150c565b6107fc565b3480156102f657600080fd5b5061019a610305366004611720565b6108b0565b34801561031657600080fd5b5061019a6103253660046113fe565b610b91565b34801561033657600080fd5b5061019a6103453660046113fe565b610c64565b34801561035657600080fd5b506102a8610d37565b61019a61036d366004611533565b610d53565b34801561037e57600080fd5b50610387610d8f565b6040516101c99190611d25565b3480156103a057600080fd5b506102a8610db7565b3480156103b557600080fd5b5061019a6103c43660046113fe565b610dd3565b3480156103d557600080fd5b5061019a6103e43660046113fe565b610e7c565b3480156103f557600080fd5b50610249610404366004611459565b610f14565b610411610f56565b73ffffffffffffffffffffffffffffffffffffffff1661042f6107da565b73ffffffffffffffffffffffffffffffffffffffff161461046b5760405162461bcd60e51b815260040161046290611ba9565b60405180910390fd5b600060ca544761047b9190611d52565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156104c1573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b6104e6610f56565b73ffffffffffffffffffffffffffffffffffffffff166105046107da565b73ffffffffffffffffffffffffffffffffffffffff16146105375760405162461bcd60e51b815260040161046290611ba9565b61053f610f5a565b565b600054610100900460ff1661055c5760005460ff1615610564565b610564610fc8565b6105805760405162461bcd60e51b815260040161046290611b4c565b600054610100900460ff161580156105c8576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6105d0610fd9565b6105d8611010565b6105e183611043565b6105ea82610c1d565b80156104c157600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc19061068590889088908890600401611d02565b602060405180830381600087803b15801561069f57600080fd5b505af11580156106b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106d79190611708565b9050806106f65760405162461bcd60e51b815260040161046290611a4a565b949350505050565b610706610f56565b73ffffffffffffffffffffffffffffffffffffffff166107246107da565b73ffffffffffffffffffffffffffffffffffffffff16146107575760405162461bcd60e51b815260040161046290611ba9565b61053f600061106a565b610770878787878787876110e1565b50505050505050565b610781610f56565b73ffffffffffffffffffffffffffffffffffffffff1661079f6107da565b73ffffffffffffffffffffffffffffffffffffffff16146107d25760405162461bcd60e51b815260040161046290611ba9565b61053f6112b4565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b610804610f56565b73ffffffffffffffffffffffffffffffffffffffff166108226107da565b73ffffffffffffffffffffffffffffffffffffffff16146108555760405162461bcd60e51b815260040161046290611ba9565b600082815260fb60205260409020805482919060ff191660018360028111156108a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6108b861061d565b156108d55760405162461bcd60e51b815260040161046290611b15565b600081815260fb602052604081205460ff16600281111561091f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1461093c5760405162461bcd60e51b815260040161046290611bde565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d9061096f9033906020016118b9565b6040516020818303038152906040526040518263ffffffff1660e01b815260040161099a919061198b565b60206040518083038186803b1580156109b257600080fd5b505afa1580156109c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ea91906114d4565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610a2f959493929190611943565b600060405180830381600088803b158015610a4957600080fd5b5087f193505050508015610a5b575060015b610ad8573d808015610a89576040519150601f19603f3d011682016040523d82523d6000602084013e610a8e565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610ab98261130f565b604051610ac6919061198b565b60405180910390a16002915050610adc565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610b2e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610b7e939291906119ac565b60405180910390a3505050505050505050565b610b99610f56565b73ffffffffffffffffffffffffffffffffffffffff16610bb76107da565b73ffffffffffffffffffffffffffffffffffffffff1614610bea5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610c1d5760405162461bcd60e51b815260040161046290611ade565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610c6c610f56565b73ffffffffffffffffffffffffffffffffffffffff16610c8a6107da565b73ffffffffffffffffffffffffffffffffffffffff1614610cbd5760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610cf05760405162461bcd60e51b815260040161046290611ade565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610d5b61061d565b15610d785760405162461bcd60e51b815260040161046290611b15565b610d87868686868686326110e1565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ddb610f56565b73ffffffffffffffffffffffffffffffffffffffff16610df96107da565b73ffffffffffffffffffffffffffffffffffffffff1614610e2c5760405162461bcd60e51b815260040161046290611ba9565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610e72573d6000803e3d6000fd5b5050600060ca5550565b610e84610f56565b73ffffffffffffffffffffffffffffffffffffffff16610ea26107da565b73ffffffffffffffffffffffffffffffffffffffff1614610ed55760405162461bcd60e51b815260040161046290611ba9565b73ffffffffffffffffffffffffffffffffffffffff8116610f085760405162461bcd60e51b815260040161046290611a81565b610f118161106a565b50565b600087878787878787604051602001610f3397969594939291906118da565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b610f6261061d565b610f7e5760405162461bcd60e51b815260040161046290611a13565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fb1610f56565b604051610fbe91906118b9565b60405180910390a1565b6000610fd330611375565b15905090565b600054610100900460ff166110005760405162461bcd60e51b815260040161046290611c4c565b61053f61100b610f56565b61106a565b600054610100900460ff166110375760405162461bcd60e51b815260040161046290611c4c565b6065805460ff19169055565b600054610100900460ff16610cf05760405162461bcd60e51b815260040161046290611c4c565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110eb6113b3565b90508087141561110d5760405162461bcd60e51b8152600401610462906119dc565b600061111a888686610626565b90508034101561113c5760405162461bcd60e51b815260040161046290611c15565b600061116d33848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d610f14565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516111db989796959493929190611ca9565b60405180910390a48160ca60008282546111f59190611d3a565b909155505060c9805460149061122c9074010000000000000000000000000000000000000000900467ffffffffffffffff16611d99565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156112a85773ffffffffffffffffffffffffffffffffffffffff84166108fc61127e8434611d52565b6040518115909202916000818181858888f193505050501580156112a6573d6000803e3d6000fd5b505b50505050505050505050565b6112bc61061d565b156112d95760405162461bcd60e51b815260040161046290611b15565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610fb1610f56565b6060604482511015611355575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c7900000060208201526104d9565b6004820191508180602001905181019061136f9190611647565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126113c8578182fd5b50813567ffffffffffffffff8111156113df578182fd5b6020830191508360208285010111156113f757600080fd5b9250929050565b60006020828403121561140f578081fd5b813561141a81611e1f565b9392505050565b60008060408385031215611433578081fd5b823561143e81611e1f565b9150602083013561144e81611e1f565b809150509250929050565b600080600080600080600060c0888a031215611473578283fd5b873561147e81611e1f565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156114b5578283fd5b6114c18a828b016113b7565b989b979a50959850939692959293505050565b6000602082840312156114e5578081fd5b8151801515811461141a578182fd5b600060208284031215611505578081fd5b5035919050565b6000806040838503121561151e578182fd5b8235915060208301356003811061144e578182fd5b6000806000806000806080878903121561154b578182fd5b8635955060208701359450604087013567ffffffffffffffff80821115611570578384fd5b61157c8a838b016113b7565b90965094506060890135915080821115611594578384fd5b506115a189828a016113b7565b979a9699509497509295939492505050565b600080600080600080600060a0888a0312156115cd578283fd5b8735965060208801359550604088013567ffffffffffffffff808211156115f2578485fd5b6115fe8b838c016113b7565b909750955060608a0135915080821115611616578485fd5b506116238a828b016113b7565b909450925050608088013561163781611e1f565b8091505092959891949750929550565b600060208284031215611658578081fd5b815167ffffffffffffffff8082111561166f578283fd5b818401915084601f830112611682578283fd5b81518181111561169457611694611df0565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156116d6576116d6611df0565b6040528181528382016020018710156116ed578485fd5b6116fe826020830160208701611d69565b9695505050505050565b600060208284031215611719578081fd5b5051919050565b60008060008060008060008060e0898b03121561173b578182fd5b8835975060208901359650604089013561175481611e1f565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561177d578283fd5b6117898b828c016113b7565b999c989b50969995989497949560c00135949350505050565b6000806000604084860312156117b6578081fd5b83359250602084013567ffffffffffffffff8111156117d3578182fd5b6117df868287016113b7565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b6000815180845261184c816020860160208601611d69565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106118b5577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a083015261192260c0830184866117ec565b9998505050505050505050565b901515815260200190565b90815260200190565b6000868252856020830152608060408301526119636080830185876117ec565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261141a6020830184611834565b6020810161136f828461187e565b606081016119ba828661187e565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611cc960c08301888a6117ec565b67ffffffffffffffff871660608401528281036080840152611cec8186886117ec565b9150508260a08301529998505050505050505050565b600084825260406020830152611d1c6040830184866117ec565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611d4d57611d4d611dc1565b500190565b600082821015611d6457611d64611dc1565b500390565b60005b83811015611d84578181015183820152602001611d6c565b83811115611d93576000848401525b50505050565b600067ffffffffffffffff80831681811415611db757611db7611dc1565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81168114610f1157600080fdfea264697066735822122067372238d920e9724cf8967ebf7f7fa47665c686fd5e59f70acf4931e9ab800464736f6c63430008000033","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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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}\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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"version\":1}"},"hashes":{"paused()":"5c975abb"}},"/solidity/TestMessageBusUpgradeable.sol:TestMessageBusUpgradeable":{"code":"0x608060405234801561001057600080fd5b506120e2806100206000396000f3fe60806040526004361061018b5760003560e01c80639af1d35a116100d6578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103ff578063f2fde38b1461041f578063f44d57aa1461043f5761018b565b8063ac8a4c1b146103b5578063affed0e0146103c8578063c4087335146103ea5761018b565b8063a5c0edf3116100b0578063a5c0edf314610360578063a66dd38414610380578063aa70fc0e146103a05761018b565b80639af1d35a1461030b5780639b11079c14610320578063a1b058d8146103405761018b565b80635c975abb11610138578063721771891161011257806372177189146102c15780638456cb59146102d45780638da5cb5b146102e95761018b565b80635c975abb1461025d5780635da6d2c41461027f578063715018a6146102ac5761018b565b806336d092691161016957806336d09269146102085780633f4ba83a14610228578063485cc9551461023d5761018b565b8063205e157b1461019057806325b19fa3146101b257806328cab9af146101e8575b600080fd5b34801561019c57600080fd5b506101b06101ab366004611540565b61045f565b005b3480156101be57600080fd5b506101d26101cd3660046116fc565b61051c565b6040516101df9190611c09565b60405180910390f35b3480156101f457600080fd5b506101b061020336600461173f565b610534565b34801561021457600080fd5b506101b061022336600461159b565b61058e565b34801561023457600080fd5b506101b06105f9565b34801561024957600080fd5b506101b0610258366004611563565b61065c565b34801561026957600080fd5b50610272610738565b6040516101df9190611b9a565b34801561028b57600080fd5b5061029f61029a366004611a0d565b610741565b6040516101df9190611ba5565b3480156102b857600080fd5b506101b0610819565b6101b06102cf36600461181e565b61087c565b3480156102e057600080fd5b506101b0610894565b3480156102f557600080fd5b506102fe6108f5565b6040516101df9190611b24565b34801561031757600080fd5b5061029f610911565b34801561032c57600080fd5b506101b061033b366004611714565b610917565b34801561034c57600080fd5b506101b061035b36600461198b565b6109cb565b34801561036c57600080fd5b506101b061037b366004611540565b610cac565b34801561038c57600080fd5b506101b061039b366004611540565b610d7f565b3480156103ac57600080fd5b506102fe610e52565b6101b06103c336600461179e565b610e6e565b3480156103d457600080fd5b506103dd610eaa565b6040516101df9190611f90565b3480156103f657600080fd5b506102fe610ed2565b34801561040b57600080fd5b506101b061041a366004611540565b610eee565b34801561042b57600080fd5b506101b061043a366004611540565b610f97565b34801561044b57600080fd5b5061029f61045a366004611661565b61102f565b610467611071565b73ffffffffffffffffffffffffffffffffffffffff166104856108f5565b73ffffffffffffffffffffffffffffffffffffffff16146104c15760405162461bcd60e51b81526004016104b890611e14565b60405180910390fd5b600060ca54476104d19190611fbd565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610517573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea6586858560405161057f93929190611c17565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c6040516105e4989796959493929190611f14565b60405180910390a45050505050505050505050565b610601611071565b73ffffffffffffffffffffffffffffffffffffffff1661061f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146106525760405162461bcd60e51b81526004016104b890611e14565b61065a611075565b565b600054610100900460ff166106775760005460ff161561067f565b61067f6110e3565b61069b5760405162461bcd60e51b81526004016104b890611db7565b600054610100900460ff161580156106e3576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6106eb6110f4565b6106f361112b565b6106fc8361115e565b61070582610d38565b801561051757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906107a090889088908890600401611f6d565b602060405180830381600087803b1580156107ba57600080fd5b505af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611973565b9050806108115760405162461bcd60e51b81526004016104b890611cb5565b949350505050565b610821611071565b73ffffffffffffffffffffffffffffffffffffffff1661083f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108725760405162461bcd60e51b81526004016104b890611e14565b61065a6000611185565b61088b878787878787876111fc565b50505050505050565b61089c611071565b73ffffffffffffffffffffffffffffffffffffffff166108ba6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108ed5760405162461bcd60e51b81526004016104b890611e14565b61065a6113cf565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b61091f611071565b73ffffffffffffffffffffffffffffffffffffffff1661093d6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146109705760405162461bcd60e51b81526004016104b890611e14565b600082815260fb60205260409020805482919060ff191660018360028111156109c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6109d3610738565b156109f05760405162461bcd60e51b81526004016104b890611d80565b600081815260fb602052604081205460ff166002811115610a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610a575760405162461bcd60e51b81526004016104b890611e49565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610a8a903390602001611b24565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610ab59190611bf6565b60206040518083038186803b158015610acd57600080fd5b505afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0591906116dc565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610b4a959493929190611bae565b600060405180830381600088803b158015610b6457600080fd5b5087f193505050508015610b76575060015b610bf3573d808015610ba4576040519150601f19603f3d011682016040523d82523d6000602084013e610ba9565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610bd48261142a565b604051610be19190611bf6565b60405180910390a16002915050610bf7565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610c9993929190611c17565b60405180910390a3505050505050505050565b610cb4611071565b73ffffffffffffffffffffffffffffffffffffffff16610cd26108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610d055760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610d385760405162461bcd60e51b81526004016104b890611d49565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d87611071565b73ffffffffffffffffffffffffffffffffffffffff16610da56108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610dd85760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610e0b5760405162461bcd60e51b81526004016104b890611d49565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610e76610738565b15610e935760405162461bcd60e51b81526004016104b890611d80565b610ea2868686868686326111fc565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ef6611071565b73ffffffffffffffffffffffffffffffffffffffff16610f146108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610f475760405162461bcd60e51b81526004016104b890611e14565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610f8d573d6000803e3d6000fd5b5050600060ca5550565b610f9f611071565b73ffffffffffffffffffffffffffffffffffffffff16610fbd6108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610ff05760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff81166110235760405162461bcd60e51b81526004016104b890611cec565b61102c81611185565b50565b60008787878787878760405160200161104e9796959493929190611b45565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b61107d610738565b6110995760405162461bcd60e51b81526004016104b890611c7e565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110cc611071565b6040516110d99190611b24565b60405180910390a1565b60006110ee30611490565b15905090565b600054610100900460ff1661111b5760405162461bcd60e51b81526004016104b890611eb7565b61065a611126611071565b611185565b600054610100900460ff166111525760405162461bcd60e51b81526004016104b890611eb7565b6065805460ff19169055565b600054610100900460ff16610e0b5760405162461bcd60e51b81526004016104b890611eb7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006112066114ce565b9050808714156112285760405162461bcd60e51b81526004016104b890611c47565b6000611235888686610741565b9050803410156112575760405162461bcd60e51b81526004016104b890611e80565b600061128833848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d61102f565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516112f6989796959493929190611f14565b60405180910390a48160ca60008282546113109190611fa5565b909155505060c980546014906113479074010000000000000000000000000000000000000000900467ffffffffffffffff16612004565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156113c35773ffffffffffffffffffffffffffffffffffffffff84166108fc6113998434611fbd565b6040518115909202916000818181858888f193505050501580156113c1573d6000803e3d6000fd5b505b50505050505050505050565b6113d7610738565b156113f45760405162461bcd60e51b81526004016104b890611d80565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110cc611071565b6060604482511015611470575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261052f565b6004820191508180602001905181019061148a91906118b2565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126114e3578182fd5b50813567ffffffffffffffff8111156114fa578182fd5b60208301915083602082850101111561151257600080fd5b9250929050565b80356003811061052f57600080fd5b803567ffffffffffffffff8116811461052f57600080fd5b600060208284031215611551578081fd5b813561155c8161208a565b9392505050565b60008060408385031215611575578081fd5b82356115808161208a565b915060208301356115908161208a565b809150509250929050565b60008060008060008060008060008060006101208c8e0312156115bc578687fd5b6115c68c3561208a565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e013511156115f8578788fd5b6116088e60808f01358f016114d2565b909850965061161960a08e01611528565b95508060c08e0135111561162b578485fd5b5061163c8d60c08e01358e016114d2565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a03121561167b578283fd5b87356116868161208a565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156116bd578283fd5b6116c98a828b016114d2565b989b979a50959850939692959293505050565b6000602082840312156116ed578081fd5b8151801515811461155c578182fd5b60006020828403121561170d578081fd5b5035919050565b60008060408385031215611726578182fd5b8235915061173660208401611519565b90509250929050565b600080600080600060a08688031215611756578081fd5b8535945061176660208701611519565b935060408601356117768161208a565b925061178460608701611528565b915061179260808701611528565b90509295509295909350565b600080600080600080608087890312156117b6578182fd5b8635955060208701359450604087013567ffffffffffffffff808211156117db578384fd5b6117e78a838b016114d2565b909650945060608901359150808211156117ff578384fd5b5061180c89828a016114d2565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611838578081fd5b8735965060208801359550604088013567ffffffffffffffff8082111561185d578283fd5b6118698b838c016114d2565b909750955060608a0135915080821115611881578283fd5b5061188e8a828b016114d2565b90945092505060808801356118a28161208a565b8091505092959891949750929550565b6000602082840312156118c3578081fd5b815167ffffffffffffffff808211156118da578283fd5b818401915084601f8301126118ed578283fd5b8151818111156118ff576118ff61205b565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119415761194161205b565b604052818152838201602001871015611958578485fd5b611969826020830160208701611fd4565b9695505050505050565b600060208284031215611984578081fd5b5051919050565b60008060008060008060008060e0898b0312156119a6578182fd5b883597506020890135965060408901356119bf8161208a565b9550606089013594506080890135935060a089013567ffffffffffffffff8111156119e8578283fd5b6119f48b828c016114d2565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611a21578081fd5b83359250602084013567ffffffffffffffff811115611a3e578182fd5b611a4a868287016114d2565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611ab7816020860160208601611fd4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b20577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611b8d60c083018486611a57565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611bce608083018587611a57565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261155c6020830184611a9f565b6020810161148a8284611ae9565b60608101611c258286611ae9565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611f3460c08301888a611a57565b67ffffffffffffffff871660608401528281036080840152611f57818688611a57565b9150508260a08301529998505050505050505050565b600084825260406020830152611f87604083018486611a57565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611fb857611fb861202c565b500190565b600082821015611fcf57611fcf61202c565b500390565b60005b83811015611fef578181015183820152602001611fd7565b83811115611ffe576000848401525b50505050565b600067ffffffffffffffff808316818114156120225761202261202c565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461102c57600080fdfea2646970667358221220a418715bcbfd5a179f9b7ba89ac37d57a53801d5dd429a861f66e88b2e1b470564736f6c63430008000033","runtime-code":"0x60806040526004361061018b5760003560e01c80639af1d35a116100d6578063ac8a4c1b1161007f578063d6b457b911610059578063d6b457b9146103ff578063f2fde38b1461041f578063f44d57aa1461043f5761018b565b8063ac8a4c1b146103b5578063affed0e0146103c8578063c4087335146103ea5761018b565b8063a5c0edf3116100b0578063a5c0edf314610360578063a66dd38414610380578063aa70fc0e146103a05761018b565b80639af1d35a1461030b5780639b11079c14610320578063a1b058d8146103405761018b565b80635c975abb11610138578063721771891161011257806372177189146102c15780638456cb59146102d45780638da5cb5b146102e95761018b565b80635c975abb1461025d5780635da6d2c41461027f578063715018a6146102ac5761018b565b806336d092691161016957806336d09269146102085780633f4ba83a14610228578063485cc9551461023d5761018b565b8063205e157b1461019057806325b19fa3146101b257806328cab9af146101e8575b600080fd5b34801561019c57600080fd5b506101b06101ab366004611540565b61045f565b005b3480156101be57600080fd5b506101d26101cd3660046116fc565b61051c565b6040516101df9190611c09565b60405180910390f35b3480156101f457600080fd5b506101b061020336600461173f565b610534565b34801561021457600080fd5b506101b061022336600461159b565b61058e565b34801561023457600080fd5b506101b06105f9565b34801561024957600080fd5b506101b0610258366004611563565b61065c565b34801561026957600080fd5b50610272610738565b6040516101df9190611b9a565b34801561028b57600080fd5b5061029f61029a366004611a0d565b610741565b6040516101df9190611ba5565b3480156102b857600080fd5b506101b0610819565b6101b06102cf36600461181e565b61087c565b3480156102e057600080fd5b506101b0610894565b3480156102f557600080fd5b506102fe6108f5565b6040516101df9190611b24565b34801561031757600080fd5b5061029f610911565b34801561032c57600080fd5b506101b061033b366004611714565b610917565b34801561034c57600080fd5b506101b061035b36600461198b565b6109cb565b34801561036c57600080fd5b506101b061037b366004611540565b610cac565b34801561038c57600080fd5b506101b061039b366004611540565b610d7f565b3480156103ac57600080fd5b506102fe610e52565b6101b06103c336600461179e565b610e6e565b3480156103d457600080fd5b506103dd610eaa565b6040516101df9190611f90565b3480156103f657600080fd5b506102fe610ed2565b34801561040b57600080fd5b506101b061041a366004611540565b610eee565b34801561042b57600080fd5b506101b061043a366004611540565b610f97565b34801561044b57600080fd5b5061029f61045a366004611661565b61102f565b610467611071565b73ffffffffffffffffffffffffffffffffffffffff166104856108f5565b73ffffffffffffffffffffffffffffffffffffffff16146104c15760405162461bcd60e51b81526004016104b890611e14565b60405180910390fd5b600060ca54476104d19190611fbd565b60405190915073ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610517573d6000803e3d6000fd5b505050565b600081815260fb602052604090205460ff165b919050565b8273ffffffffffffffffffffffffffffffffffffffff16857f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea6586858560405161057f93929190611c17565b60405180910390a35050505050565b80888c73ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a8d8d8c8c8c8c8c8c6040516105e4989796959493929190611f14565b60405180910390a45050505050505050505050565b610601611071565b73ffffffffffffffffffffffffffffffffffffffff1661061f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146106525760405162461bcd60e51b81526004016104b890611e14565b61065a611075565b565b600054610100900460ff166106775760005460ff161561067f565b61067f6110e3565b61069b5760405162461bcd60e51b81526004016104b890611db7565b600054610100900460ff161580156106e3576000805460ff197fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909116610100171660011790555b6106eb6110f4565b6106f361112b565b6106fc8361115e565b61070582610d38565b801561051757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b60655460ff1690565b60c9546040517f47feadc1000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906347feadc1906107a090889088908890600401611f6d565b602060405180830381600087803b1580156107ba57600080fd5b505af11580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611973565b9050806108115760405162461bcd60e51b81526004016104b890611cb5565b949350505050565b610821611071565b73ffffffffffffffffffffffffffffffffffffffff1661083f6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108725760405162461bcd60e51b81526004016104b890611e14565b61065a6000611185565b61088b878787878787876111fc565b50505050505050565b61089c611071565b73ffffffffffffffffffffffffffffffffffffffff166108ba6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146108ed5760405162461bcd60e51b81526004016104b890611e14565b61065a6113cf565b60335473ffffffffffffffffffffffffffffffffffffffff1690565b60ca5481565b61091f611071565b73ffffffffffffffffffffffffffffffffffffffff1661093d6108f5565b73ffffffffffffffffffffffffffffffffffffffff16146109705760405162461bcd60e51b81526004016104b890611e14565b600082815260fb60205260409020805482919060ff191660018360028111156109c2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b6109d3610738565b156109f05760405162461bcd60e51b81526004016104b890611d80565b600081815260fb602052604081205460ff166002811115610a3a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14610a575760405162461bcd60e51b81526004016104b890611e49565b60fa5460405173ffffffffffffffffffffffffffffffffffffffff90911690638b1b3a2d90610a8a903390602001611b24565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610ab59190611bf6565b60206040518083038186803b158015610acd57600080fd5b505afa158015610ae1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0591906116dc565b5060008673ffffffffffffffffffffffffffffffffffffffff1663a6060871878a8c8888336040518763ffffffff1660e01b8152600401610b4a959493929190611bae565b600060405180830381600088803b158015610b6457600080fd5b5087f193505050508015610b76575060015b610bf3573d808015610ba4576040519150601f19603f3d011682016040523d82523d6000602084013e610ba9565b606091505b507fffdd6142bbb721f3400e3908b04b86f60649b2e4d191e3f4c50c32c3e6471d2f610bd48261142a565b604051610be19190611bf6565b60405180910390a16002915050610bf7565b5060015b600082815260fb60205260409020805482919060ff19166001836002811115610c49577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055508673ffffffffffffffffffffffffffffffffffffffff16827f04214a849019ea3548afcedee810b5bc1680cfb64e22fdf9051a823f3cdfea65838c89604051610c9993929190611c17565b60405180910390a3505050505050505050565b610cb4611071565b73ffffffffffffffffffffffffffffffffffffffff16610cd26108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610d055760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610d385760405162461bcd60e51b81526004016104b890611d49565b60fa80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610d87611071565b73ffffffffffffffffffffffffffffffffffffffff16610da56108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610dd85760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff8116610e0b5760405162461bcd60e51b81526004016104b890611d49565b60c980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60c95473ffffffffffffffffffffffffffffffffffffffff1681565b610e76610738565b15610e935760405162461bcd60e51b81526004016104b890611d80565b610ea2868686868686326111fc565b505050505050565b60c95474010000000000000000000000000000000000000000900467ffffffffffffffff1681565b60fa5473ffffffffffffffffffffffffffffffffffffffff1681565b610ef6611071565b73ffffffffffffffffffffffffffffffffffffffff16610f146108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610f475760405162461bcd60e51b81526004016104b890611e14565b60ca5460405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610f8d573d6000803e3d6000fd5b5050600060ca5550565b610f9f611071565b73ffffffffffffffffffffffffffffffffffffffff16610fbd6108f5565b73ffffffffffffffffffffffffffffffffffffffff1614610ff05760405162461bcd60e51b81526004016104b890611e14565b73ffffffffffffffffffffffffffffffffffffffff81166110235760405162461bcd60e51b81526004016104b890611cec565b61102c81611185565b50565b60008787878787878760405160200161104e9796959493929190611b45565b604051602081830303815290604052805190602001209050979650505050505050565b3390565b61107d610738565b6110995760405162461bcd60e51b81526004016104b890611c7e565b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6110cc611071565b6040516110d99190611b24565b60405180910390a1565b60006110ee30611490565b15905090565b600054610100900460ff1661111b5760405162461bcd60e51b81526004016104b890611eb7565b61065a611126611071565b611185565b600054610100900460ff166111525760405162461bcd60e51b81526004016104b890611eb7565b6065805460ff19169055565b600054610100900460ff16610e0b5760405162461bcd60e51b81526004016104b890611eb7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006112066114ce565b9050808714156112285760405162461bcd60e51b81526004016104b890611c47565b6000611235888686610741565b9050803410156112575760405162461bcd60e51b81526004016104b890611e80565b600061128833848c8c60c960149054906101000a900467ffffffffffffffff1667ffffffffffffffff168d8d61102f565b905080893373ffffffffffffffffffffffffffffffffffffffff167f864ad5e86ed3626c9517260fbfe1eed395157fd938e459e9fb607a07129cdd2a868e8d8d60c960149054906101000a900467ffffffffffffffff168e8e8c6040516112f6989796959493929190611f14565b60405180910390a48160ca60008282546113109190611fa5565b909155505060c980546014906113479074010000000000000000000000000000000000000000900467ffffffffffffffff16612004565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550813411156113c35773ffffffffffffffffffffffffffffffffffffffff84166108fc6113998434611fbd565b6040518115909202916000818181858888f193505050501580156113c1573d6000803e3d6000fd5b505b50505050505050505050565b6113d7610738565b156113f45760405162461bcd60e51b81526004016104b890611d80565b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110cc611071565b6060604482511015611470575060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015261052f565b6004820191508180602001905181019061148a91906118b2565b92915050565b6000808273ffffffffffffffffffffffffffffffffffffffff16803b806020016040519081016040528181526000908060200190933c511192915050565b4690565b60008083601f8401126114e3578182fd5b50813567ffffffffffffffff8111156114fa578182fd5b60208301915083602082850101111561151257600080fd5b9250929050565b80356003811061052f57600080fd5b803567ffffffffffffffff8116811461052f57600080fd5b600060208284031215611551578081fd5b813561155c8161208a565b9392505050565b60008060408385031215611575578081fd5b82356115808161208a565b915060208301356115908161208a565b809150509250929050565b60008060008060008060008060008060006101208c8e0312156115bc578687fd5b6115c68c3561208a565b8b359a5060208c0135995060408c0135985060608c0135975067ffffffffffffffff8060808e013511156115f8578788fd5b6116088e60808f01358f016114d2565b909850965061161960a08e01611528565b95508060c08e0135111561162b578485fd5b5061163c8d60c08e01358e016114d2565b9b9e9a9d50989b979a96999598949794969560e0860135956101000135945092505050565b600080600080600080600060c0888a03121561167b578283fd5b87356116868161208a565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff8111156116bd578283fd5b6116c98a828b016114d2565b989b979a50959850939692959293505050565b6000602082840312156116ed578081fd5b8151801515811461155c578182fd5b60006020828403121561170d578081fd5b5035919050565b60008060408385031215611726578182fd5b8235915061173660208401611519565b90509250929050565b600080600080600060a08688031215611756578081fd5b8535945061176660208701611519565b935060408601356117768161208a565b925061178460608701611528565b915061179260808701611528565b90509295509295909350565b600080600080600080608087890312156117b6578182fd5b8635955060208701359450604087013567ffffffffffffffff808211156117db578384fd5b6117e78a838b016114d2565b909650945060608901359150808211156117ff578384fd5b5061180c89828a016114d2565b979a9699509497509295939492505050565b600080600080600080600060a0888a031215611838578081fd5b8735965060208801359550604088013567ffffffffffffffff8082111561185d578283fd5b6118698b838c016114d2565b909750955060608a0135915080821115611881578283fd5b5061188e8a828b016114d2565b90945092505060808801356118a28161208a565b8091505092959891949750929550565b6000602082840312156118c3578081fd5b815167ffffffffffffffff808211156118da578283fd5b818401915084601f8301126118ed578283fd5b8151818111156118ff576118ff61205b565b60405160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011682010181811084821117156119415761194161205b565b604052818152838201602001871015611958578485fd5b611969826020830160208701611fd4565b9695505050505050565b600060208284031215611984578081fd5b5051919050565b60008060008060008060008060e0898b0312156119a6578182fd5b883597506020890135965060408901356119bf8161208a565b9550606089013594506080890135935060a089013567ffffffffffffffff8111156119e8578283fd5b6119f48b828c016114d2565b999c989b50969995989497949560c00135949350505050565b600080600060408486031215611a21578081fd5b83359250602084013567ffffffffffffffff811115611a3e578182fd5b611a4a868287016114d2565b9497909650939450505050565b600082845282826020860137806020848601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85011685010190509392505050565b60008151808452611ab7816020860160208601611fd4565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b20577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b600073ffffffffffffffffffffffffffffffffffffffff8916825287602083015286604083015285606083015284608083015260c060a0830152611b8d60c083018486611a57565b9998505050505050505050565b901515815260200190565b90815260200190565b600086825285602083015260806040830152611bce608083018587611a57565b905073ffffffffffffffffffffffffffffffffffffffff831660608301529695505050505050565b60006020825261155c6020830184611a9f565b6020810161148a8284611ae9565b60608101611c258286611ae9565b67ffffffffffffffff8085166020840152808416604084015250949350505050565b6020808252600f908201527f496e76616c696420636861696e49640000000000000000000000000000000000604082015260600190565b60208082526014908201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604082015260600190565b6020808252600b908201527f466565206e6f7420736574000000000000000000000000000000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252600f908201527f43616e6e6f742073657420746f20300000000000000000000000000000000000604082015260600190565b60208082526010908201527f5061757361626c653a2070617573656400000000000000000000000000000000604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d65737361676520616c72656164792065786563757465640000000000000000604082015260600190565b60208082526014908201527f496e73756666696369656e742067617320666565000000000000000000000000604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600089825288602083015260c06040830152611f3460c08301888a611a57565b67ffffffffffffffff871660608401528281036080840152611f57818688611a57565b9150508260a08301529998505050505050505050565b600084825260406020830152611f87604083018486611a57565b95945050505050565b67ffffffffffffffff91909116815260200190565b60008219821115611fb857611fb861202c565b500190565b600082821015611fcf57611fcf61202c565b500390565b60005b83811015611fef578181015183820152602001611fd7565b83811115611ffe576000848401525b50505050565b600067ffffffffffffffff808316818114156120225761202261202c565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8116811461102c57600080fdfea2646970667358221220a418715bcbfd5a179f9b7ba89ac37d57a53801d5dd429a861f66e88b2e1b470564736f6c63430008000033","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}\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:913:0:-:0;;;;;;;;;;;;;;;;;;;","srcMapRuntime":"16024:913: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;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;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:953::-;;7247:2;7235:9;7226:7;7222:23;7218:32;7215:2;;;7268:6;7260;7253:22;7215:2;7306:9;7300:16;7335:18;7376:2;7368:6;7365:14;7362:2;;;7397:6;7389;7382:22;7362:2;7440:6;7429:9;7425:22;7415:32;;7485:7;7478:4;7474:2;7470:13;7466:27;7456:2;;7512:6;7504;7497:22;7456:2;7546;7540:9;7568:2;7564;7561:10;7558:2;;;7574:18;;:::i;:::-;7623:2;7617:9;7758:2;7688:66;7681:4;7677:2;7673:13;7669:86;7661:6;7657:99;7653:108;7811:6;7799:10;7796:22;7791:2;7779:10;7776:18;7773:46;7770:2;;;7822:18;;:::i;:::-;7858:2;7851:22;7882:18;;;7919:11;;;7932:2;7915:20;7912:33;-1:-1:-1;7909:2:1;;;7963:6;7955;7948:22;7909:2;7981:55;8033:2;8028;8020:6;8016:15;8011:2;8007;8003:11;7981:55;:::i;:::-;8055:6;7205:862;-1:-1:-1;;;;;;7205:862:1:o;8072:194::-;;8195:2;8183:9;8174:7;8170:23;8166:32;8163:2;;;8216:6;8208;8201:22;8163:2;-1:-1:-1;8244:16:1;;8153:113;-1:-1:-1;8153:113:1:o;8271:912::-;;;;;;;;;8504:3;8492:9;8483:7;8479:23;8475:33;8472:2;;;8526:6;8518;8511:22;8472:2;8567:9;8554:23;8544:33;;8624:2;8613:9;8609:18;8596:32;8586:42;;8678:2;8667:9;8663:18;8650:32;8691:33;8718:5;8691:33;:::i;:::-;8743:5;-1:-1:-1;8795:2:1;8780:18;;8767:32;;-1:-1:-1;8846:3:1;8831:19;;8818:33;;-1:-1:-1;8902:3:1;8887:19;;8874:33;8930:18;8919:30;;8916:2;;;8967:6;8959;8952:22;8916:2;9011:60;9063:7;9054:6;9043:9;9039:22;9011:60;:::i;:::-;8462:721;;;;-1:-1:-1;8462:721:1;;;;;;8985:86;;9172:3;9157:19;9144:33;;8462:721;-1:-1:-1;;;;8462:721:1:o;9188:499::-;;;;9336:2;9324:9;9315:7;9311:23;9307:32;9304:2;;;9357:6;9349;9342:22;9304:2;9398:9;9385:23;9375:33;;9459:2;9448:9;9444:18;9431:32;9486:18;9478:6;9475:30;9472:2;;;9523:6;9515;9508:22;9472:2;9567:60;9619:7;9610:6;9599:9;9595:22;9567:60;:::i;:::-;9294:393;;9646:8;;-1:-1:-1;9541:86:1;;-1:-1:-1;;;;9294:393:1:o;9692:329::-;;9782:6;9777:3;9770:19;9834:6;9827:5;9820:4;9815:3;9811:14;9798:43;9886:3;9879:4;9870:6;9865:3;9861:16;9857:27;9850:40;10010:4;9940:66;9935:2;9927:6;9923:15;9919:88;9914:3;9910:98;9906:109;9899:116;;9760:261;;;;;:::o;10026:318::-;;10107:5;10101:12;10134:6;10129:3;10122:19;10150:63;10206:6;10199:4;10194:3;10190:14;10183:4;10176:5;10172:16;10150:63;:::i;:::-;10258:2;10246:15;10263:66;10242:88;10233:98;;;;10333:4;10229:109;;10077:267;-1:-1:-1;;10077:267:1:o;10349:296::-;10432:1;10425:5;10422:12;10412:2;;10468:77;10465:1;10458:88;10569:4;10566:1;10559:15;10597:4;10594:1;10587:15;10412:2;10621:18;;10402:243::o;10650:226::-;10826:42;10814:55;;;;10796:74;;10784:2;10769:18;;10751:125::o;10881:654::-;;11190:42;11182:6;11178:55;11167:9;11160:74;11270:6;11265:2;11254:9;11250:18;11243:34;11313:6;11308:2;11297:9;11293:18;11286:34;11356:6;11351:2;11340:9;11336:18;11329:34;11400:6;11394:3;11383:9;11379:19;11372:35;11444:3;11438;11427:9;11423:19;11416:32;11465:64;11524:3;11513:9;11509:19;11501:6;11493;11465:64;:::i;:::-;11457:72;11150:385;-1:-1:-1;;;;;;;;;11150:385:1:o;11540:187::-;11705:14;;11698:22;11680:41;;11668:2;11653:18;;11635:92::o;11732:177::-;11878:25;;;11866:2;11851:18;;11833:76::o;11914:510::-;;12155:6;12144:9;12137:25;12198:6;12193:2;12182:9;12178:18;12171:34;12241:3;12236:2;12225:9;12221:18;12214:31;12262:64;12321:3;12310:9;12306:19;12298:6;12290;12262:64;:::i;:::-;12254:72;;12374:42;12366:6;12362:55;12357:2;12346:9;12342:18;12335:83;12127:297;;;;;;;;:::o;12429:219::-;;12576:2;12565:9;12558:21;12596:46;12638:2;12627:9;12623:18;12615:6;12596:46;:::i;12653:208::-;12797:2;12782:18;;12809:46;12786:9;12837:6;12809:46;:::i;12866:401::-;13062:2;13047:18;;13074:46;13051:9;13102:6;13074:46;:::i;:::-;13139:18;13205:2;13197:6;13193:15;13188:2;13177:9;13173:18;13166:43;13257:2;13249:6;13245:15;13240:2;13229:9;13225:18;13218:43;;13029:238;;;;;;:::o;13498:339::-;13700:2;13682:21;;;13739:2;13719:18;;;13712:30;13778:17;13773:2;13758:18;;13751:45;13828:2;13813:18;;13672:165::o;13842:344::-;14044:2;14026:21;;;14083:2;14063:18;;;14056:30;14122:22;14117:2;14102:18;;14095:50;14177:2;14162:18;;14016:170::o;14191:335::-;14393:2;14375:21;;;14432:2;14412:18;;;14405:30;14471:13;14466:2;14451:18;;14444:41;14517:2;14502:18;;14365:161::o;14531:402::-;14733:2;14715:21;;;14772:2;14752:18;;;14745:30;14811:34;14806:2;14791:18;;14784:62;14882:8;14877:2;14862:18;;14855:36;14923:3;14908:19;;14705:228::o;14938:339::-;15140:2;15122:21;;;15179:2;15159:18;;;15152:30;15218:17;15213:2;15198:18;;15191:45;15268:2;15253:18;;15112:165::o;15282:340::-;15484:2;15466:21;;;15523:2;15503:18;;;15496:30;15562:18;15557:2;15542:18;;15535:46;15613:2;15598:18;;15456:166::o;15627:410::-;15829:2;15811:21;;;15868:2;15848:18;;;15841:30;15907:34;15902:2;15887:18;;15880:62;15978:16;15973:2;15958:18;;15951:44;16027:3;16012:19;;15801:236::o;16042:356::-;16244:2;16226:21;;;16263:18;;;16256:30;16322:34;16317:2;16302:18;;16295:62;16389:2;16374:18;;16216:182::o;16403:348::-;16605:2;16587:21;;;16644:2;16624:18;;;16617:30;16683:26;16678:2;16663:18;;16656:54;16742:2;16727:18;;16577:174::o;16756:344::-;16958:2;16940:21;;;16997:2;16977:18;;;16970:30;17036:22;17031:2;17016:18;;17009:50;17091:2;17076:18;;16930:170::o;17105:407::-;17307:2;17289:21;;;17346:2;17326:18;;;17319:30;17385:34;17380:2;17365:18;;17358:62;17456:13;17451:2;17436:18;;17429:41;17502:3;17487:19;;17279:233::o;17699:746::-;;18022:6;18011:9;18004:25;18065:6;18060:2;18049:9;18045:18;18038:34;18108:3;18103:2;18092:9;18088:18;18081:31;18135:64;18194:3;18183:9;18179:19;18171:6;18163;18135:64;:::i;:::-;18247:18;18239:6;18235:31;18230:2;18219:9;18215:18;18208:59;18316:9;18308:6;18304:22;18298:3;18287:9;18283:19;18276:51;18344;18388:6;18380;18372;18344:51;:::i;:::-;18336:59;;;18432:6;18426:3;18415:9;18411:19;18404:35;17994:451;;;;;;;;;;;:::o;18450:317::-;;18635:6;18624:9;18617:25;18678:2;18673;18662:9;18658:18;18651:30;18698:63;18757:2;18746:9;18742:18;18734:6;18726;18698:63;:::i;:::-;18690:71;18607:160;-1:-1:-1;;;;;18607:160:1:o;18772:200::-;18946:18;18934:31;;;;18916:50;;18904:2;18889:18;;18871:101::o;18977:128::-;;19048:1;19044:6;19041:1;19038:13;19035:2;;;19054:18;;:::i;:::-;-1:-1:-1;19090:9:1;;19025:80::o;19110:125::-;;19178:1;19175;19172:8;19169:2;;;19183:18;;:::i;:::-;-1:-1:-1;19220:9:1;;19159:76::o;19240:258::-;19312:1;19322:113;19336:6;19333:1;19330:13;19322:113;;;19412:11;;;19406:18;19393:11;;;19386:39;19358:2;19351:10;19322:113;;;19453:6;19450:1;19447:13;19444:2;;;19488:1;19479:6;19474:3;19470:16;19463:27;19444:2;;19293:205;;;:::o;19503:209::-;;19569:18;19622:2;19615:5;19611:14;19649:2;19640:7;19637:15;19634:2;;;19655:18;;:::i;:::-;19704:1;19691:15;;19549:163;-1:-1:-1;;;19549:163:1:o;19717:184::-;19769:77;19766:1;19759:88;19866:4;19863:1;19856:15;19890:4;19887:1;19880:15;19906:184;19958:77;19955:1;19948:88;20055:4;20052:1;20045:15;20079:4;20076:1;20069:15;20095:156;20183:42;20176:5;20172:54;20165:5;20162:65;20152:2;;20241:1;20238;20231: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":"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\":\"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\":\"0x9e3d4603d23f73083c571095e009d1a6bb37c058ebd9acb46616b6fe6e871838\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5a39e9c2640b3424f5d381634319dda8cd925f4c8d524bf48997a5e3d43e7c8d\",\"dweb:/ipfs/Qmc4kx24tquvLtQEA9fs1hYxsz8ctjKRVbmC6qTJwPGF41\"]}},\"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","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"}}} \ No newline at end of file +{"/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"}}} \ No newline at end of file diff --git a/services/explorer/contracts/message/topics.go b/services/explorer/contracts/message/topics.go index 75ee016b05..5e9076cc3e 100644 --- a/services/explorer/contracts/message/topics.go +++ b/services/explorer/contracts/message/topics.go @@ -18,6 +18,8 @@ func init() { ExecutedTopic = parsedMessage.Events["Executed"].ID MessageSentTopic = parsedMessage.Events["MessageSent"].ID + + CallRevertedTopic = parsedMessage.Events["CallReverted"].ID } // ExecutedTopic is the topic used for receiving messages. @@ -26,12 +28,16 @@ var ExecutedTopic common.Hash // MessageSentTopic is the topic used for sending messages. var MessageSentTopic common.Hash +// CallRevertedTopic is the topic used for checking reverted calls. +var CallRevertedTopic common.Hash + // TopicMap maps events to topics. // this is returned as a function to assert immutability. func TopicMap() map[message.EventType]common.Hash { return map[message.EventType]common.Hash{ - message.ExecutedEvent: ExecutedTopic, - message.MessageSentEvent: MessageSentTopic, + message.ExecutedEvent: ExecutedTopic, + message.MessageSentEvent: MessageSentTopic, + message.CallRevertedEvent: CallRevertedTopic, } } diff --git a/services/explorer/db/consumerinterface.go b/services/explorer/db/consumerinterface.go index 3da3932c50..c0295f02a8 100644 --- a/services/explorer/db/consumerinterface.go +++ b/services/explorer/db/consumerinterface.go @@ -2,7 +2,6 @@ package db import ( "context" - "github.com/synapsecns/sanguine/services/explorer/db/sql" "github.com/synapsecns/sanguine/services/explorer/graphql/server/graph/model" "gorm.io/gorm" ) @@ -10,7 +9,7 @@ import ( // ConsumerDBWriter is the interface for writing to the ConsumerDB. type ConsumerDBWriter interface { // StoreEvent stores an event. - StoreEvent(ctx context.Context, bridgeEvent *sql.BridgeEvent, swapEvent *sql.SwapEvent, messageEvent *sql.MessageEvent) error + StoreEvent(ctx context.Context, event interface{}) error // UNSAFE_DB gets the underlying gorm db. This is not intended for use in production. // //nolint:golint diff --git a/services/explorer/db/mocks/consumer_db.go b/services/explorer/db/mocks/consumer_db.go index 564636cfc7..2c1b6806e1 100644 --- a/services/explorer/db/mocks/consumer_db.go +++ b/services/explorer/db/mocks/consumer_db.go @@ -10,8 +10,6 @@ import ( mock "github.com/stretchr/testify/mock" model "github.com/synapsecns/sanguine/services/explorer/graphql/server/graph/model" - - sql "github.com/synapsecns/sanguine/services/explorer/db/sql" ) // ConsumerDB is an autogenerated mock type for the ConsumerDB type @@ -270,13 +268,13 @@ func (_m *ConsumerDB) ReadBlockNumberByChainID(ctx context.Context, eventType in return r0, r1 } -// StoreEvent provides a mock function with given fields: ctx, bridgeEvent, swapEvent, messageEvent -func (_m *ConsumerDB) StoreEvent(ctx context.Context, bridgeEvent *sql.BridgeEvent, swapEvent *sql.SwapEvent, messageEvent *sql.MessageEvent) error { - ret := _m.Called(ctx, bridgeEvent, swapEvent, messageEvent) +// StoreEvent provides a mock function with given fields: ctx, event +func (_m *ConsumerDB) StoreEvent(ctx context.Context, event interface{}) error { + ret := _m.Called(ctx, event) var r0 error - if rf, ok := ret.Get(0).(func(context.Context, *sql.BridgeEvent, *sql.SwapEvent, *sql.MessageEvent) error); ok { - r0 = rf(ctx, bridgeEvent, swapEvent, messageEvent) + if rf, ok := ret.Get(0).(func(context.Context, interface{}) error); ok { + r0 = rf(ctx, event) } else { r0 = ret.Error(0) } diff --git a/services/explorer/db/sql/model.go b/services/explorer/db/sql/model.go index 056a51eba6..3e5b461e92 100644 --- a/services/explorer/db/sql/model.go +++ b/services/explorer/db/sql/model.go @@ -224,29 +224,31 @@ type MessageEvent struct { EventIndex uint64 `gorm:"column:event_index"` // Sender is the address of the sender Sender string `gorm:"column:sender"` + // MessageId is the message id of the event. - MessageID string `gorm:"column:message_id"` + MessageID sql.NullString `gorm:"column:message_id"` // SourceChainID is the chain id of the message's source chain. SourceChainID *big.Int `gorm:"column:source_chain_id;type:UInt256"` - // Status is the status of the event. Status sql.NullString `gorm:"column:status"` - // GetSourceAddress is the address that the message will be passed from. + // SourceAddress is the address that the message will be passed from. SourceAddress sql.NullString `gorm:"column:source_address"` // DestinationAddress is the address that the message will be passed to. DestinationAddress sql.NullString `gorm:"column:destination_address"` // DestinationChainID is the chain id of the message's destination chain. DestinationChainID *big.Int `gorm:"column:destination_chain_id;type:UInt256"` - // Nonce is the nonce of the message. + // Nonce is the nonce of the message. It is equivalent to the nonce on the origin chain. Nonce *big.Int `gorm:"column:nonce;type:UInt256"` // Message is the message. Message sql.NullString `gorm:"column:message"` // Receiver is the receiver of the event. Receiver sql.NullString `gorm:"column:receiver"` - // Options is the message. + // Options are the options chosen for the message. Options sql.NullString `gorm:"column:options"` // Fee is the fee of the message. Fee *big.Int `gorm:"column:fee;type:UInt256"` - // TimeStamp is the fee of the message. + // RevertedReason is the reason a call was reverted. + RevertedReason sql.NullString `gorm:"column:reverted_reason"` + // TimeStamp is the timestamp in which the record was inserted. TimeStamp *uint64 `gorm:"column:timestamp"` } diff --git a/services/explorer/db/sql/writer.go b/services/explorer/db/sql/writer.go index badc999c30..693449eec2 100644 --- a/services/explorer/db/sql/writer.go +++ b/services/explorer/db/sql/writer.go @@ -6,21 +6,21 @@ import ( ) // StoreEvent stores a generic event that has the proper fields set by `eventToBridgeEvent`. -func (s *Store) StoreEvent(ctx context.Context, bridgeEvent *BridgeEvent, swapEvent *SwapEvent, messageEvent *MessageEvent) error { - if bridgeEvent != nil { - dbTx := s.UNSAFE_DB().WithContext(ctx).Create(*bridgeEvent) +func (s *Store) StoreEvent(ctx context.Context, event interface{}) error { + switch conv := event.(type) { + case *BridgeEvent: + dbTx := s.UNSAFE_DB().WithContext(ctx).Create(conv) if dbTx.Error != nil { return fmt.Errorf("failed to store bridge event: %w", dbTx.Error) } - } - if swapEvent != nil { - dbTx := s.UNSAFE_DB().WithContext(ctx).Create(*swapEvent) + + case *SwapEvent: + dbTx := s.UNSAFE_DB().WithContext(ctx).Create(conv) if dbTx.Error != nil { return fmt.Errorf("failed to store swap event: %w", dbTx.Error) } - } - if messageEvent != nil { - dbTx := s.UNSAFE_DB().WithContext(ctx).Create(*messageEvent) + case *MessageEvent: + dbTx := s.UNSAFE_DB().WithContext(ctx).Create(conv) if dbTx.Error != nil { return fmt.Errorf("failed to store message event: %w", dbTx.Error) } diff --git a/services/explorer/db/writer_test.go b/services/explorer/db/writer_test.go index e48354b9f0..42472d2721 100644 --- a/services/explorer/db/writer_test.go +++ b/services/explorer/db/writer_test.go @@ -26,7 +26,7 @@ func (t *DBSuite) TestBridgeWrite() { Recipient: sql.NullString{String: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), Valid: true}, DestinationChainID: big.NewInt(gofakeit.Int64()), } - err := t.db.StoreEvent(t.GetTestContext(), bridgeEvent, nil, nil) + err := t.db.StoreEvent(t.GetTestContext(), bridgeEvent) Nil(t.T(), err) } @@ -46,22 +46,21 @@ func (t *DBSuite) TestSwapWrite() { SoldID: big.NewInt(gofakeit.Int64()), BoughtID: big.NewInt(gofakeit.Int64()), } - err := t.db.StoreEvent(t.GetTestContext(), nil, swapEvent, nil) + err := t.db.StoreEvent(t.GetTestContext(), swapEvent) Nil(t.T(), err) } func (t *DBSuite) TestMessageWrite() { defer t.cleanup() messageEvent := &model.MessageEvent{ - InsertTime: gofakeit.Uint64(), - ContractAddress: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), - ChainID: gofakeit.Uint32(), - EventType: messageTypes.MessageSentEvent.Int(), - BlockNumber: gofakeit.Uint64(), - TxHash: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), - MessageID: gofakeit.Sentence(10), - SourceChainID: big.NewInt(gofakeit.Int64()), - + InsertTime: gofakeit.Uint64(), + ContractAddress: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), + ChainID: gofakeit.Uint32(), + EventType: messageTypes.MessageSentEvent.Int(), + BlockNumber: gofakeit.Uint64(), + TxHash: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), + MessageID: sql.NullString{String: gofakeit.Sentence(10), Valid: true}, + SourceChainID: big.NewInt(gofakeit.Int64()), SourceAddress: sql.NullString{String: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), Valid: true}, DestinationChainID: big.NewInt(gofakeit.Int64()), Nonce: big.NewInt(gofakeit.Int64()), @@ -70,6 +69,6 @@ func (t *DBSuite) TestMessageWrite() { Message: sql.NullString{String: gofakeit.Sentence(10), Valid: true}, Receiver: sql.NullString{String: common.BigToAddress(big.NewInt(gofakeit.Int64())).String(), Valid: true}, } - err := t.db.StoreEvent(t.GetTestContext(), nil, nil, messageEvent) + err := t.db.StoreEvent(t.GetTestContext(), messageEvent) Nil(t.T(), err) } diff --git a/services/explorer/types/message/event.go b/services/explorer/types/message/event.go index f55881a7ad..54d43b3643 100644 --- a/services/explorer/types/message/event.go +++ b/services/explorer/types/message/event.go @@ -20,7 +20,7 @@ type EventLog interface { // GetEventIndex returns the index of the log. GetEventIndex() uint64 // GetMessageID returns the message id of the event. - GetMessageID() string + GetMessageID() *string // GetSourceChainID returns the chain id of the message's source chain. GetSourceChainID() *big.Int @@ -43,4 +43,6 @@ type EventLog interface { GetOptions() *string // GetFee returns the fee of the message. GetFee() *big.Int + // GetRevertReason returns the reason why the event was reverted. + GetRevertReason() *string } diff --git a/services/explorer/types/message/eventtype.go b/services/explorer/types/message/eventtype.go index b6cc4084c8..ef083cbb5b 100644 --- a/services/explorer/types/message/eventtype.go +++ b/services/explorer/types/message/eventtype.go @@ -10,11 +10,13 @@ const ( ExecutedEvent EventType = iota // MessageSentEvent is the message sent event. MessageSentEvent + // CallRevertedEvent is when a call is reverted. + CallRevertedEvent ) // AllEventTypes is a list of the event types. func AllEventTypes() []EventType { - return []EventType{ExecutedEvent, MessageSentEvent} + return []EventType{ExecutedEvent, MessageSentEvent, CallRevertedEvent} } // Int gets the int value of the event type. diff --git a/services/explorer/types/message/eventtype_string.go b/services/explorer/types/message/eventtype_string.go index f0b5f50c2e..2c9ec7451f 100644 --- a/services/explorer/types/message/eventtype_string.go +++ b/services/explorer/types/message/eventtype_string.go @@ -10,11 +10,12 @@ func _() { var x [1]struct{} _ = x[ExecutedEvent-0] _ = x[MessageSentEvent-1] + _ = x[CallRevertedEvent-2] } -const _EventType_name = "ExecutedEventMessageSentEvent" +const _EventType_name = "ExecutedEventMessageSentEventCallRevertedEvent" -var _EventType_index = [...]uint8{0, 13, 29} +var _EventType_index = [...]uint8{0, 13, 29, 46} func (i EventType) String() string { if i >= EventType(len(_EventType_index)-1) {