Crates.io | tangle-subxt |
lib.rs | tangle-subxt |
version | 0.5.0 |
source | src |
created_at | 2024-08-12 13:05:27.487338 |
updated_at | 2024-11-04 19:04:22.373338 |
description | Rust bindings and interface to interact with Tangle Network using subxt |
homepage | https://webb.tools |
repository | https://github.com/webb-tools/tangle |
max_upload_size | |
id | 1334446 |
size | 4,965,587 |
Rust interface to interact with tangle node via RPC
Use the subxt-cli
tool to download the metadata for your target runtime from a node.
cargo install subxt-cli@0.37.0 --force
tangle
:
Run the release build of the tangle
node, then on another terminal run:subxt metadata -f bytes > ./metadata/tangle-testnet-runtime.scale
subxt codegen --file metadata/tangle-testnet-runtime.scale \
--crate "::subxt_core" \
--derive Clone \
--derive Eq \
--derive PartialEq \
--attributes-for-type tangle_primitives::services::field::Field='#[codec(dumb_trait_bound)]' \
--derive-for-type tangle_primitives::services::ServiceBlueprint=serde::Serialize,recursive\
--derive-for-type tangle_primitives::services::ServiceBlueprint=serde::Deserialize,recursive | rustfmt --edition=2021 --emit=stdout > src/tangle_testnet_runtime.rs
You can run following tests to trigger Job pallet events for local development.
./scripts/run-standalone-local.sh --clean
cargo test test_job_submission_event