2

The main aim is to get Governance Origins using subxt from the encoded metadata

1 Answer 1

2

This can be accessed using the following syntax

#[subxt::subxt(runtime_metadata_path = "testmetadata.scale")] pub mod runtime {}

Then access runtime types, Note: use subxt-cli to generate metadata.json so that you can easily see the path.

Then, runtime::runtime_types::kusama_runtime::governance::origins::pallet_custom_origins::Origin::{BigSpender,SmallSpender,....};

<metadata>::<runtime_types>::<kusama_runtime>::<pallet>::<types>::<follow the path>;

Hopefully it helps to access runtime_types , such as weightV2, Origins, Calls ..etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.