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