Alexandru Vasile
ef89752904
light-client: Add experimental light-client support ( #965 )
...
* rpc/types: Decode `SubstrateTxStatus` for substrate and smoldot
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* lightclient: Add light client Error
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* lightclient: Add background task to manage RPC responses
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* lightclient: Implement the light client RPC in subxt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt: Expose light client under experimental feature-flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* artifacts: Add development chain spec for local nodes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update cargo lock
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Add light client example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update sp-* crates and smoldot to use git with branch / rev
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Apply cargo fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Import hashmap entry
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* lightclient: Fetch spec only if jsonrpsee feature is enabled
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update subxt/src/rpc/lightclient/background.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* Fix typo
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* artifacts: Update dev chain spec
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* types: Handle storage replies from chainHead_storage
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* artifacts: Add polkadot spec
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* lightclient: Handle RPC error responses
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Tx basic with light client for local nodes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* example: Light client coprehensive example for live chains
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Remove prior light client example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* feature: Rename experimental to unstable
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* book: Add light client section
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* testing: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* lightclient: Ignore validated events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust tests for light-clients and normal clients
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* testing: Keep lightclient variant
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Remove support for chainHead_storage for light client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update light client to point to crates.io
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update sp-crates from crates.io
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Replace Atomic with u64
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Add LightClientBuilder
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust chainspec with provided bootnodes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Add potential_relay_chains to light client builder
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Move the light-client to the background task
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust tracing logs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update book and example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Apply cargo fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Remove dev_spec.json artifact
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Examples fix duplicate Cargo.toml
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Use tracing_subscriber crate
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Fix clippy for different features
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Add comment about bootNodes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Add comment about tracing-sub dependency
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Run integration-tests with light-client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Feature guard some incompatible tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* ci: Enable light-client tests under feature flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* ci: Fix git step name
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust flags for testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust warnings
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Rename feature flag jsonrpsee-ws to jsonrpsee
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Fix cargo check
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* ci: Run tests on just 2 threads
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Move light-client to subxt/src/client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust LightClientBuilder
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Use ws_url to construct light client for testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Refactor background
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Address feedback
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Remove polkadot.spec and trim sub_id
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Wait for substrate to produce block before connecting light client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust builder and tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Apply fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* ci: Use release for light client testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Add single test for light-client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Wait for more blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Use polkadot endpoint for testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust cargo check
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Remove light client chain connection example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust cargo.toml section for the old example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust background task to use usize for subscription Id
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Build bootnodes with serde_json::Value directly
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Make channel between subxt user and subxt background unbounded
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update subxt/src/client/lightclient/builder.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* Switch to smoldot 0.6.0 from 0.5.0
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Move testing to `full_client` and `light_client` higher modules
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Remove subscriptionID type
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Remove subxt/integration-testing feature flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust wait_for_blocks documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust utils import for testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Remove into_iter from builder construction
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-06-26 12:10:57 +03:00
Tadeo Hepperle
8413c4d2dd
[Bugfix] Invalid generation of types with >1 generic parameters ( #1023 )
...
* add original name match
* add unit test for generic params
2023-06-23 15:14:46 +02:00
Alexandru Vasile
95c9bce531
Fix jsonrpsee web features ( #1025 )
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-06-23 15:27:39 +03:00
Tadeo Hepperle
2a990edaca
Metadata difference command ( #1015 )
...
* diffing pallets and runtime apis
* print diff
* clippy fix and format
* change formatting
* fmt
* diff working with storage details
* fix diff
* cargo fmt
* remove printing of node
* change strings
* handle parsing differently
* clippy fix
* cargo fmt
* more abstraction
* clippy fix and fmt
* add unit test and ordering
* fix small issue
2023-06-21 14:33:21 +02:00
James Wilson
b4eb406ee5
Add subxt_signer crate for native & WASM compatible signing ( #1016 )
...
* Add and use subxt-signer crate for WASM compatible signing
* cargo fmt
* dev keypairs already references
* WIP fix various breakages
* re-jig features to be simpler and various test fixes etc
* doc and web fix
* fix various bits and pieces
* fix a test I broke
* dev-deps can't be linked to in docs, hrmph
* cargo fmt
* another doc link
* document the subxt_signer crate more thoroughly
* move feature flag for consistency
* more docs, no default subxt feature flag on signer, update release instrs
* Add missing license header
* unwrap_inner => into_inner
* extend a test a little to better check derive junctions
* note more clearly that the crypto bits come from sp_core::crypto
2023-06-20 11:32:12 +01:00
dependabot[bot]
d091c091ae
Bump Swatinem/rust-cache from 2.4.0 to 2.5.0 ( #1020 )
...
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache ) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/Swatinem/rust-cache/releases )
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Swatinem/rust-cache/compare/988c164c3d0e93c4dbab36aaf5bbeb77425b2894...2656b87321093db1cb55fbd73183d195214fdfd1 )
---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 10:54:19 +01:00
dependabot[bot]
02c5978f44
Bump serde_json from 1.0.96 to 1.0.97 ( #1021 )
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.96 to 1.0.97.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.96...v1.0.97 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 11:16:16 +02:00
dependabot[bot]
e8c113119a
Bump clap from 4.3.3 to 4.3.4 ( #1022 )
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.3.3...v4.3.4 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 11:15:51 +02:00
Alexandru Vasile
d383470993
cli: Write output to file ( #1018 )
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-06-16 18:24:26 +03:00
clearloop
f8b1b2bf94
chore(subxt): make payload details public ( #1014 )
2023-06-15 11:20:39 +01:00
Tadeo Hepperle
b403401753
remove parens ( #1017 )
2023-06-15 12:19:55 +02:00
Tadeo Hepperle
3cfe91e3be
Cli tool tests ( #977 )
...
* add tests and fix some minor things
* implement output writer and some tests
* formatting
* adjust tests and formatting
* clippy fix
* cargo fmt
* revert change in substrate runner
* clippy suggestions
* mode make_type to test mod
2023-06-14 10:52:31 +02:00
clearloop
a62d6a400e
feat(codegen): support NonZero numbers ( #1012 )
2023-06-12 14:41:27 +01:00
dependabot[bot]
00f10beb7b
Bump getrandom from 0.2.9 to 0.2.10 ( #1006 )
...
Bumps [getrandom](https://github.com/rust-random/getrandom ) from 0.2.9 to 0.2.10.
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.9...v0.2.10 )
---
updated-dependencies:
- dependency-name: getrandom
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 13:56:28 +01:00
dependabot[bot]
f1e491d02c
Bump regex from 1.8.3 to 1.8.4 ( #1007 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.8.3...1.8.4 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 13:56:17 +01:00
dependabot[bot]
f16a5a635b
Bump serde from 1.0.163 to 1.0.164 ( #1008 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.163 to 1.0.164.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 13:55:42 +01:00
dependabot[bot]
58b4d6b555
Bump clap from 4.3.1 to 4.3.3 ( #1009 )
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.3.1 to 4.3.3.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.3.1...v4.3.3 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 13:55:30 +01:00
dependabot[bot]
e9d6da5f5f
Bump proc-macro2 from 1.0.59 to 1.0.60 ( #1005 )
...
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2 ) from 1.0.59 to 1.0.60.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.59...1.0.60 )
---
updated-dependencies:
- dependency-name: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 13:55:16 +01:00
Tadeo Hepperle
992ec9ab9b
Fix codegen validation when Runtime APIs are stripped ( #1000 )
...
* modify code gen
* cargo fmt
* fix return
* move the runtime_apis static
* small layout change
* tidy up metadata UI testing and test validation function too
* fix validation tests to point to metadata
* update codegen
* fix clippy and tests
* tweak a comment
* rename validate_codegen => is_codegen_valid_for
---------
Co-authored-by: James Wilson <james@jsdw.me >
2023-06-09 10:10:48 +01:00
James Wilson
e711dc1582
Get account nonce via state_call ( #1002 )
2023-06-07 16:15:22 +01:00
StackOverflowExcept1on
1ad9a20ce2
add #[allow(rustdoc::broken_intra_doc_links)] to subxt-codegen ( #998 )
...
* add `#[allow(rustdoc::broken_intra_doc_links)]` to subxt-codegen
* Add for "main" codegen path too
---------
Co-authored-by: James Wilson <james@jsdw.me >
2023-06-05 12:22:52 +01:00
dependabot[bot]
98a4d320db
Bump clap from 4.3.0 to 4.3.1 ( #999 )
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.3.0...clap_complete-v4.3.1 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 11:14:43 +01:00
Abhijit Roy
fdc0d09ca3
[FIX] hyperlink ( #994 )
...
* [FIX] hyperlink
Example's hyperlink modified.
* Add more example links
---------
Co-authored-by: James Wilson <james@jsdw.me >
2023-06-02 11:57:00 +01:00
James Wilson
27d5868be6
Remove invalid redundant clone warning ( #996 )
2023-06-02 11:27:04 +01:00
James Wilson
e40a8629e2
move examples to main repo so we can include_str them for publishing ( #993 )
...
* move exampels to main repo so we can include_str them for publishing
* update CI to not break examples
v0.29.0
2023-06-01 14:27:12 +01:00
James Wilson
15a267cc5a
Prep for 0.29.0 release ( #992 )
...
* Prep for 0.29.0 release
* Fix typos
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
---------
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
2023-06-01 13:26:21 +01:00
James Wilson
9d50520d82
Update scale-encode, scale-decode and scale-value to latest ( #991 )
2023-06-01 09:56:01 +01:00
Andrew Jones
011a4bd42f
Add topics to EventDetails ( #989 )
...
* Add topics to `EventDetails`
* Update comment
* Fmt
* Clippy
2023-05-31 13:10:06 +01:00
Tadeo Hepperle
1ddae684d5
restrict sign_with_address_and_signature interface ( #988 )
2023-05-30 18:18:40 +02:00
dependabot[bot]
80d69abcec
Bump proc-macro2 from 1.0.58 to 1.0.59 ( #985 )
...
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2 ) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.58...1.0.59 )
---
updated-dependencies:
- dependency-name: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 15:15:57 +02:00
dependabot[bot]
437ff43667
Bump quote from 1.0.27 to 1.0.28 ( #983 )
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.27 to 1.0.28.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.27...1.0.28 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 15:35:14 +03:00
dependabot[bot]
b88cd0a3fc
Bump regex from 1.8.2 to 1.8.3 ( #986 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.8.2...1.8.3 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 11:50:11 +02:00
dependabot[bot]
b874315767
Bump tokio from 1.28.1 to 1.28.2 ( #984 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.28.1 to 1.28.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.28.1...tokio-1.28.2 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 11:28:50 +02:00
James Wilson
ae0ab3e8f3
Tidy up some metadata accessing ( #978 )
...
* Reduce some repetition when obtaining metadata pallets/runtime_traits
* make them pub
* fix docs and clippy
2023-05-26 13:51:10 +01:00
James Wilson
870d4df2ed
Skip call variants if there aren't any ( #980 )
...
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-05-26 13:40:35 +01:00
Tadeo Hepperle
e8612ddae0
Yew Subxt WASM examples ( #968 )
...
* add wasm examples
* cargo fmt
* change crate name
* resolve workspace conflicts
2023-05-26 11:14:49 +02:00
James Wilson
b9f5419095
Introduce Metadata type ( #974 )
...
* WIP new Metadata type
* Finish basic Metadata impl inc hashing and validation
* remove caching from metadata; can add that higher up
* remove caches
* update retain to use Metadata
* clippy fixes
* update codegen to use Metadata
* clippy
* WIP fixing subxt lib
* WIP fixing tests, rebuild artifacts, fix OrderedMap::retain
* get --all-targets compiling
* move DispatchError type lookup back to being optional
* cargo clippy
* fix docs
* re-use VariantIndex to get variants
* add docs and enforce docs on metadata crate
* fix docs
* add test and fix docs
* cargo fmt
* address review comments
* update lockfiles
* ExactSizeIter so we can ask for len() of things (and hopefully soon is_empty()
2023-05-25 10:35:21 +01:00
Tadeo Hepperle
f344d0dd4d
CLI subxt explore commands ( #950 )
...
* add cli command to explore metadata
* fmt and clippy
* Bump serde from 1.0.160 to 1.0.162 (#948 )
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.160 to 1.0.162.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.160...1.0.162 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* extrinsics: Decode extrinsics from blocks (#929 )
* Update polkadot.scale
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics: Add extrinsics client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics: Decode extrinsics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt: Add extrinsic error
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* blocks: Expose extrinsics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Fetch and decode block extrinsics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics: Fetch pallet and variant index
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt: Move extrinsics on the subxt::blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* example: Adjust example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata: Collect ExtrinsicMetadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt: Implement StaticExtrinsic for the calls
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust examples
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Add root level Call enum
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt: Add new decode interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt: Merge ExtrinsicError with BlockError
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Find first extrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Move code to extrinsic_types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Add Extrinsic struct
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust examples
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* test: Decode extinsics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics/test: Add fake metadata for static decoding
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics/test: Decode from insufficient bytes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics/test: Check unsupported versions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics/test: Statically decode to root and pallet enums
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics/tests: Remove clones
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* blocks: Fetch block body inline
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* blocks: Rename ExtrinsicIds to ExtrinsicPartTypeIds
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics/test: Check decode as_extrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* blocks: Remove InsufficientData error
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* blocks: Return error from extrinsic_metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* extrinsics: Postpone decoding of call bytes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata_type: Rename variables
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust calls path for example and tests
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Remove traces
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* book: Add extrinsics documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* book: Improve extrinsics docs
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 >
* change doc comments
* add constants exploration
* add storage access interface but not done yet
* add storage exploration
* formatting
* remove dbg
* some small tweaks
* fix formatting and scale value for storage
* split up files, sort entries, change formatting
* fmt and clippy fix
* fix minor formatting issue
* implement suggestions
* implement other suggestion, fix bug
---------
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
Co-authored-by: James Wilson <james@jsdw.me >
2023-05-23 13:33:07 +02:00
James Wilson
5960cd2ac8
Ensure unique types in codegen ( #967 )
...
* Ensure unique types in codegen
* tweak comment
* Test the duplicate type codegen stuff
* appease clippy
* fix import
* add another test for generics being de-duplicated
* cargo fmt
---------
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-05-23 11:54:52 +01:00
dependabot[bot]
4444bed627
Bump clap from 4.2.7 to 4.3.0 ( #972 )
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.2.7 to 4.3.0.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.2.7...clap_complete-v4.3.0 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
Co-authored-by: James Wilson <james@jsdw.me >
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-05-22 10:45:25 +01:00
dependabot[bot]
ef1bab97c7
Bump proc-macro2 from 1.0.56 to 1.0.58 ( #970 )
...
Bumps [proc-macro2](https://github.com/dtolnay/proc-macro2 ) from 1.0.56 to 1.0.58.
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.56...1.0.58 )
---
updated-dependencies:
- dependency-name: proc-macro2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
Co-authored-by: James Wilson <james@jsdw.me >
2023-05-22 10:26:47 +01:00
Tadeo Hepperle
e63d618b28
Retain specific runtime APIs ( #961 )
...
* retain runtime apis
* fix ui test
* use boxed closures
2023-05-22 11:02:36 +02:00
dependabot[bot]
9980e9db72
Bump scale-info from 2.6.0 to 2.7.0 ( #973 )
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/paritytech/scale-info/releases )
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/scale-info/commits/v2.7.0 )
---
updated-dependencies:
- dependency-name: scale-info
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
2023-05-22 09:59:33 +01:00
dependabot[bot]
a61359d914
Bump Swatinem/rust-cache from 2.3.0 to 2.4.0 ( #971 )
...
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache ) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/Swatinem/rust-cache/releases )
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Swatinem/rust-cache/compare/060bda31e0be4f453bb6ed2d7e5427b31734ad01...988c164c3d0e93c4dbab36aaf5bbeb77425b2894 )
---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 11:00:12 +03:00
James Wilson
81494027c8
Have a pass over metadata validation ( #959 )
...
* Have a pass over metadata validation
* trait metadata; fold instead of map+for
* remove a couple of other XORs, so all uses of it are now commented
* appease clippy
2023-05-16 12:47:45 +01:00
dependabot[bot]
7f265dca49
Bump serde from 1.0.162 to 1.0.163 ( #958 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.162 to 1.0.163.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.162...v1.0.163 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-05-15 15:57:39 +01:00
dependabot[bot]
ac922fb266
Bump Swatinem/rust-cache from 2.2.1 to 2.3.0 ( #956 )
...
Bumps [Swatinem/rust-cache](https://github.com/Swatinem/rust-cache ) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/Swatinem/rust-cache/releases )
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Swatinem/rust-cache/compare/6fd3edff6979b79f87531400ad694fb7f2c84b1f...060bda31e0be4f453bb6ed2d7e5427b31734ad01 )
---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 14:08:43 +02:00
dependabot[bot]
3e704b438e
Bump quote from 1.0.26 to 1.0.27 ( #957 )
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.26 to 1.0.27.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.26...1.0.27 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 13:43:27 +02:00
dependabot[bot]
d9cbd867ba
Bump tokio from 1.28.0 to 1.28.1 ( #955 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.28.0...tokio-1.28.1 )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 13:42:32 +02:00
James Wilson
13b2943c08
remove as_pallet_extrinsic and as_pallet_event ( #953 )
2023-05-12 17:12:47 +01:00