276 Commits

Author SHA1 Message Date
pezkuwichain b8ee6a084f Rebrand subxt to pezkuwi-subxt with pezsp_runtime support
- Renamed all crate names from subxt-* to pezkuwi-subxt-*
- Updated codegen to use pezsp_runtime, pezsp_core, pezframe_support instead of sp_runtime, sp_core, frame_support
- Replaced all internal references from subxt_* to pezkuwi_subxt_*
- Added local path dependencies to Pezkuwi SDK crates
- Updated workspace configuration for edition 2024
2025-12-19 16:00:14 +03:00
paritytech-subxt-pr-maker[bot] a2080bf1f7 Update Artifacts (auto-generated) (#2141)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-12-09 17:00:23 +00:00
James Wilson c32017e453 subxt-historic: prep 0.0.8 release: expose type resolver that can be used with visitors (#2140)
* subxt-historic: prep 0.0.8 release: expose type resolver that can be used with visitors

* clippy

* Fix example

* Fix docs test
2025-12-05 17:11:25 +00:00
paritytech-subxt-pr-maker[bot] 0c6423bb48 Update Artifacts (auto-generated) (#2130)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-11-24 10:16:06 +00:00
James Wilson 8203679cbd Merge v0.50.x to master (#2127)
* v0.50.0: Integrate frame-decode, redo storage APIs and break up Error. (#2100)

* WIP integrating new frame-decode and working out new storage APIS

* WIP: first pass adding new storage things to subxt-core

* Second pass over Address type and start impl in Subxt

* WIP new storage APIs

* WIP New storage APIs roughly completed, lots of errors still

* Remove PlainorMap enum; plain and map values now use same struct to simplify usage

* Begin 'fixing' errors

* WIP splitting errors and tidying payload/address traits

* Get subxt-core compiling

* Small fixes in subxt-core and remove metadata mod

* subxt-core: cargo check --all-targets passes

* Fix test

* WIP starting to update subxt from subxt-core changes

* WIP splitting up subxt errors into smaller variants

* WIP errors: add DispatchError errors

* Port new Storage APIs to subxt-core

* cargo check -p subxt passes

* Quick-fix errors in subxt-cli (explore subcommand)

* fmt

* Finish fixing codegen up and start fixing examples

* get Subxt examples compiling and bytes_at for constants

* Add some arcs to limit lifetimes in subxt/subxt-core storage APIs

* A little Arcing to allow more method chaining in Storage APIs, aligning with Subxt

* Update codegen test

* cargo check --all-targets passing

* cargo check --features 'unstable-light-client' passing

* clippy

* Remove unused dep in subxt

* use published frame-decode

* fix wasm-example

* Add new tx extension to fix daily tests

* Remove unused subxt_core::dynamic::DecodedValue type

* Update book to match changes

* Update docs to fix more broken bits

* Add missing docs

* fmt

* allow larger result errs for now

* Add missing alloc imports in subxt-core

* Fix doc tests and fix bug getting constant info

* Fix V14 -> Metadata transform for storage & constants

* Fix parachain example

* Fix FFI example

* BlockLength decodes t ostruct, not u128

* use fetch/iter shorthands rather than entry in most storage tests

* Fix some integration tests

* Fix Runtime codegen tests

* Expose the dynamic custom_value selecter and use in a UI test

* Update codegen metadata

* Tidy CLI storage query and support (str,str) as a storage address

* Add (str,str) as valid constant address too

* Show string tuple in constants example

* Via the magic of traits, avoid needing any clones of queries/addresses and accept references to them

* clippy

* [v0.50] update scale-info-legacy and frame-decode to latest (#2119)

* bump scale-info-legacy and frame-decode to latest

* Remove something we don't need in this PR

* Fully remove unused for now dep

* [v0.50] Convert historic metadata to subxt::Metadata (#2120)

* First pass converting historic metadatas to our subxt::Metadata type

* use published frame-decode

* fmt and rename legacy metadata macro

* Enable legacy feature where needed in subxt_metadata so it compiles on its own

* Use cargo hack more in CI and fix subxt-metadata features

* Add tests for metadata conversion (need to optimise; some too expensive right now

* Address performance and equality issues in metadata conversion testing

* fmt

* fmt all

* clippy

* Fix a doc link

* Test codegen and fixes to make it work

* Remove local frame-decode patch

* bump frame-decode to latest

* [v0.50.0] Allow visiting extrinsic fields in subxt_historic (#2124)

* Allow visiting extrinsic fields

* fmt

* Don't use local scale-decode dep

* Clippy and tidy

* Extend 'subxt codegen' CLI to work with legacy metadatas

* Simplify historic extrinsics example now that AccountId32s have paths/names

* clippy

* clippy

* clippy..

* Allow visiting storage values, too, and clean up extrinsic visiting a little by narrowing lifetime

* Try to fix flaky test

* Add custom value decode to extrinsics example

* Remove useless else branch ra thought I needed

* Simplify examples

* Prep to release v0.0.5 (#2126)
2025-11-22 10:44:03 +00:00
Tarik Gul 2904b84ff5 feat: Add system_chainType to legacy rpcs (#2116)
* feat: Add system_chainType to legacy rpcs

* Test response
2025-11-10 12:18:29 +00:00
paritytech-subxt-pr-maker[bot] 7b4b23981c Update Artifacts (auto-generated) (#2115)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-10-27 10:00:49 +00:00
James Wilson 663caed412 Bump smoldot / smoldot-light to latest (#2110)
* Bump smoldot / smoldot-light

* Add new EthSetOrigin tx extension to fix test on new polkadot

* Fix runtime API call in test
2025-10-21 22:44:22 +01:00
withtimezone 2ec9c2e57c chore: fix some minor issues in the comments (#2106)
Signed-off-by: withtimezone <with_timezone@outlook.com>
2025-10-20 12:18:21 +01:00
James Wilson b13b8ec8d0 [subxt-historic]: extract call and event types from metadata at a block (#2095)
* Inject call and event types from metadata too at some block in subxt-historic

* bump subxt-historic to 0.0.4

* Fix unrelated doc things to try and fix this job

* Other Rust 1.90 fixes

* 'Fix' Test

* Try fixing clippy WASM job

* Try again to get clippy wasm working

* trybuild fix

* trybuild fix take 2
2025-09-25 13:37:09 +01:00
James Wilson afb116fa6c 17 accounts now, not 16 (#2078) 2025-09-02 14:36:58 +01:00
James Wilson abcda67fc0 subxt-historic: add support for returning the default values of storage entries (#2072) 2025-09-02 11:32:09 +01:00
paritytech-subxt-pr-maker[bot] 2a498d4dda Update Artifacts (auto-generated) (#2075)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-09-02 11:31:50 +01:00
paritytech-subxt-pr-maker[bot] 642e6b5be5 Update Artifacts (auto-generated) (#2049)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-08-04 11:42:37 +01:00
Bastian Köcher 8e162036a1 Block: Implement clone (#2047) 2025-07-31 10:59:12 +01:00
paritytech-subxt-pr-maker[bot] fce54cbba8 Update Artifacts (auto-generated) (#2044)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-07-28 10:04:09 +01:00
paritytech-subxt-pr-maker[bot] 0a20e74dc6 Update Artifacts (auto-generated) (#2039)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-07-14 10:14:13 +01:00
paritytech-subxt-pr-maker[bot] 849a5e6700 Update Artifacts (auto-generated) (#2036)
* Update Artifacts (auto-generated)

* update ui test

---------

Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
Co-authored-by: James Wilson <james@jsdw.me>
2025-07-08 16:52:17 +01:00
James Wilson 77b6abccba Address some issues around tx mortality (#2025)
* Clarify mortality config

* Fix EncodeAsType / DecodeAsType impls for Era to be proper ones

* Fix test now that txs are mortal by default

* clippy

* missing imports

* allow Era decoding from CheckMortality

* tweak a comment

* fmt

* Add more explicit tests for mortality
2025-06-23 15:22:14 +01:00
James Wilson a78f52b9d5 Keep codec attrs even when Encode/Decode not used (#2023)
* Keep codec attrs even when Encode/Decode not used

* Fix p2p port discovery for newest substrate

* clippy
2025-06-18 10:32:29 +01:00
James Wilson f831e8f87c De-dup types early in CLI/macro so that derives/substitutes work for de-duped types (#2015)
* De-dup types early to enable derives for them

* ensure_unique_type_paths in CLI codegen, too

* Update UI test outpuot

---------

Co-authored-by: José Duarte <duarte.gmj@gmail.com>
2025-06-03 12:03:55 +01:00
James Wilson a4331dfa08 If only one hasher, always treat any key as a single and not NMap key, even if it's a tuple. (#2010)
* If only one hasher, always treat any key as a single and not DoubleMap or NMap key

* Fix test

* Make the dyanmic storage key handling match our codegen handling
2025-06-02 15:18:00 +01:00
James Wilson ed25a3ac26 Remove codec::Encode and codec::Decode derives from generated APIs by default (#2008)
* Remove codec::Encode and codec::Decode from generated APIs by default

* clippy fixes

* clippy

* More fixes, and CompactAs only if Encode/Decode

* revert println in example

* fix lightclient test

* fix docs

* Fix another rust doc comment

* Fix failing storage test

* Remove now-unnecessary test

* clippy

* clippy

* Remove pointless clone
2025-05-29 14:43:42 +01:00
James Wilson 7de8d36806 Prep to release v0.42.0 (#2003)
* Prep to release v0.42.0

* Remove test_context reference from example

* standalone_crate for doc tests because codegen is expensive

* fmt
2025-05-12 10:32:38 +01:00
James Wilson 23c62f3d5d Update to 2024 edition (#2001)
* Update to 2024 edition

* Update to 2024 edition; fmt, use<> and remove refs

* async functions
2025-05-09 16:12:18 +01:00
Evelina Carl 411a807d50 chore: fix some typos (#1997)
* Update events.rs

* Update transaction_extensions.rs

* Update mod.rs

* Update lib.rs

---------

Co-authored-by: James Wilson <james@jsdw.me>
2025-05-08 14:45:26 +01:00
James Wilson 9ba89e3ed7 Support v16 metadata and use it by default if it's available (#1999)
* Support v16 metadata and use it by default if it's available

* lockfile

* fix blocks test; new transaction extension in kitchensink runtime

* Bump scale-typegen to 0.11.1 to cater for Duration prelude type

* fmt

* Fix no-std test building

* Cargo update and bump substrate deps

* Update test and no-std deps

* fmt

* fix test
2025-05-08 14:44:44 +01:00
James Wilson 4524590821 Metadata V16: Implement support for Pallet View Functions (#1981)
* Support Pallet View Functions in Subxt

* fmt

* clippy

* Move a little view function logic to subxt_core

* clippy

* Add back check that prob isnt needed

* avoid vec macro in core

* Add view funciton test and apply various fixes to get it working

* Add test for dynamic view fn call and fix issues

* clippy

* fix test-runtime

* fmt

* remove export

* avoid vec for nostd core

* use const instead of fn for view fn call name

* Update to support latest unstable metadata

* Update metadata stripping tests for new v16 version
2025-04-24 14:42:07 +01:00
James Wilson 21b3f52191 Metadata V16: Be more dynamic over which hasher is used. (#1974)
* Use DynamicHasher256 to support Blake2 or Keccack depending on chain

* remove Config::Hash associated type, replace with HashFor<Config> alias

* Fix doc links

* fix wasm tests

* Don't strip system pallet associated types. check System.Hashing, not Hash. Rename BlockHash trait to Hash

* Tweak comment

* fmt

* fix merge

* Fix typo
2025-04-23 10:12:48 +01:00
Niklas Adolfsson 175f604ea7 chore(deps): tokio ^1.44.2 (#1989) 2025-04-08 12:03:54 +01:00
paritytech-subxt-pr-maker[bot] 822a0df21a Update Artifacts (auto-generated) (#1984)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-04-07 11:47:33 +01:00
James Wilson cdab21e8c3 Use wat instead of wabt to avoid CI cmake error (and use supported dep) (#1980) 2025-04-03 10:22:46 +01:00
James Wilson 054140be1d Support v1 archive RPCs (#1977)
* Support v1 archive RPCs

* Update tests and don't alias, need to change call names too
2025-04-01 17:34:05 +01:00
paritytech-subxt-pr-maker[bot] 4a29166dbf Update Artifacts (auto-generated) (#1976)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-03-31 16:16:31 +01:00
James Wilson 72ac18491c Support V16 metadata and refactor metadata code (#1967)
* WIP integrate unstable v16 metadata into Subxt

* first pass moving retain to the CLI tool

* Remove otuer enum variant stripping and move now simpler strip_metadata to new crate. test it

* tidyup to use stripmetadata package etc

* Fix / comment out tests

* fmt

* clippy

* Fix wasm example

* wasm-example fix

* wasm-example fix

* Maske sure to move IDs around after types.retain()

* fmt

* Tweak comment

* Find dispatch error separately to avoid issues during mapping

* Expose associated type information in pallet metadata

* Hopefully fix flaky archive RPC

* remove unwanted temp file

* Address nits

* Add back commented-otu tests and address review comments

* use either, and simplify for_each
2025-03-28 15:35:55 +00:00
paritytech-subxt-pr-maker[bot] 06396f8b1a Update Artifacts (auto-generated) (#1971)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-03-24 09:58:50 +00:00
paritytech-subxt-pr-maker[bot] 11692fe600 Update Artifacts (auto-generated) (#1965)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-03-18 10:00:04 +00:00
James Wilson af59a9960b Fix CLI storage diff (#1958)
* Fix CLI storage diff

* attempt to avoid race in tests
2025-03-12 15:51:39 +00:00
James Wilson b6b9ac65c7 Support constructing and submitting V5 transactions (#1931)
* TransactionExtensions basic support for V5 VerifySignature and renames

* WIP: subxt-core v5 transaction support

* Subxt to support V5 extrinsics

* WIP tests failing with wsm trap error

* Actually encode mortality to fix tx encode issue

* fmt

* rename to sign_with_account_and_signature

* Add explicit methods for v4 and v5 ext construction

* clippy

* fix wasm example and no mut self where not needed

* fix doc example

* another doc fix

* Add tests for tx encoding and fix v5 encode issue

* add copyright and todo

* refactor APIs to have clear v4/v5 split in core and slightly nicer split in subxt proper

* rename Partial/SubmittableExtrinsic to *Transaction

* Remove SignerT::address since it's not needed

* doc fixes

* fmt

* doc fixes

* Fix comment number

* Clarify panic behaviour of inject_signature

* fmt
2025-03-11 11:14:27 +00:00
paritytech-subxt-pr-maker[bot] 93cf4b4da8 Update Artifacts (auto-generated) (#1950)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-03-10 09:44:41 +00:00
James Wilson c29edf6fef Bump frame-metadata to 20.0.0 (#1944) 2025-03-06 07:38:31 +01:00
James Wilson 23c0651c57 Add archive RPCs to subxt-rpcs (#1940)
* Add archive RPCs to subxt-rpcs

* Add tests for archive RPCs

* ".unwrap_*" to ".as_*"

* clippy

* Add proper unsub method for archive_unstable_storage
2025-03-05 15:23:50 +00:00
paritytech-subxt-pr-maker[bot] 2d5a70862a Update Artifacts (auto-generated) (#1938)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-03-03 12:08:57 +00:00
James Wilson 037d5178b8 Document generating interface from Runtime WASM and change feature to runtime-wasm-path (#1936)
* runtime_metadata_path => runtime_wasm_path and document this feature

* fix doc
2025-03-03 12:07:48 +00:00
wgyt 396762510a update copyright year (#1924)
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2025-02-24 16:07:29 +00:00
Niklas Adolfsson 69ce6d726f deps: remove polkadot-sdk umbrella crate (#1926)
* deps: get rid of polkadot-sdk umbrella crate

* fix nits

* Update subxt/src/backend/mod.rs

* Update subxt/src/events/events_client.rs

* Update metadata/src/utils/validation.rs

* cargo clippy fix

* fix ui tests
2025-02-24 12:38:21 +01:00
James Wilson 816a86423b Split RPCs into a separate crate (#1910)
* WIP extract RPCs into separate crate

* fmt

* Fix test

* Remove unused deps

* fix import

* WIP: Fix up errors and most tests. Start extracintg some tests/code to rpc crate

* MockRpcClient sync or async

* MockRpcClient only async but better type inference

* WIP MockRpcClient FnMuts and some test updates to use it

* Get all but one test working with new MockRpcClient

* WIP trying to debug failure

* WIP, Tests mostly fixed, need to add back oen more

* Get mock RPC tests working

* fmt

* fmt

* Clippy and comment tweak

* update CI to explicitly check subxt-rpc features

* clippy

* small tweaks after pass over

* feature flag rename

* update some docs

* Fix some examples

* fmt

* Fix features flags to work with web/wasm32

* Fix unused dep warning

* explicit targets in wasm CI

* Add better crate level docs

* fmt

* Address review comments

* Comment out flaky test for now and make more obvious how similar POlkadot and Substrate configs are

* Not a doc comment

* Remove unused imports
2025-02-18 12:07:00 +00:00
paritytech-subxt-pr-maker[bot] 333de953ec Update Artifacts (auto-generated) (#1922)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-02-17 11:44:47 +01:00
paritytech-subxt-pr-maker[bot] 28ffc3ebff Update Artifacts (auto-generated) (#1920)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-02-10 12:00:58 +00:00
James Wilson c96387c47d Prep to release 0.39.0 (#1918)
* Pre pto release 0.39.0

* Actually save updates in Cargo.toml

* Tweak changelog text
2025-02-05 11:00:09 +00:00