Description
This issue is related to #6775
We should add new_query
- which stores a new query in pallet‑xcm
’s Queries
map - and take_response
(or xcm_receive
) to pallet_revive
in order to support these features for smart contracts. Initially, these could be implemented as unstable APIs, but they should eventually be integrated into the XCM precompile (along with other features like xcm_execute
and xcm_send
).
One nuance is that new_query
should require a storage deposit to retain the entry in the Queries
map. For take_response
, the idea is to poll for a response corresponding to a previously created query. If the query is still pending, the user should be informed. Otherwise, the user would receive the response, the callback function (if any) would be executed and the storage deposit would be returned.