Enable query creation and response retrieval in pallet_revive
#7896
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a mechanism for creating queries and handling responses to retrieve the result of a remote execution (on a remote chain) within the context of
pallet_revive
. This is particularly relevant for smart contracts on Asset Hub.In the future, this can be integrated with PVQ, enabling users to also query data from external consensus systems (e.g. call view functions in external smart contracts) and receive the result back as a response.
I've implemented a draft of
new_query
inpallet_revive
, allowing developers to store new queries in theQueries
storage map withinpallet-xcm
. I also modifiednew_query
inpallet-xcm
to account for callbacks and updatedon_response
to ensure that callbacks are not executed if the timeout has passed.Still a work in progress.
Checklist
new_query
maybe_notify
inpallet-xcm
so it also stores the call data (currently it stores only the pallet and call indexes)take_response