Commit Graph

1200 Commits

Author SHA1 Message Date
James Wilson 3aabd6dc09 Add subxt-historic crate for accesing historic (non head-of-chain) blocks (#2040)
* WIP subxt-historic

* WIP subxt-historic

* WIP subxt-historic; flesh out basic foundations

* WIP filling in extrinsic decoding functionality

* iter and decode transaction extensions

* Fill in the Online/OfflineClient APIs and move more things to be part of the chain Config

* WIP storage

* clippy, fmt, finish extrinsics example

* prep for 0.0.1 release to claim crate name

* fix README link

* fmt

* WIP thinking about storage APIs

* WIP working out storage APIs

* Storage plain value fetching first pass

* WIP storage: first pass iterating over values done

* First apss finishing storage APIs

* fmt and clippy

* Create a storage example showing fetch and iteration

* Bump to frame-decode 0.9.0

* Bump subxt-historic to 0.0.3 for preview release

* Remove unused deps

* fix import

* clippy

* doc fixes

* tweak CI and fix some cargo hack findings

* Update README: subxt-historic is prerelease
2025-08-26 17:56:21 +01:00
dependabot[bot] 23f3ebe6b5 build(deps): bump actions/checkout from 4 to 5 in /.github/workflows (#2060)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-26 17:55:38 +01:00
dependabot[bot] 26bf45bb03 build(deps): bump actions/checkout from 4 to 5 (#2059)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-26 17:55:26 +01:00
dependabot[bot] ed93e26710 build(deps): bump slab from 0.4.10 to 0.4.11 in /examples/ffi-example (#2063)
Bumps [slab](https://github.com/tokio-rs/slab) from 0.4.10 to 0.4.11.
- [Release notes](https://github.com/tokio-rs/slab/releases)
- [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11)

---
updated-dependencies:
- dependency-name: slab
  dependency-version: 0.4.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-26 17:55:12 +01:00
James Wilson 770fc9dc7a Do not panic when encoding call data with invalid fields (#2070)
* don't panic

* Add unit tests

* fmt

* clippy

* fmt

---------

Co-authored-by: elfedy <federico@moonsonglabs.com>
Co-authored-by: Federico Rodríguez <federodriguez.88@gmail.com>
2025-08-26 17:54:51 +01:00
paritytech-subxt-pr-maker[bot] 739b9f84cf Update Artifacts (auto-generated) (#2067)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-08-26 14:45:51 +01:00
Alberto Nicolas Penayo a7d2423e92 chore(dev): increase number of dev accounts (#2068)
* increase number of dev accounts

* delete extra acc
2025-08-26 10:45:04 +01:00
Андрій Шовкошитний 6edb435232 Update README.md (#2062) 2025-08-20 14:00:49 +01:00
James Wilson c82a612373 Tweak test to reduce chance of failure, and need jsonrpsee/server for tests (#2057) 2025-08-20 11:28:55 +01:00
paritytech-subxt-pr-maker[bot] 56cfacdb6f Update Artifacts (auto-generated) (#2061)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-08-18 12:41:27 +01:00
Donn Pawelek a679265b29 docs: fix typos in docs (#2056) 2025-08-13 14:43:41 +01:00
James Wilson 42f1a62a05 Fix 1.89 clippy warnings (#2055)
* Fix 1.89 clippy warnings

* WASM lightclient clippy fixes too
2025-08-11 15:33:55 +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
James Wilson fdc42f088b Increase reconnecting client request/response size (#2046) 2025-07-29 17:53:57 +01:00
Donn Pawelek 02eda40bba docs: fix typos in docs (#2045)
* docs: fix typos in docs

* up

* up
2025-07-29 16:01:22 +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] 8914ca3e67 Update Artifacts (auto-generated) (#2042)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-07-21 12:02:03 +01:00
James Wilson 841a43b1ec Prepare for 0.43.0 release (#2041) v0.43.0 2025-07-18 10:01:33 +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 026c239305 Fix 'subxt explore storage': don't turn keys to bytes (#2038)
* Fix 'subxt explore storage': don't turn keys to bytes

* fmt

* Remove unused imports
2025-07-08 13:33:39 +01:00
James Wilson ff6fc1585e Add FFI example (#2037)
* Add FFI example

* Remove unnecessary dependency (libc)

* Tweak python example and add CI
CI Tweak; separate task for ffi-example run

* Remove OnceCell dep; use std

---------

Co-authored-by: wassimans <wassim@wassimans.com>
2025-07-08 12:06:13 +01:00
puzzle-rusher 17b98d0d9e Refactor: improve nonce and block injection in extrinsic params (#2032)
* Refactor: improve nonce and block injection in extrinsic params

* remove excess import

---------

Co-authored-by: James Wilson <james@jsdw.me>
2025-07-04 22:54:04 +01:00
Bastian Köcher 05c9eafe79 Improve docs for at_latest (#2035)
Tell the user that these functions operate with the last finalized block.

Co-authored-by: James Wilson <james@jsdw.me>
2025-07-04 22:06:41 +01:00
puzzle-rusher e892802baf Clippy fixes (#2033)
* clippy fixed

* wasm clippy

* clippy fixes

* post clippy fmt

* last clippy fix
2025-07-04 21:21:31 +01:00
Donn Pawelek 1f57e8fd1a docs: fix minor comment typos (#2027) 2025-06-30 10:20:07 +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
gcmutator 3078729271 chore: remove redundant backtick in comment (#2020)
Signed-off-by: gcmutator <329964069@qq.com>
2025-06-18 10:32:58 +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 3643f2c694 Run CI on v0.N.x branches or PRs to them for ease of backporting (#2017) 2025-06-03 13:10:15 +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
dependabot[bot] dfb4b2f68a build(deps): bump dawidd6/action-download-artifact (#2013)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 9 to 10.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/07ab29fd4a977ae4d2b275087cf67563dfdf0295...4c1e823582f43b179e2cbb49c3eade4e41f992e2)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 13:01:33 +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 0473cfd292 Prep to release 0.42.1: Reduce rust-version to Rustc 1.85.0 (#2005)
* Reduce rust-version to Rustc 1.85.0

* Bump to 0.42.1 in prep to release patch version
v0.42.1
2025-05-12 13:13:21 +01:00
James Wilson f8c333f30b Update release notes to include strip-metadata util 2025-05-12 12:11:38 +01:00
James Wilson 77f83557a5 Actually bump Cargo.toml to 0.42.0 v0.42.0 2025-05-12 11:36:58 +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
James Wilson 98c1d153b6 Update Smoldot to latest version (#1991)
* Update Smoldot

* Update lockfile

* fix wasm example dependency issue
2025-05-09 15:27:34 +01:00
James Wilson a0330768ff Update native test timeout to 45 mins (#2002) 2025-05-09 14:39:28 +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
dependabot[bot] a8ae55a61b build(deps): bump Swatinem/rust-cache from 2.7.7 to 2.7.8 (#1969)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.7 to 2.7.8.
- [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/f0deed1e0edfc6a9be95417288c0e1099b1eeec3...9d47c6ad4b02e050fd481d890b2ea34778fd09d6)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  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>
2025-04-09 11:05:47 +01:00
dependabot[bot] 8970611c6a build(deps): bump Swatinem/rust-cache in /.github/workflows (#1970)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.7.7 to 2.7.8.
- [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/f0deed1e0edfc6a9be95417288c0e1099b1eeec3...9d47c6ad4b02e050fd481d890b2ea34778fd09d6)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  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>
2025-04-09 11:05:36 +01:00
dependabot[bot] 98cbb88519 build(deps): bump actions/create-github-app-token in /.github/workflows (#1983)
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1 to 2.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: '2'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-09 11:04:49 +01:00
Niklas Adolfsson 175f604ea7 chore(deps): tokio ^1.44.2 (#1989) 2025-04-08 12:03:54 +01:00