Move Subxt crate into a subfolder (#424)

* move into subfolder step 1

* Make folders a workspace again

* Move examples into their own workspace crate to make them more visible and easier to run

* clippy fix

* newline

* tweak releasing steps for folder move

* reference exampels more clearly in top level readme
This commit is contained in:
James Wilson
2022-02-02 12:15:44 +00:00
committed by GitHub
parent 171f4ec268
commit 55f04c20a7
44 changed files with 94 additions and 62 deletions
+21
View File
@@ -0,0 +1,21 @@
[package]
name = "subxt-examples"
version = "0.16.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
license = "GPL-3.0"
repository = "https://github.com/paritytech/subxt"
documentation = "https://docs.rs/subxt"
homepage = "https://www.parity.io/"
description = "Subxt example usage"
[dev-dependencies]
subxt = { path = "../subxt" }
async-std = { version = "1.9.0", features = ["attributes", "tokio1"] }
sp-keyring = "4.0.0"
env_logger = "0.9.0"
futures = "0.3.13"
codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive", "full", "bit-vec"] }
hex = "0.4.3"
+3
View File
@@ -0,0 +1,3 @@
# Subxt Examples
Take a look in the [examples](./examples) subfolder for various `subxt` usage examples.
@@ -58,7 +58,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.await?;
let raw = sub.next().await.unwrap().unwrap();
let event = <polkadot::balances::events::Transfer as codec::Decode>::decode(
let event = <polkadot::balances::events::Transfer as subxt::codec::Decode>::decode(
&mut &raw.data[..],
);
if let Ok(e) = event {