for SubstrateMessagesTarget ,
) -> Result<(TargetHeaderIdOf , MessageNonce), Self::Error> {
let encoded_response = self
.client
.state_call(
P::INBOUND_LANE_LATEST_RECEIVED_NONCE_METHOD.into(),
Bytes(self.lane_id.encode()),
Some(id.1),
)
.await?;
let latest_received_nonce: MessageNonce =
Decode::decode(&mut &encoded_response.0[..]).map_err(SubstrateError::ResponseParseFailed)?;
Ok((id, latest_received_nonce))
}
async fn latest_confirmed_received_nonce(
&self,
id: TargetHeaderIdOf ,
) -> Result<(TargetHeaderIdOf , MessageNonce), Self::Error> {
let encoded_response = self
.client
.state_call(
P::INBOUND_LANE_LATEST_CONFIRMED_NONCE_METHOD.into(),
Bytes(self.lane_id.encode()),
Some(id.1),
)
.await?;
let latest_received_nonce: MessageNonce =
Decode::decode(&mut &encoded_response.0[..]).map_err(SubstrateError::ResponseParseFailed)?;
Ok((id, latest_received_nonce))
}
async fn prove_messages_receiving(
&self,
id: TargetHeaderIdOf ,
) -> Result<(TargetHeaderIdOf , P::MessagesReceivingProof), Self::Error> {
let proof = self
.client
.prove_messages_delivery(self.instance, self.lane_id, id.1)
.await?;
let proof = (id.1, proof, self.lane_id);
Ok((id, proof))
}
async fn submit_messages_proof(
&self,
generated_at_header: SourceHeaderIdOf ,
nonces: RangeInclusive