Skip to content

Entry Point: Runtime API #5

@xlc

Description

@xlc

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions