Commit Graph

210 Commits

Author SHA1 Message Date
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 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
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
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 94f4e7f39b preserve custom metadata when converting between Subxt metadata and frame_metadata (#1914) 2025-01-30 16:14:11 +00:00
paritytech-subxt-pr-maker[bot] 56c410cbe1 Update Artifacts (auto-generated) (#1908)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-01-27 11:10:55 +02:00
James Wilson dff4dab65e Tweak test to look at holds, not locks after polkadot-sdk@f5673cf (#1896) 2025-01-20 15:38:13 +01:00
paritytech-subxt-pr-maker[bot] 2d9de19040 Update Artifacts (auto-generated) (#1894)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-01-15 17:43:06 +00:00
Niklas Adolfsson 2e3e9591c1 tests: add WeightReclaim signed ext (#1893) 2025-01-07 11:07:56 +01:00
paritytech-subxt-pr-maker[bot] 62752844fe Update Artifacts (auto-generated) (#1885)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2025-01-02 08:41:44 +01:00
Niklas Adolfsson f5e9ce0d2c remove substrate compat (#1850)
* remove substrate compat

* add hacky example

* simplify substrate-compat example

* simplify substrate-compat example

* cargo fmt

* fix build

* add more examples

* fix nit

* fix test build

* Update subxt/examples/substrate_compat_signer.rs

Co-authored-by: James Wilson <james@jsdw.me>

* keep only polkadot signer example

* remove more substrate compat related stuff

* fix example

* link to substrate signer example in book

* Update subxt/src/book/usage/transactions.rs

* Update subxt/src/book/usage/transactions.rs

* address grumbles

* fix nits

---------

Co-authored-by: James Wilson <james@jsdw.me>
2024-11-27 16:46:38 +01:00
paritytech-subxt-pr-maker[bot] 09ab839ff2 Update Artifacts (auto-generated) (#1874)
Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
2024-11-25 10:24:47 +02:00
James Wilson 0dbcdbdd9c Attempt to quickfix flaky legacy_and_unstable_block_subscription_reconnect (#1868)
* Attempt to quickfix flaky legacy_and_unstable_block_subscription_reconnect test

* Make test name match behaviour

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

* Timeout to 300s

---------

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-11-18 12:49:12 +00:00
paritytech-subxt-pr-maker[bot] cb9571d7a6 Update Artifacts (auto-generated) (#1860)
* Update Artifacts (auto-generated)

* fix assethub example

* update Cargo.lock for wasm tests

* cargo fmt

* fix subxt cli tests

* disable failing wasm tests

* add issue link for disabled test

---------

Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-11-11 18:34:02 +01:00
James Wilson 3219659f12 Fix substrate nightly (#1848) 2024-10-30 10:40:02 +01:00
paritytech-subxt-pr-maker[bot] b963b8fcae Update Artifacts (auto-generated) (#1844)
* Update Artifacts (auto-generated)

* fix ui tests

---------

Co-authored-by: niklasad1 <14157425+niklasad1@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2024-10-28 15:37:49 +01:00
Niklas Adolfsson bcdf0bb054 light client tests: use ChainheadBackendBuilder::build_with_background_driver (#1823)
* backend rpc tests: use background task

* fix build
2024-10-14 12:02:12 +02:00
paritytech-subxt-pr-maker[bot] 77a36773ae Update Artifacts (auto-generated) (#1826)
Co-authored-by: tadeohepperle <62739623+tadeohepperle@users.noreply.github.com>
2024-10-14 09:15:18 +02:00