* Add _at and _with methods to OnlineClient to allow for more instantiation options
* tweak warnings
* move a confusing comment
* expose ability to set metadata and such in OnlineClient, but remove most _at methods
* ci: Print substrate version
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Move substrate version to dedicated CI step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "ci: Move substrate version to dedicated CI step"
This reverts commit b83de672d5bd3c2f09b02a598d63fd88a38fd9ab.
* ci: Add version for all steps that download substrate
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Make dependabot less aggressive
And ignore sp- crates, since they need to be updated together, and dependabot can't yet do grouped PRs.
We should periodically just keep on top of this anyway, but I don't think we need to be constantly updating them.
* dependency-name
* Try weekly instead of monthly
* begin porting over traits; remove Config use of Hash
* port over the Header bits that we need
* sp_core_hashing where possible, move Verify to PairSigner, remove unused errors
* tidy up Config things and move related bits into one place
* fix codegen
* copy Era over
* move AccountId, Address, Signer to Signer trait and a pass over fixing examples
* impl MultiAddress, MultiSignature, AccountId32 and add back to Config (for decoding later)
* Copy over StorageKey, StorageData, StorageChangeSet
* subxt core compiling with no sp_core or sp_runtime
* Get examples compiling
* pass over fixing tests
* cargo fmt
* clippy tweaks and update polkadot.rs
* fix codegen docs
* port over special DigestItem encoding/decoding
* clippy and doc fixes
* cargo fmt and example fix
* more cargo fmt-ing...
* substrate-extra to substrate-compat
* cargo.toml comments
* simplify PairSigner trait bounds
* move RPC types to a separate file
* fix docs
* Add some tests for things and other PR feedback
* bump to latest sp deps
* avoid needing substrate-compat feature in a test
* 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>