mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +00:00
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:
@@ -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"
|
||||
@@ -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 {
|
||||
Reference in New Issue
Block a user