* rpc: Extend `RpcClientT` to return the subscription ID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc: Return `RpcSubscriptionId` for jsonrpsee clients
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc: Expose subscription ID via subxt subscription
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Adjust example to return subscription ID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc: Add structure for subscription stream and subscription id
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Removed in Rust 1.66:
```
warning: lint `const_err` has been removed: converted into hard error, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> for more information
--> subxt/src/lib.rs:114:5
|
114 | const_err,
| ^^^^^^^^^
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
```
* subxt/rpc: Fetch metadata at arbitrary blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt/events: Fetch metadata for events at arbitrary blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "subxt/events: Fetch metadata for events at arbitrary blocks"
This reverts commit 381409b7a8916611d7c44dc6ad58a90993b6c297.
* subxt/events: Custom constructor with metadata for events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update subxt/src/events/events_type.rs
Co-authored-by: James Wilson <james@jsdw.me>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
* refactor: Simplify collecting type substitutes
* Simplify ItemMod::from
* Preserve inner Rust items when expanding the subxt::subxt macro
* No named lifetimes
* Update codegen/src/api/mod.rs
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Move passing UI tests under `ui_tests`
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Patch all substrate deps to use my substrate branch
* default-features = false causing issus in test-runtime
* Use substrate polkadot release branch
* Use default-features for sp-runtime again :(
* Restore default-features for subxt-cli/sp-core
* Fix module error integration test
* Add Send + Sync bounds to ExtrinsicEvents::iter()
* Elide lifetime
* Revert adding Send + Sync
* Add Sync bound to Rpc::ClientError
* Remove version in subxt-metadata
* Use released crates
* Use released sp-keyring
* Fix sp-keyring deps
* Remove unnecessary sp-keyring default-features = false
* First pass adding functions to get blocks and extrinsics
* cargo fmt and cache block events
* prefix block hash with 0x
* pin streams for better ergonomics and add an example of subscribing to blocks
* remove unused var
* standardise on _all, _best and _finalized for different block header subs
* WIP center subscribing around blocks
* Remove the event filtering/subscribing stuff
* clippy
* we need tokio, silly clippy
* add extrinsic_index() call
* Update subxt/src/blocks/block_types.rs
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Add dynbamic nested query example and make dynamic::tx a little easier to work with
* calL_value -> inner_tx
* rename example to dynamic_multisig to align with #713 naming
* align dynamic and static multisig examples
* Fix comment typo
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* get started
* make it work again
* make it compile again
* Use async-wasm-feature of jsonrpsee from the master branch
* Ensure we enable JS feature of getrandom for the wasm target
* Update subxt/src/lib.rs
* update jsonrpsee
* fix CI
* cargo fmt
* fix wasm test
* fix grumbles
* exclude wasm-tests from workspace
To avoid leaking `jsonrpsee-web` feature into the workspace
Co-authored-by: Igor Matuszewski <xanewok@gmail.com>
* First pass adding functions to get blocks and extrinsics
* cargo fmt and cache block events
* prefix block hash with 0x
* pin streams for better ergonomics and add an example of subscribing to blocks
* remove unused var
* standardise on _all, _best and _finalized for different block header subs
* WIP center subscribing around blocks
* Remove the event filtering/subscribing stuff
* clippy
* we need tokio, silly clippy
* add extrinsic_index() call
* Update subxt/src/blocks/block_types.rs
Co-authored-by: Andrew Jones <ascjones@gmail.com>
Co-authored-by: Andrew Jones <ascjones@gmail.com>
* Allow metadata to be pulled directly from a node with runtime_metadata_url
* Update docs
* https too, and abstract out block_on fn
* tweak a comment in the example
* rpc: Fill in any missing finalized blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Move fill blocks test to RPC location
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* events: Remove the fill in strategy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Introduce blocks client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* client: Enable the block API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Simplify `subscribe_finalized_headers` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Add tests for `subscribe_finalized_headers`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Implement `subscribe_headers`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Add tests for `subscribe_headers`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Move `missing_block_headers_will_be_filled_in` to blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* events: Use the new subscribe to blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Change API to return future similar to events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* events: Use blocks API for subscribing to blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update subxt/src/blocks/blocks_client.rs
Co-authored-by: James Wilson <james@jsdw.me>
* blocks: Simplify docs for `subscribe_finalized_headers`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Use `PhantomDataSendSync` to avoid other bounds on `T: Config`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Add docs for best blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* blocks: Avoid one clone for the `client.rpc()`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update testing/integration-tests/src/blocks/mod.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* blocks: Improve `subscribe_headers` doc
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* Add failing test for compact generic parameter
* WIP refactor type generation
* Fmt
* Remove deprecated rustfmt optionns
* Remove license template path
* Update parent type parameter visitor
* Introduce different methods for generating a type path for a field
* Add comment
* Fix weights refs
* Add extra compact test cases
* Fmt