Example: How to connect to parachain (#1043)

* parachain rpc lists

* guide almost done

* add the 3rd config

* subscribe to block with configs

* delete table file

* spaces instead of tabs

* remove original ajuna example

* zombienet setup

* nft minting example

* include port, use different names

* link the example from the book

* format book

* add config creation to book, simplify example structure

* fix the nft creation script

* fix doc ref

* fixing links to foreign crates

* fix table formatting

* include nits

* move more docs to book, and simplify parachain-example

* another pass over docs and link to exampels from guide

* nit: adjust comment to numbers

* teeny README fix for parachain-example

* fix command in readme

* add CI for examples and fix parachain-example bug I left in

* add target arch

* cargo fmt

* make CI not fail

* remove index from docs

---------

Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
Tadeo Hepperle
2023-07-21 13:55:48 +02:00
committed by GitHub
parent fd8f60c8a9
commit 8b23b2b83c
19 changed files with 6123 additions and 77 deletions
+4 -2
View File
@@ -468,7 +468,7 @@ mod jsonrpsee_helpers {
}
// helpers for a jsonrpsee specific OnlineClient.
#[cfg(all(feature = "jsonrpsee", feature = "web"))]
#[cfg(all(feature = "jsonrpsee", feature = "web", target_arch = "wasm32"))]
mod jsonrpsee_helpers {
pub use jsonrpsee::{
client_transport::web,
@@ -480,7 +480,9 @@ mod jsonrpsee_helpers {
/// Build web RPC client from URL
pub async fn client(url: &str) -> Result<Client, Error> {
let (sender, receiver) = web::connect(url).await.unwrap();
let (sender, receiver) = web::connect(url)
.await
.map_err(|e| Error::Transport(e.into()))?;
Ok(ClientBuilder::default()
.max_notifs_per_subscription(4096)
.build_with_wasm(sender, receiver))