5/ ICQ Request
ICQ request occurs on the source chain. ICQ request is divided into 4 steps: construction, encoding, encapsulation and preparation before sending.
1) Build an ABCI request query containing the target chain query message;
2) Encode the ABCI request query through the "CosmosQuery" function;
3) Encapsulate the encoded message;
4) Make it into an IBC data packet and wait for sending.
ICQ Response
ICQ response occurs on the target chain. The ICQ response message is returned to the source chain in the same order of the request queue.
Similar to ICQ request, ICQ response is also divided into 4 steps: construction, encoding, encapsulation and preparation before sending. (As mentioned above, I will not repeat it here)