Skip to content

[XCM in SCs] Extend XCM pre-compile to support query creation and response retrieval #7735

Open
@tiagobndr

Description

@tiagobndr

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.

Metadata

Metadata

Assignees

Labels

T6-XCMThis PR/Issue is related to XCM.T7-smart_contractsThis PR/Issue is related to smart contracts.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions