Commit Graph

1165 Commits

Author SHA1 Message Date
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
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 b3317c5b77 Add DefaultParams to allow more transaction extensions to be used when calling _default() methods (#1979)
* Add DefaultParams to allow more transaction extensions to be used when calling _default() methods

* More imple for AnyOf/DefaultParams

* Prevent T param being used twice in macro

* clippy
2025-04-04 10:08:26 +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 06e658cd4b Allow submitting transactions ignoring follow events (#1962) 2025-03-14 16:08:38 +00:00
James Wilson da3ea0b528 Improve error message regarding failure to extract metadata from WASM runtime (#1961)
* Improve error message re failure to extract metadata from runtime

* Improve error on legacy metadata loading too

* allow missing host funcs, too
2025-03-13 09:40:50 +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 20bc4b89ca Add docs for subxt-rpcs and fix example (#1954)
* Add docs for subxt-rpcs and fix example

* Add docs bits in Cargo.toml

* add missing docsrs cfg_attr

---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2025-03-11 17:14:14 +00:00
James Wilson 4c32ee1e78 Prepare for 0.41.0 release (#1952)
* Prepare for 0.41.0 release

* Example fmt tweak and remove small entry from changes

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
v0.41.0
2025-03-11 15:29:15 +00:00
James Wilson 16c50846c1 Map finality timeout to Dropped instead of Invalid (#1953) 2025-03-11 15:49:52 +01: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
dependabot[bot] dcb9c27fcc build(deps): bump ring from 0.17.8 to 0.17.13 (#1951)
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 12:27:48 +02: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
dependabot[bot] 08a380142f build(deps): bump ring in /examples/parachain-example (#1949)
Bumps [ring](https://github.com/briansmith/ring) from 0.17.7 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 10:25:45 +01:00
James Wilson 49c66a0fd5 Wrap the subxt::events::Events type to avoid exposing subxt_core errors and types unnecessarily (#1948)
* Wrap the subxt::events::Events type to avoid exposing subxt_core errors and types unnecessarily (#1947)

* Actually import module and fix issues

* Remove a couple of unnecessary conversions now

* Test
2025-03-06 16:30:47 +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
James Wilson e59eef21b4 Allow transaction timeout in ChainheadBackend to be configured (#1943)
* Add configurable transaction timeout to ChainheadBackend

* u64, not usize

* Actually, stick with usize
2025-03-05 10:43:54 +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
dependabot[bot] ca37002da5 build(deps): bump dawidd6/action-download-artifact (#1939)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 8 to 9.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/20319c5641d495c8a52e688b7dc5fada6c3a9fbc...07ab29fd4a977ae4d2b275087cf67563dfdf0295)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  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-03-03 11:45:46 +02:00
Alex Bean 72f8e0372e refactor: make ExtrinsicEvents::new public for external access (#1933) 2025-02-25 14:28:01 +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
v0.39.0
2025-02-05 11:00:09 +00:00
James Wilson d924ece39a Don't double hash: use the same hash in ExtrinsicDetails and ExtrinsicDetails (#1917)
* Don't double hash: use the same hash in ExtrinsicDetails and ExtrinsicEvents

* clippy
2025-02-03 17:47:31 +00:00
James Wilson 29bf00e209 Fix and test sr25519 signing in nostd (#1872)
* Fix and test sr25519 signing in nostd

* Remove sr25519 signing test on nostd for thumbabi target

* Don't use sr25519 feature in nostd tests

* Fix nits, remove WASM deps from nostd test, improve comments

* Change copypasted comment

* fmt

* Update CI to account for signer tests
2025-01-30 17:13:58 +00:00
James Wilson 94f4e7f39b preserve custom metadata when converting between Subxt metadata and frame_metadata (#1914) 2025-01-30 16:14:11 +00:00