git.delta.rocks / unique-network / refs/commits / 23062aac0eef

difftreelog

Contracts module rpc call toggle button

str-mv2020-07-10parent: #6ec64fe.patch.diff
in: master

2 files changed

modifiednode/src/chain_spec.rsdiffbeforeafterboth
--- a/node/src/chain_spec.rs
+++ b/node/src/chain_spec.rs
@@ -103,7 +103,8 @@
 fn testnet_genesis(initial_authorities: Vec<(AuraId, GrandpaId)>,
 	root_key: AccountId,
 	endowed_accounts: Vec<AccountId>,
-	_enable_println: bool) -> GenesisConfig {
+	_enable_println: bool
+	) -> GenesisConfig {
 	GenesisConfig {
 		system: Some(SystemConfig {
 			code: WASM_BINARY.to_vec(),
@@ -124,7 +125,7 @@
 		contracts: Some(ContractsConfig {
 			gas_price: 1_000,
             current_schedule: ContractsSchedule {
-                 //   enable_println,
+            		// enable_println,
                     ..Default::default()
             },
         }),
modifiednode/src/service.rsdiffbeforeafterboth
25/// be able to perform chain operations.25/// be able to perform chain operations.
26macro_rules! new_full_start {26macro_rules! new_full_start {
27 ($config:expr) => {{27 ($config:expr) => {{
28 use jsonrpc_core::IoHandler;
28 use std::sync::Arc;29 use std::sync::Arc;
29 let mut import_setup = None;30 let mut import_setup = None;
30 let inherent_data_providers = sp_inherents::InherentDataProviders::new();31 let inherent_data_providers = sp_inherents::InherentDataProviders::new();
6364
64 Ok(import_queue)65 Ok(import_queue)
65 })?;66 })?
67 .with_rpc_extensions(|builder| -> Result<IoHandler<sc_rpc::Metadata>, _> {
68 let handler = pallet_contracts_rpc::Contracts::new(builder.client().clone());
69 let delegate = pallet_contracts_rpc::ContractsApi::to_delegate(handler);
70
71 let mut io = IoHandler::default();
72 io.extend_with(delegate);
73 Ok(io)
74 })?;
6675
67 (builder, import_setup, inherent_data_providers)76 (builder, import_setup, inherent_data_providers)
68 }}77 }}