mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
XXX: Adjust repo to use V15 metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -10,7 +10,7 @@ use crate::{
|
||||
CratePath,
|
||||
};
|
||||
use frame_metadata::{
|
||||
v14::RuntimeMetadataV14,
|
||||
v15::RuntimeMetadataV15,
|
||||
PalletMetadata,
|
||||
};
|
||||
use heck::{
|
||||
@@ -35,7 +35,7 @@ use scale_info::form::PortableForm;
|
||||
/// - `pallet` - Pallet metadata from which the calls are generated.
|
||||
/// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from.
|
||||
pub fn generate_calls(
|
||||
metadata: &RuntimeMetadataV14,
|
||||
metadata: &RuntimeMetadataV15,
|
||||
type_gen: &TypeGenerator,
|
||||
pallet: &PalletMetadata<PortableForm>,
|
||||
types_mod_ident: &syn::Ident,
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::{
|
||||
CratePath,
|
||||
};
|
||||
use frame_metadata::{
|
||||
v14::RuntimeMetadataV14,
|
||||
v15::RuntimeMetadataV15,
|
||||
PalletMetadata,
|
||||
};
|
||||
use heck::ToSnakeCase as _;
|
||||
@@ -43,7 +43,7 @@ use scale_info::form::PortableForm;
|
||||
/// - `pallet` - Pallet metadata from which the calls are generated.
|
||||
/// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from.
|
||||
pub fn generate_constants(
|
||||
metadata: &RuntimeMetadataV14,
|
||||
metadata: &RuntimeMetadataV15,
|
||||
type_gen: &TypeGenerator,
|
||||
pallet: &PalletMetadata<PortableForm>,
|
||||
types_mod_ident: &syn::Ident,
|
||||
|
||||
@@ -28,7 +28,7 @@ use crate::{
|
||||
};
|
||||
use codec::Decode;
|
||||
use frame_metadata::{
|
||||
v14::RuntimeMetadataV14,
|
||||
v15::RuntimeMetadataV15,
|
||||
RuntimeMetadata,
|
||||
RuntimeMetadataPrefixed,
|
||||
};
|
||||
@@ -144,7 +144,7 @@ pub fn generate_runtime_api_from_bytes(
|
||||
|
||||
/// Create the API for interacting with a Substrate runtime.
|
||||
pub struct RuntimeGenerator {
|
||||
metadata: RuntimeMetadataV14,
|
||||
metadata: RuntimeMetadataV15,
|
||||
}
|
||||
|
||||
impl RuntimeGenerator {
|
||||
@@ -155,7 +155,7 @@ impl RuntimeGenerator {
|
||||
/// from that.
|
||||
pub fn new(metadata: RuntimeMetadataPrefixed) -> Self {
|
||||
match metadata.1 {
|
||||
RuntimeMetadata::V14(v14) => Self { metadata: v14 },
|
||||
RuntimeMetadata::V15(v15) => Self { metadata: v15 },
|
||||
_ => panic!("Unsupported metadata version {:?}", metadata.1),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use crate::{
|
||||
CratePath,
|
||||
};
|
||||
use frame_metadata::{
|
||||
v14::RuntimeMetadataV14,
|
||||
v15::RuntimeMetadataV15,
|
||||
PalletMetadata,
|
||||
StorageEntryMetadata,
|
||||
StorageEntryModifier,
|
||||
@@ -36,7 +36,7 @@ use scale_info::{
|
||||
/// - `pallet` - Pallet metadata from which the storages are generated.
|
||||
/// - `types_mod_ident` - The ident of the base module that we can use to access the generated types from.
|
||||
pub fn generate_storage(
|
||||
metadata: &RuntimeMetadataV14,
|
||||
metadata: &RuntimeMetadataV15,
|
||||
type_gen: &TypeGenerator,
|
||||
pallet: &PalletMetadata<PortableForm>,
|
||||
types_mod_ident: &syn::Ident,
|
||||
@@ -70,7 +70,7 @@ pub fn generate_storage(
|
||||
}
|
||||
|
||||
fn generate_storage_entry_fns(
|
||||
metadata: &RuntimeMetadataV14,
|
||||
metadata: &RuntimeMetadataV15,
|
||||
type_gen: &TypeGenerator,
|
||||
pallet: &PalletMetadata<PortableForm>,
|
||||
storage_entry: &StorageEntryMetadata<PortableForm>,
|
||||
|
||||
Reference in New Issue
Block a user