mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 14:01:06 +00:00
Implements json_metadata RPC call (#692)
* Adds `impl_json_metadata!` for generating all metadata of a runtime * Adds `json_metadata` RPC call * Adds simple test for the `json_metadata` RPC call * Implements json metadata in the demo runtime * Fix indent * Adds missing copyright headers * Dispatch json metadata renamings and improvements * Replaces `format!` & `String` with `Vec<JSONMetadata` * Implements `Encode` and `Decode` for JSONMetadata * Make `impl_json_metadata!` compileable on `no_std` * Adapt the client to decode the correct type for `json_metadata` * Fixes compile error and warning * Whitespace
This commit is contained in:
@@ -270,9 +270,22 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Index, Call>;
|
||||
pub type Executive = executive::Executive<Runtime, Block, Balances, Balances,
|
||||
(((((((), Treasury), Council), Democracy), Staking), Session), Timestamp)>;
|
||||
|
||||
impl_json_metadata!(
|
||||
for Runtime with modules
|
||||
system::Module with Storage,
|
||||
balances::Module with Storage,
|
||||
consensus::Module with Storage,
|
||||
timestamp::Module with Storage,
|
||||
session::Module with Storage,
|
||||
staking::Module with Storage,
|
||||
democracy::Module with Storage,
|
||||
council::Module with Storage
|
||||
);
|
||||
|
||||
pub mod api {
|
||||
impl_stubs!(
|
||||
version => |()| super::VERSION,
|
||||
json_metadata => |()| super::Runtime::json_metadata(),
|
||||
authorities => |()| super::Consensus::authorities(),
|
||||
initialise_block => |header| super::Executive::initialise_block(&header),
|
||||
apply_extrinsic => |extrinsic| super::Executive::apply_extrinsic(extrinsic),
|
||||
|
||||
Reference in New Issue
Block a user