Skip to content

Commit

Permalink
Release 2.1.0 (#285)
Browse files Browse the repository at this point in the history
* Bump to polkadot-0.9.24

* Rpc fix (#284)

* ADD: extrinsic rpc
* ADD: reqresp rpc
* ADD: publish rpc

Co-authored-by: Aleksandr Krupenkin <[email protected]>

* Update Cargo.lock

* Bump version

* Fix XCM native currency on alpha runtime

* Fix formatting

Co-authored-by: Denis K <[email protected]>
  • Loading branch information
akru and dkuanyshbaev authored Jun 21, 2022
1 parent 17b47a4 commit 0a4e5a6
Show file tree
Hide file tree
Showing 35 changed files with 2,229 additions and 1,255 deletions.
2,322 changes: 1,676 additions & 646 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "robonomics-node"
version = "2.0.0"
version = "2.1.0"
authors = ["Airalab <[email protected]>"]
description = "Robonomics node implementation in Rust & Substrate."
edition = "2021"
Expand Down
32 changes: 16 additions & 16 deletions bin/node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "robonomics-rpc"
version = "2.0.0"
version = "2.1.0"
authors = ["Airalab <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -13,20 +13,20 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0" }
jsonrpsee = { version = "0.13.0", features = ["server"] }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.23" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
local-runtime = { path = "../../../runtime/local" }
robonomics-primitives = { path = "../../../primitives" }
#robonomics-protocol = { path = "../../../protocol" }
robonomics-protocol = { path = "../../../protocol" }
31 changes: 13 additions & 18 deletions bin/node/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
//! are part of it. Therefore all node-runtime-specific RPCs can
//! be placed here or imported from corresponding FRAME RPC definitions.

#![warn(missing_docs)]

use std::sync::Arc;

use robonomics_primitives::{AccountId, Balance, Block, Index};
/*
use robonomics_protocol::extrinsic::extrinsicapi::{ExtrinsicApi, ExtrinsicT};
use robonomics_protocol::pubsub::pubsubapi::{PubSubApi, PubSubT};
use robonomics_protocol::pubsub::Gossipsub;
use robonomics_protocol::reqres::reqresapi::{ReqRespApi, ReqRespT};
*/
use robonomics_protocol::{
extrinsic::extrinsicrpc::{ExtrinsicRpc, ExtrinsicRpcServer},
pubsub::{
pubsubrpc::{PubSubRpc, PubSubRpcServer},
Gossipsub,
},
reqres::reqresrpc::{ReqRespRpc, ReqRespRpcServer},
};

use jsonrpsee::RpcModule;
use sc_client_api::AuxStore;
Expand All @@ -57,7 +57,7 @@ pub struct FullDeps<C, P> {
/// Whether to deny unsafe calls.
pub deny_unsafe: DenyUnsafe,
// PubSub worker.
//pub pubsub: Arc<Gossipsub>,
pub pubsub: Arc<Gossipsub>,
}

/// Instantiate all Full RPC extensions.
Expand Down Expand Up @@ -85,19 +85,14 @@ where
client,
pool,
deny_unsafe,
//pubsub,
pubsub,
} = deps;

io.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;
io.merge(TransactionPayment::new(client.clone()).into_rpc())?;

/*
io.extend_with(PubSubApi::to_delegate(PubSubApi::new(pubsub)));
io.extend_with(ReqRespApi::to_delegate(ReqRespApi {}));
io.extend_with(ExtrinsicApi::to_delegate(ExtrinsicApi::new(client.clone())));
*/
io.merge(PubSubRpc::new(pubsub).into_rpc())?;
io.merge(ExtrinsicRpc::new(client.clone()).into_rpc())?;
io.merge(ReqRespRpc::new().into_rpc())?;

Ok(io)
}
Loading

0 comments on commit 0a4e5a6

Please sign in to comment.