-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
131 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.22; | ||
|
||
// @dev Import the 'MessagingFee' so it's exposed to OApp implementers | ||
// solhint-disable-next-line no-unused-import | ||
import { OAppSenderUpgradeable, MessagingFee } from "./OAppSenderUpgradeable.sol"; | ||
// @dev Import the 'Origin' so it's exposed to OApp implementers | ||
// solhint-disable-next-line no-unused-import | ||
import { OAppReceiverUpgradeable, Origin } from "./OAppReceiverUpgradeable.sol"; | ||
import { OAppCoreUpgradeable } from "./OAppCoreUpgradeable.sol"; | ||
|
||
/** | ||
* @title OAppUpgradeable | ||
* @dev Abstract contract serving as the base for OAppUpgradeable implementation, combining OAppSenderUpgradeable and | ||
* OAppReceiverUpgradeable functionality. | ||
* @author Zodomo, https://github.com/Zodomo/LayerZero-v2 | ||
*/ | ||
abstract contract OAppUpgradeable is OAppSenderUpgradeable, OAppReceiverUpgradeable { | ||
/** | ||
* @dev Initializer for the upgradeable OApp with the provided endpoint and owner. | ||
* @param _endpoint The address of the LOCAL LayerZero endpoint. | ||
* @param _owner The address of the owner of the OApp. | ||
*/ | ||
function _initializeOApp(address _endpoint, address _owner) internal virtual onlyInitializing { | ||
_initializeOAppCore(_endpoint, _owner); | ||
} | ||
|
||
/** | ||
* @notice Retrieves the OApp version information. | ||
* @return senderVersion The version of the OAppSender.sol implementation. | ||
* @return receiverVersion The version of the OAppReceiver.sol implementation. | ||
*/ | ||
function oAppVersion() | ||
public | ||
pure | ||
virtual | ||
override(OAppSenderUpgradeable, OAppReceiverUpgradeable) | ||
returns (uint64 senderVersion, uint64 receiverVersion) | ||
{ | ||
return (SENDER_VERSION, RECEIVER_VERSION); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ | ||
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ | ||
@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ | ||
@layerzerolabs/lz-evm-oapp-v2/=lib/LayerZero-v2/oapp/ | ||
@layerzerolabs/lz-evm-protocol-v2/=lib/LayerZero-v2/protocol/ | ||
@layerzerolabs/lz-evm-messagelib-v2/=lib/LayerZero-v2/messagelib/ | ||
@layerzerolabs/lz-evm-v1-0.7/=lib/LayerZero/ | ||
solidity-bytes-utils/=lib/solidity-bytes-utils/ | ||
solidity-bytes-utils/=lib/solidity-bytes-utils/ | ||
@zodomo/oapp-upgradeable/=lib/oapp-upgradeable/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.