@@ -58,42 +58,33 @@ enum IpcMsgKind {
5858 /// @dev general-purpose cross-net transaction that call smart contracts.
5959 Call,
6060 /// @dev receipt from the execution of cross-net messages
61- /// (currently limited to `Transfer` messages)
6261 Result
6362}
6463
6564/// @notice Envelope used to propagate IPC cross-net messages
6665struct IpcEnvelope {
6766 /// @dev type of message being propagated.
6867 IpcMsgKind kind;
69- /// @dev destination of the message
70- /// It makes sense to extract from the encoded message
71- /// all shared fields required by all message, so they
72- /// can be inspected without having to decode the message.
73- IPCAddress to;
74- /// @dev address sending the message
75- IPCAddress from;
7668 /// @dev outgoing nonce for the envelope.
7769 /// This nonce is set by the gateway when committing the message for propagation.
7870 /// This nonce is changed on each network when the message is propagated,
7971 /// so it is unique for each network and prevents replay attacks.
8072 uint64 localNonce;
81- /// @dev Value being sent in the message.
82- /// For `Call` and `Result` kinds, the `value` field is synthetic and does not represent an actual token or native currency transfer.
83- /// Instead, it serves as metadata or an abstract representation of value to be interpreted by the target contract or receipt handler.
84- ///
85- /// For example, in a `Call` message, `value` might represent the intended payment amount for a service in a cross-network dApp,
86- /// allowing the receiving contract to process it as part of its logic, regardless of the actual token transfer mechanics.
87- /// Similarly, in a `Result` message, `value` might represent the outcome of a transaction, such as the total tokens minted or refunded.
88- ///
89- /// For `Transfer` messages, `value` represents the actual amount of native tokens being transferred across networks.
90- uint256 value;
91- /// @dev abi.encoded message
92- bytes message;
9373 /// @dev original nonce of the message from the source network.
9474 /// It is set once at the source network and remains unchanged during propagation.
9575 /// It is used to generate a unique tracing ID across networks, which is useful for debugging and auditing purposes.
9676 uint64 originalNonce;
77+ /// @dev Value being sent in the message.
78+ uint256 value;
79+ /// @dev destination of the message
80+ /// It makes sense to extract from the encoded message
81+ /// all shared fields required by all message, so they
82+ /// can be inspected without having to decode the message.
83+ IPCAddress to;
84+ /// @dev address sending the message
85+ IPCAddress from;
86+ /// @dev abi.encoded message
87+ bytes message;
9788 /// @dev the gas limit is currently not used.
9889 // FIXME: currently not used.
9990 // uint256 gasLimit;
0 commit comments