Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Make get_dispatch_info and weight_to_fee Available via state_call #11665

@joepetrowski

Description

@joepetrowski

When constructing XCM Transact calls, it's useful to have an idea of how much weight some call will consume and how much that weight will cost in order to BuyExecution. query_info only takes a fully encoded extrinsic and returns the weight and fee, but requires some hacks, namely:

  • Users must add some bytes to represent an extrinsic (signature/signed extensions), but an XCM Transact will just have the call.
  • The return includes the length fee and the ExtrinsicBaseWeight, which are not relevant in Transact.

The addition of these two endpoints would allow submission of a Call and obtaining its weight and a fee estimate (with the user knowing that the weight to fee rate can be variable so they'll want to supply a little extra):

Related: polkadot-js/apps#7688

Metadata

Metadata

Labels

J0-enhancementAn additional feature request.U3-nice_to_haveIssue is worth doing eventually.Z6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions