Fix codegen validation when Runtime APIs are stripped (#1000)

* modify code gen

* cargo fmt

* fix return

* move the runtime_apis static

* small layout change

* tidy up metadata UI testing and test validation function too

* fix validation tests to point to metadata

* update codegen

* fix clippy and tests

* tweak a comment

* rename validate_codegen => is_codegen_valid_for

---------

Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
Tadeo Hepperle
2023-06-09 11:10:48 +02:00
committed by GitHub
parent e711dc1582
commit 992ec9ab9b
9 changed files with 323 additions and 212 deletions
-2
View File
@@ -4,7 +4,6 @@
pub mod dispatch_error;
mod metadata_test_runner;
mod pallet_metadata_test_runner;
use frame_metadata::{
v15::{
@@ -16,7 +15,6 @@ use frame_metadata::{
use scale_info::{meta_type, IntoPortable, TypeInfo};
pub use metadata_test_runner::MetadataTestRunner;
pub use pallet_metadata_test_runner::PalletMetadataTestRunner;
/// Given some pallet metadata, generate a [`RuntimeMetadataPrefixed`] struct.
/// We default to a useless extrinsic type, and register a fake `DispatchError`