Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to rc6. #155

Merged
merged 2 commits into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ thiserror = "1.0.20"
futures = "0.3.5"
jsonrpsee = { version = "0.1.0", features = ["ws"] }
num-traits = { version = "0.2.12", default-features = false }
serde = { version = "1.0.114", features = ["derive"] }
serde_json = "1.0.56"
serde = { version = "1.0.115", features = ["derive"] }
serde_json = "1.0.57"
url = "2.1.1"
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive", "full"] }

frame-metadata = { version = "11.0.0-rc5", package = "frame-metadata" }
frame-support = { version = "2.0.0-rc5", package = "frame-support" }
sp-runtime = { version = "2.0.0-rc5", package = "sp-runtime" }
sp-version = { version = "2.0.0-rc5", package = "sp-version" }
pallet-indices = { version = "2.0.0-rc5", package = "pallet-indices" }
frame-metadata = { version = "11.0.0-rc6", package = "frame-metadata" }
frame-support = { version = "2.0.0-rc6", package = "frame-support" }
sp-runtime = { version = "2.0.0-rc6", package = "sp-runtime" }
sp-version = { version = "2.0.0-rc6", package = "sp-version" }
pallet-indices = { version = "2.0.0-rc6", package = "pallet-indices" }
hex = "0.4.2"
sp-rpc = { version = "2.0.0-rc5", package = "sp-rpc" }
sp-core = { version = "2.0.0-rc5", package = "sp-core" }
sc-rpc-api = { version = "0.8.0-rc5", package = "sc-rpc-api" }
sp-transaction-pool = { version = "2.0.0-rc5", package = "sp-transaction-pool" }
sp-rpc = { version = "2.0.0-rc6", package = "sp-rpc" }
sp-core = { version = "2.0.0-rc6", package = "sp-core" }
sc-rpc-api = { version = "0.8.0-rc6", package = "sc-rpc-api" }
sp-transaction-pool = { version = "2.0.0-rc6", package = "sp-transaction-pool" }
substrate-subxt-client = { version = "0.3.0", path = "client", optional = true }
substrate-subxt-proc-macro = { version = "0.11.0", path = "proc-macro" }

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
async-std = { version = "1.6.3", features = ["attributes"] }
env_logger = "0.7.1"
frame-system = { version = "2.0.0-rc5", package = "frame-system" }
pallet-balances = { version = "2.0.0-rc5", package = "pallet-balances" }
sp-keyring = { version = "2.0.0-rc5", package = "sp-keyring" }
frame-system = { version = "2.0.0-rc6", package = "frame-system" }
pallet-balances = { version = "2.0.0-rc6", package = "pallet-balances" }
sp-keyring = { version = "2.0.0-rc6", package = "sp-keyring" }
substrate-subxt-client = { version = "0.3.0", path = "client" }
tempdir = "0.3.7"
test-node = { path = "test-node" }
Expand Down
12 changes: 6 additions & 6 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ description = "Embed a substrate node into your subxt application."
keywords = ["parity", "substrate", "blockchain"]

[dependencies]
async-std = "1.6.2"
async-std = "1.6.3"
futures = { version = "0.3.5", features = ["compat"] }
futures01 = { package = "futures", version = "0.1.29" }
jsonrpsee = "0.1.0"
log = "0.4.11"
sc-network = { version = "0.8.0-rc5", default-features = false }
sc-service = { version = "0.8.0-rc5", default-features = false }
serde_json = "1.0.56"
sp-keyring = "2.0.0-rc5"
sc-network = { version = "0.8.0-rc6", default-features = false }
sc-service = { version = "0.8.0-rc6", default-features = false }
serde_json = "1.0.57"
sp-keyring = "2.0.0-rc6"
thiserror = "1.0.20"

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
async-std = { version = "1.6.3", features = ["attributes"] }
env_logger = "0.7.1"
substrate-subxt = { path = ".." }
tempdir = "0.3.7"
Expand Down
14 changes: 5 additions & 9 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ use sc_service::{
use std::{
future::Future,
pin::Pin,
sync::Arc,
};
use thiserror::Error;

Expand All @@ -87,17 +86,16 @@ pub struct SubxtClient {

impl SubxtClient {
/// Create a new client.
pub fn new(mut task_manager: TaskManager, rpc: Arc<RpcHandlers>) -> Self {
pub fn new(mut task_manager: TaskManager, rpc: RpcHandlers) -> Self {
let (to_back, from_front) = mpsc::channel(4);
let (to_front, from_back) = mpsc01::channel(4);

let session = RpcSession::new(to_front.clone());
let session2 = session.clone();
task::spawn(
select(
Box::pin(from_front.for_each(move |message: String| {
let rpc = rpc.clone();
let session = session2.clone();
let session = session.clone();
let mut to_front = to_front.clone().sink_compat();
async move {
let response = rpc.rpc_query(&session, &message).await;
Expand All @@ -122,11 +120,9 @@ impl SubxtClient {
/// Creates a new client from a config.
pub fn from_config<C: ChainSpec + 'static>(
config: SubxtClientConfig<C>,
builder: impl Fn(
Configuration,
) -> Result<(TaskManager, Arc<RpcHandlers>), ServiceError>,
builder: impl Fn(Configuration) -> Result<(TaskManager, RpcHandlers), ServiceError>,
) -> Result<Self, ServiceError> {
let config = config.to_service_config();
let config = config.into_service_config();
let (task_manager, rpc_handlers) = (builder)(config)?;
Ok(Self::new(task_manager, rpc_handlers))
}
Expand Down Expand Up @@ -224,7 +220,7 @@ pub struct SubxtClientConfig<C: ChainSpec + 'static> {

impl<C: ChainSpec + 'static> SubxtClientConfig<C> {
/// Creates a service configuration.
pub fn to_service_config(self) -> Configuration {
pub fn into_service_config(self) -> Configuration {
let mut network = NetworkConfiguration::new(
format!("{} (subxt client)", self.chain_spec.name()),
"unknown",
Expand Down
10 changes: 5 additions & 5 deletions proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ proc-macro = true
heck = "0.3.1"
proc-macro2 = "1.0.19"
proc-macro-crate = "0.1.5"
proc-macro-error = "1.0.3"
proc-macro-error = "1.0.4"
quote = "1.0.7"
syn = "1.0.35"
syn = "1.0.38"
synstructure = "0.12.4"

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
async-std = { version = "1.6.3", features = ["attributes"] }
codec = { package = "parity-scale-codec", version = "1.3.4", features = ["derive"] }
env_logger = "0.7.1"
pretty_assertions = "0.6.1"
sp-keyring = "2.0.0-rc5"
sp-keyring = "2.0.0-rc6"
substrate-subxt = { path = ".." }
trybuild = "1.0.30"
trybuild = "1.0.32"

[[test]]
name = "balances"
Expand Down
42 changes: 21 additions & 21 deletions test-node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "test-node"
version = "2.0.0-rc5"
version = "2.0.0"
authors = ["Anonymous"]
description = "Substrate Node template"
edition = "2018"
Expand All @@ -15,28 +15,28 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
futures = "0.3.5"
log = "0.4.11"
structopt = "0.3.15"
structopt = "0.3.16"
parking_lot = "0.11.0"

sc-cli = { version = "0.8.0-rc5", features = ["wasmtime"] }
sp-core = "2.0.0-rc5"
sc-executor = { version = "0.8.0-rc5", features = ["wasmtime"] }
sc-service = { version = "0.8.0-rc5", features = ["wasmtime"] }
sp-inherents = "2.0.0-rc5"
sc-transaction-pool = "2.0.0-rc5"
sp-transaction-pool = "2.0.0-rc5"
sc-network = "0.8.0-rc5"
sc-consensus-aura = "0.8.0-rc5"
sp-consensus-aura = "0.8.0-rc5"
sp-consensus = "0.8.0-rc5"
sc-consensus = "0.8.0-rc5"
sc-finality-grandpa = "0.8.0-rc5"
sp-finality-grandpa = "2.0.0-rc5"
sc-client-api = "2.0.0-rc5"
sp-runtime = "2.0.0-rc5"
sc-basic-authorship = "0.8.0-rc5"
sc-cli = { version = "0.8.0-rc6", features = ["wasmtime"] }
sp-core = "2.0.0-rc6"
sc-executor = { version = "0.8.0-rc6", features = ["wasmtime"] }
sc-service = { version = "0.8.0-rc6", features = ["wasmtime"] }
sp-inherents = "2.0.0-rc6"
sc-transaction-pool = "2.0.0-rc6"
sp-transaction-pool = "2.0.0-rc6"
sc-network = "0.8.0-rc6"
sc-consensus-aura = "0.8.0-rc6"
sp-consensus-aura = "0.8.0-rc6"
sp-consensus = "0.8.0-rc6"
sc-consensus = "0.8.0-rc6"
sc-finality-grandpa = "0.8.0-rc6"
sp-finality-grandpa = "2.0.0-rc6"
sc-client-api = "2.0.0-rc6"
sp-runtime = "2.0.0-rc6"
sc-basic-authorship = "0.8.0-rc6"

test-node-runtime = { version = "2.0.0-rc5", path = "runtime" }
test-node-runtime = { path = "runtime" }

[build-dependencies]
substrate-build-script-utils = "2.0.0-rc5"
substrate-build-script-utils = "2.0.0-rc6"
66 changes: 33 additions & 33 deletions test-node/runtime/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "test-node-runtime"
version = "2.0.0-rc5"
version = "2.0.0"
authors = ["Anonymous"]
edition = "2018"
license = "Unlicense"
Expand All @@ -13,43 +13,47 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false, features = ["derive"] }

aura = { version = "2.0.0-rc5", default-features = false, package = "pallet-aura" }
balances = { version = "2.0.0-rc5", default-features = false, package = "pallet-balances" }
frame-support = { version = "2.0.0-rc5", default-features = false }
grandpa = { version = "2.0.0-rc5", default-features = false, package = "pallet-grandpa" }
randomness-collective-flip = { version = "2.0.0-rc5", default-features = false, package = "pallet-randomness-collective-flip" }
sudo = { version = "2.0.0-rc5", default-features = false, package = "pallet-sudo" }
system = { version = "2.0.0-rc5", default-features = false, package = "frame-system" }
timestamp = { version = "2.0.0-rc5", default-features = false, package = "pallet-timestamp" }
transaction-payment = { version = "2.0.0-rc5", default-features = false, package = "pallet-transaction-payment" }
frame-executive = { version = "2.0.0-rc5", default-features = false }
serde = { version = "1.0.114", optional = true, features = ["derive"] }
sp-api = { version = "2.0.0-rc5", default-features = false }
sp-block-builder = { version = "2.0.0-rc5", default-features = false }
sp-consensus-aura = { version = "0.8.0-rc5", default-features = false }
sp-core = { version = "2.0.0-rc5", default-features = false }
sp-inherents = { version = "2.0.0-rc5", default-features = false }
sp-io = { version = "2.0.0-rc5", default-features = false }
sp-offchain = { version = "2.0.0-rc5", default-features = false }
sp-runtime = { version = "2.0.0-rc5", default-features = false }
sp-session = { version = "2.0.0-rc5", default-features = false }
sp-std = { version = "2.0.0-rc5", default-features = false }
sp-transaction-pool = { version = "2.0.0-rc5", default-features = false }
sp-version = { version = "2.0.0-rc5", default-features = false }
frame-executive = { version = "2.0.0-rc6", default-features = false }
frame-support = { version = "2.0.0-rc6", default-features = false }
frame-system = { version = "2.0.0-rc6", default-features = false }
pallet-aura = { version = "2.0.0-rc6", default-features = false }
pallet-balances = { version = "2.0.0-rc6", default-features = false }
pallet-grandpa = { version = "2.0.0-rc6", default-features = false }
pallet-randomness-collective-flip = { version = "2.0.0-rc6", default-features = false }
pallet-sudo = { version = "2.0.0-rc6", default-features = false }
pallet-timestamp = { version = "2.0.0-rc6", default-features = false }
pallet-transaction-payment = { version = "2.0.0-rc6", default-features = false }
serde = { version = "1.0.115", optional = true, features = ["derive"] }
sp-api = { version = "2.0.0-rc6", default-features = false }
sp-block-builder = { version = "2.0.0-rc6", default-features = false }
sp-consensus-aura = { version = "0.8.0-rc6", default-features = false }
sp-core = { version = "2.0.0-rc6", default-features = false }
sp-inherents = { version = "2.0.0-rc6", default-features = false }
sp-io = { version = "2.0.0-rc6", default-features = false }
sp-offchain = { version = "2.0.0-rc6", default-features = false }
sp-runtime = { version = "2.0.0-rc6", default-features = false }
sp-session = { version = "2.0.0-rc6", default-features = false }
sp-std = { version = "2.0.0-rc6", default-features = false }
sp-transaction-pool = { version = "2.0.0-rc6", default-features = false }
sp-version = { version = "2.0.0-rc6", default-features = false }

[build-dependencies]
wasm-builder-runner = { version = "1.0.5", package = "substrate-wasm-builder-runner" }
substrate-wasm-builder-runner = "1.0.6"

[features]
default = ["std"]
std = [
"aura/std",
"balances/std",
"codec/std",
"frame-executive/std",
"frame-support/std",
"grandpa/std",
"randomness-collective-flip/std",
"frame-system/std",
"pallet-aura/std",
"pallet-balances/std",
"pallet-grandpa/std",
"pallet-randomness-collective-flip/std",
"pallet-sudo/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
"serde",
"sp-api/std",
"sp-block-builder/std",
Expand All @@ -63,8 +67,4 @@ std = [
"sp-std/std",
"sp-transaction-pool/std",
"sp-version/std",
"sudo/std",
"system/std",
"timestamp/std",
"transaction-payment/std",
]
2 changes: 1 addition & 1 deletion test-node/runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with substrate-subxt. If not, see <http://www.gnu.org/licenses/>.

use wasm_builder_runner::WasmBuilder;
use substrate_wasm_builder_runner::WasmBuilder;

fn main() {
WasmBuilder::new()
Expand Down
Loading