OAppAuthCore
Inherits: IOAppCore, Auth
Abstract contract implementing the IOAppCore interface with basic OApp configurations.
This Auth version of OAppCore uses solmate's Auth instead of OZ's Ownable for compatibility purposes
State Variables
endpoint
peers
Functions
constructor
Constructor to initialize the OAppCore with the provided endpoint and delegate.
The delegate typically should be set as the owner of the contract.
Parameters
setPeer
Sets the peer address (OApp instance) for a corresponding endpoint.
this contract replaces the OZ Ownable onlyOwner with Solmate requiresAuth
Only the owner/admin of the OApp can call this function.
Indicates that the peer is trusted to send LayerZero messages to this OApp.
Set this to bytes32(0) to remove the peer address.
Peer is a bytes32 to accommodate non-evm chains.
Parameters
_setPeer
Sets the peer address (OApp instance) for a corresponding endpoint.
Indicates that the peer is trusted to send LayerZero messages to this OApp.
Set this to bytes32(0) to remove the peer address.
Peer is a bytes32 to accommodate non-evm chains.
Parameters
_getPeerOrRevert
Internal function to get the peer address associated with a specific endpoint; reverts if NOT set. ie. the peer is set to bytes32(0).
Parameters
Returns
setDelegate
Sets the delegate address for the OApp.
this contract replaces the OZ Ownable onlyOwner with Solmate requiresAuth
Only the owner/admin of the OApp can call this function.
Provides the ability for a delegate to set configs, on behalf of the OApp, directly on the Endpoint contract.
Parameters