diff --git a/ipc/api/src/cross.rs b/ipc/api/src/cross.rs index 6c3e70b39..051f124a9 100644 --- a/ipc/api/src/cross.rs +++ b/ipc/api/src/cross.rs @@ -33,6 +33,8 @@ pub struct IpcEnvelope { /// outgoing nonce for the envelope. /// This nonce is set by the gateway when committing the message for propagation pub nonce: u64, + /// original nonce of the message from the source network + pub original_nonce: u64, } impl IpcEnvelope { @@ -57,6 +59,7 @@ impl IpcEnvelope { to, value, nonce: 0, + original_nonce: 0, message: Default::default(), }) } @@ -83,6 +86,7 @@ impl IpcEnvelope { to, value, nonce: 0, + original_nonce: 0, message: Default::default(), }) } diff --git a/ipc/api/src/evm.rs b/ipc/api/src/evm.rs index d19a853a3..b1540a6a6 100644 --- a/ipc/api/src/evm.rs +++ b/ipc/api/src/evm.rs @@ -95,6 +95,7 @@ macro_rules! cross_msg_types { .map_err(|e| anyhow!("cannot convert `to`` ipc address due to: {e:}"))?, value: val, nonce: value.nonce, + original_nonce: value.original_nonce, message: ethers::core::types::Bytes::from(value.message), }; Ok(c) @@ -112,6 +113,7 @@ macro_rules! cross_msg_types { kind: IpcMsgKind::try_from(value.kind)?, message: value.message.to_vec(), nonce: value.nonce, + original_nonce: value.original_nonce, }; Ok(s) }