Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable query creation and response retrieval in pallet_revive #7896

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tiagobndr
Copy link

@tiagobndr tiagobndr commented Mar 12, 2025

Partially addresses #7735 and #7881

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 in pallet_revive, allowing developers to store new queries in the Queries storage map within pallet-xcm. I also modified new_query in pallet-xcm to account for callbacks and updated on_response to ensure that callbacks are not executed if the timeout has passed.

Still a work in progress.

Checklist

  • Ensure gas is charged for executing new_query
  • Change maybe_notify in pallet-xcm so it also stores the call data (currently it stores only the pallet and call indexes)
  • Implement take_response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant