Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 040f45d

Browse files
committed
Implements json metadata in the demo runtime
1 parent 2c12c83 commit 040f45d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

demo/runtime/src/lib.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,33 @@ pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Index, Call>;
229229
pub type Executive = executive::Executive<Runtime, Block, Balances, Balances,
230230
(((((), Council), Democracy), Staking), Session)>;
231231

232+
impl_outer_config! {
233+
pub struct GenesisConfig for Runtime {
234+
ConsensusConfig => consensus,
235+
SystemConfig => system,
236+
BalancesConfig => balances,
237+
SessionConfig => session,
238+
StakingConfig => staking,
239+
DemocracyConfig => democracy,
240+
CouncilConfig => council,
241+
TimestampConfig => timestamp,
242+
}
243+
}
244+
245+
impl_json_metadata!(for Runtime with modules
246+
system::Module with Storage,
247+
balances::Module with Storage,
248+
consensus::Module with Storage,
249+
timestamp::Module with Storage,
250+
session::Module with Storage,
251+
staking::Module with Storage,
252+
democracy::Module with Storage,
253+
council::Module with Storage);
254+
232255
pub mod api {
233256
impl_stubs!(
234257
version => |()| super::VERSION,
258+
metadata => |()| super::Runtime::json_metadata(),
235259
authorities => |()| super::Consensus::authorities(),
236260
events => |()| super::System::events(),
237261
initialise_block => |header| super::Executive::initialise_block(&header),

0 commit comments

Comments
 (0)