Bridge contract which is deployed on both L1 and L2. Mostly a thin wrapper which calls the library implementations. See IBridge for more details.
The code hash for the same address on L1 and L2 may be different.
event MessageStatusChanged(bytes32 signal, enum LibBridgeStatus.MessageStatus status)
event DestChainEnabled(uint256 chainId, bool enabled)
receive() external payable
Allow Bridge to receive ETH from EtherVault.
function init(address _addressManager) external
Initializer to be called after being deployed behind a proxy.
function sendMessage(struct IBridge.Message message) external payable returns (bytes32 signal)
Sends a message to the destination chain and takes custody of Ether required in this contract. All extra Ether will be refunded.
function sendSignal(bytes32 signal) external
Stores a signal on the bridge contract and emits an event for the relayer to pick up.
function processMessage(struct IBridge.Message message, bytes proof) external
function retryMessage(struct IBridge.Message message, bool isLastAttempt) external
function isMessageSent(bytes32 signal) public view virtual returns (bool)
Checks if a signal has been stored on the bridge contract by the current address.
function isMessageReceived(bytes32 signal, uint256 srcChainId, bytes proof) public view virtual returns (bool)
Checks if a signal has been received on the destination chain and sent by the src chain.
function isSignalSent(address sender, bytes32 signal) public view virtual returns (bool)
Checks if a signal has been stored on the bridge contract by the specified address.
function isSignalReceived(bytes32 signal, uint256 srcChainId, address sender, bytes proof) public view virtual returns (bool)
Check if a signal has been received on the destination chain and sent by the specified sender.
function getMessageStatus(bytes32 signal) public view virtual returns (enum LibBridgeStatus.MessageStatus)
function context() public view returns (struct IBridge.Context)
Returns the bridge state context.
function isDestChainEnabled(uint256 _chainId) public view returns (bool)
function getMessageStatusSlot(bytes32 signal) public pure returns (bytes32)