The main aim is to get Governance Origins using subxt from the encoded metadata
1 Answer
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