@@ -6,29 +6,65 @@ import "../libraries/TransceiverStructs.sol";
6
6
import "./IWormholeTransceiverState.sol " ;
7
7
8
8
interface IWormholeTransceiver is IWormholeTransceiverState {
9
+
10
+ /// @notice The instruction for the WormholeTransceiver contract
11
+ /// to skip delivery via the relayer.
9
12
struct WormholeTransceiverInstruction {
10
13
bool shouldSkipRelayerSend;
11
14
}
12
15
16
+ /// @notice Emitted when a relayed message is received.
17
+ /// @dev Topic0
18
+ /// 0xf557dbbb087662f52c815f6c7ee350628a37a51eae9608ff840d996b65f87475
19
+ /// @param digest The digest of the message.
20
+ /// @param emitterChainId The chain ID of the emitter.
21
+ /// @param emitterAddress The address of the emitter.
13
22
event ReceivedRelayedMessage (bytes32 digest , uint16 emitterChainId , bytes32 emitterAddress );
23
+
24
+ /// @notice Emitted when a message is received.
25
+ /// @dev Topic0
26
+ /// 0xf6fc529540981400dc64edf649eb5e2e0eb5812a27f8c81bac2c1d317e71a5f0.
27
+ /// @param digest The digest of the message.
28
+ /// @param emitterChainId The chain ID of the emitter.
29
+ /// @param emitterAddress The address of the emitter.
30
+ /// @param sequence The sequence of the message.
14
31
event ReceivedMessage (
15
32
bytes32 digest , uint16 emitterChainId , bytes32 emitterAddress , uint64 sequence
16
33
);
34
+
35
+ /// @notice Emitted when a message is sent from the transceiver.
36
+ /// @dev Topic0
37
+ /// 0x53b3e029c5ead7bffc739118953883859d30b1aaa086e0dca4d0a1c99cd9c3f5.
38
+ /// @param recipientChain The chain ID of the recipient.
39
+ /// @param message The message.
17
40
event SendTransceiverMessage (
18
41
uint16 recipientChain , TransceiverStructs.TransceiverMessage message
19
42
);
20
43
44
+ /// @notice Error when the relaying configuration is invalid. (e.g. chainId is not registered)
45
+ /// @dev Selector: 0x9449a36c.
46
+ /// @param chainId The chain ID that is invalid.
21
47
error InvalidRelayingConfig (uint16 chainId );
48
+
49
+ /// @notice Error when the peer transceiver is invalid.
50
+ /// @dev Selector: 0x79b1ce56.
51
+ /// @param chainId The chain ID of the peer.
52
+ /// @param peerAddress The address of the invalid peer.
22
53
error InvalidWormholePeer (uint16 chainId , bytes32 peerAddress );
54
+
55
+ /// @notice Error when the VAA has already been consumed.
56
+ /// @dev Selector: 0x406e719e.
57
+ /// @param vaaHash The hash of the VAA.
23
58
error TransferAlreadyCompleted (bytes32 vaaHash );
24
59
25
- /// @notice Receive an attested message from the verification layer. This function should verify
26
- /// the `encodedVm` and then deliver the attestation to the transceiver NttManager contract.
60
+ /// @notice Receive an attested message from the verification layer.
61
+ /// This function should verify the `encodedVm` and then deliver the attestation
62
+ /// to the transceiver NttManager contract.
27
63
/// @param encodedMessage The attested message.
28
64
function receiveMessage (bytes memory encodedMessage ) external ;
29
65
30
- /// @notice Parses the encoded instruction and returns the instruction struct. This instruction
31
- /// is specific to the WormholeTransceiver contract.
66
+ /// @notice Parses the encoded instruction and returns the instruction struct.
67
+ /// This instruction is specific to the WormholeTransceiver contract.
32
68
/// @param encoded The encoded instruction.
33
69
/// @return instruction The parsed `WormholeTransceiverInstruction`.
34
70
function parseWormholeTransceiverInstruction (bytes memory encoded )
0 commit comments