Custom RPC methods for DummyOrdered pallet (#317)

* RPC for DummyOrdered

* add test for RPC

* proof returned by RPC is Vec<<Vec<u8>>>.encode()

* retrieval -> receiving

* bp-runtime crate

* bp-runtime supports no_std

* cargo fmt --all

* jsonrpc_core::BoxFuture

* Update modules/message-lane/rpc/Cargo.toml

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update modules/message-lane/rpc/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* messageLane_ prefix for RPC methods

* Update primitives/runtime/Cargo.toml

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update primitives/runtime/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update modules/message-lane/rpc/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update modules/message-lane/rpc/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update modules/message-lane/rpc/src/lib.rs

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
Svyatoslav Nikolsky
2020-09-03 00:49:51 +03:00
committed by Bastian Köcher
parent f6d45a38da
commit c7437c7d91
6 changed files with 433 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
// This file is part of Parity Bridges Common.
// Parity Bridges Common is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Bridges Common is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
//! Primitives that may be used at (bridges) runtime level.
#![cfg_attr(not(feature = "std"), no_std)]
/// Id of deployed module instance. We have a bunch of pallets that may be used in
/// different bridges. E.g. message-lane pallet may be deployed twice in the same
/// runtime to bridge ThisChain with Chain1 and Chain2. Sometimes we need to be able
/// to identify deployed instance dynamically. This type is used for that.
pub type InstanceId = [u8; 4];