Closed adu-web3 closed 3 months ago
in ClientChainGateway.sol, we maintain outBoundNonce as the request id so that we could cache every request that is sent out: https://github.com/ExocoreNetwork/exocore-contracts/blob/8c0aef0498ae00a3c336e6f9bb49ad16753b0991/src/core/BaseRestakingController.sol#L77
ClientChainGateway.sol
outBoundNonce
But actually when we call ClientChainGateway._lzSend() in ClientChainGateway._sendMsgToExocore(), it returns an MessagingReceipt that has the outbound nonce included:
ClientChainGateway._lzSend()
ClientChainGateway._sendMsgToExocore()
MessagingReceipt
struct MessagingReceipt { bytes32 guid; uint64 nonce; MessagingFee fee; }
we should use the nonce returned by layerzero endpoint as request id instead of maintaining it by ourselves
Description
in
ClientChainGateway.sol
, we maintainoutBoundNonce
as the request id so that we could cache every request that is sent out: https://github.com/ExocoreNetwork/exocore-contracts/blob/8c0aef0498ae00a3c336e6f9bb49ad16753b0991/src/core/BaseRestakingController.sol#L77But actually when we call
ClientChainGateway._lzSend()
inClientChainGateway._sendMsgToExocore()
, it returns anMessagingReceipt
that has the outbound nonce included:we should use the nonce returned by layerzero endpoint as request id instead of maintaining it by ourselves