Inherits: CrossChainTellerBase
LayerZero implementation of CrossChainTeller
State Variables
messenger
ICrossDomainMessenger public immutable messenger;
peer
maxMessageGas
uint32 public maxMessageGas;
minMessageGas
uint32 public minMessageGas;
nonce
uint128 public nonce;
Functions
constructor
constructor(
address _owner,
address _vault,
address _accountant,
address _messenger
)
CrossChainTellerBase(_owner, _vault, _accountant);
setPeer
Callable by OWNER_ROLE.
function setPeer(address _peer) external requiresAuth;
Parameters
setGasBounds
Callable by OWNER_ROLE.
function setGasBounds(uint32 newMinMessageGas, uint32 newMaxMessageGas) external requiresAuth;
Parameters
the new minMessageGas bound
the new maxMessageGas bound
receiveBridgeMessage
Function for OP Messenger to call to receive a message and mint the shares on this chain
function receiveBridgeMessage(address receiver, uint256 shareMintAmount, bytes32 messageId) external;
Parameters
_bridge
the virtual bridge function to execute Optimism messenger sendMessage()
function _bridge(uint256 shareAmount, BridgeData calldata data) internal override returns (bytes32 messageId);
Parameters
Returns
_beforeBridge
before bridge hook to check gas bound and revert if someone's paying a fee
function _beforeBridge(BridgeData calldata data) internal override;
Parameters
_quote
the virtual function to override to get bridge fees, always zero for OP
function _quote(uint256 shareAmount, BridgeData calldata data) internal view override returns (uint256);
Parameters
Errors
CrossChainOPTellerWithMultiAssetSupport_OnlyMessenger
error CrossChainOPTellerWithMultiAssetSupport_OnlyMessenger();
CrossChainOPTellerWithMultiAssetSupport_OnlyPeerAsSender
error CrossChainOPTellerWithMultiAssetSupport_OnlyPeerAsSender();
CrossChainOPTellerWithMultiAssetSupport_NoFee
error CrossChainOPTellerWithMultiAssetSupport_NoFee();
CrossChainOPTellerWithMultiAssetSupport_GasOutOfBounds
error CrossChainOPTellerWithMultiAssetSupport_GasOutOfBounds(uint32);