-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Design the runtime API to invoke XCQ from offchain context (SDK, wallets, dApps, etc)
type Xcq = // TBD
type XcqResponse = // TBD
type XcqError = // TBD
type XcqResult = Result<XcqResponse, XcqResult>;
type SizeLimitedXcq = WithMaxSize<Xcq, GetUsize<1024 * 512>>; // max size is chain specific and for WithMaxSize see https://github.com/paritytech/polkadot-sdk/issues/4092
pub trait XcqApi {
/// Execute the provided XCQ with an optional weight limit
/// Return the result and consumed weight
/// When weight_limit is none, the chain specific upper weight is used
fn execute_query(query: SizeLimitedXcq, weight_limit: Option<Weight>) -> (XcqResult, Weight);
}Metadata
Metadata
Assignees
Labels
No labels