Tadeo Hepperle
265f16fdec
codegen for root level error ( #930 )
...
* code gen for root error
* cargo fmt
* polkadot.rs regenerated
* use pallet name and decode with metadata
* remove pallet by name fn
* test that we can decode a ModuleError via as_root_error
* nits
---------
Co-authored-by: James Wilson <james@jsdw.me >
2023-05-02 17:33:09 +02:00
Tadeo Hepperle
40339b3415
add no_default_substitutions to the macro and cli ( #936 )
2023-04-27 15:59:57 +01:00
James Wilson
464b4432cf
Move all deps to workspace toml ( #932 )
...
* Move all deps to workspace toml
* cargo fmt and codec 3.4, removing now unneeded 'full' feature
* add wasm-tests to workspace and fix subxt inheritng
* cargo fmt
* wasm-test thing can't be in workspace so revert that
* remove unwanted target dir from wasm-tests
2023-04-26 10:31:59 +01:00
Piotr Mikołajczyk
d3e20e993b
Opt out from default derives and attributes ( #925 )
...
* No default derives
* Clippy
* Clippy
* Review
* Review
* Typo
2023-04-24 14:01:21 +01:00
dependabot[bot]
7abe1fd1a6
Bump regex from 1.7.3 to 1.8.1 ( #922 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.7.3 to 1.8.1.
- [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.7.3...1.8.1 )
---
updated-dependencies:
- dependency-name: regex
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-04-24 09:53:20 +01:00
dependabot[bot]
5a1b9a5640
Bump tracing-subscriber from 0.3.16 to 0.3.17 ( #923 )
...
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing ) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.16...tracing-subscriber-0.3.17 )
---
updated-dependencies:
- dependency-name: tracing-subscriber
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-04-24 09:53:08 +01:00
Alexandru Vasile
59d195d4ad
metadata: Use v15 internally ( #912 )
...
* Update frame-metadata to v15.1.0
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Enable V15 unstable metadata in frame-metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata: Move validation hashing to dedicated file
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Use sp-metadata-ir from substrate to work with metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Revert using sp-metadata-ir in favor of conversion to v15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata: Convert v14 to v15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata: Use v15 for validation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Use v15 for codegen
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata/bench: Use v15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust to v15 metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Improve documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* force CI
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata: Address feedback
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata: Use HASH_LEN
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadta: Remove `LatestRuntimeMetadata` type alias
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* metadata: Remove `metadata_to_latest` to avoid pancis
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-04-20 17:59:28 +03:00
James Wilson
2f1b67b384
Factor substrate node runner into separate crate ( #913 )
...
* factor out node starting thing to separate crate to use in test-runtime and integration-tests
* remove subxt dep on test-runtime build, and clippy tidyup
* remove now-unneeded dep
* Update testing/substrate-runner/Cargo.toml
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
* Update testing/integration-tests/Cargo.toml
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* remove unneeded port things for backward compat
---------
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-04-17 12:42:17 +02:00
Tadeo Hepperle
2997b1bdc3
Partial fee estimates for SubmittableExtrinsic ( #910 )
...
* add partial_fee estimation to submittable extrinsic
* add integration test
* make functions immune to doctest
* add doc test
* inline encoded_with_len, fix tests
* fix test fmt
* remove unused imoort
* Bump h2 from 0.3.16 to 0.3.17 (#911 )
Bumps [h2](https://github.com/hyperium/h2 ) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases )
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md )
- [Commits](https://github.com/hyperium/h2/compare/v0.3.16...v0.3.17 )
---
updated-dependencies:
- dependency-name: h2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* call_raw returns Res: Decode
* remove import
* remove struct
---------
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 10:40:48 +02:00
James Wilson
2a4da618a0
Release 0.28 ( #906 )
...
* wip changelog
* Bump versions and write changelog for 0.28
* typo and wee tweaks
2023-04-12 09:34:59 +01:00
James Wilson
a36a6913bc
update deps, primarily Substrate ones ( #905 )
2023-04-11 16:30:21 +01:00
Tadeo Hepperle
3b9fd72b26
added at_latest ( #900 )
...
* added at_latest
* change some documentation
* remove inline
2023-04-11 13:07:12 +02:00
James Wilson
c08eb6c8f1
Update scale-info to 2.5.0 ( #896 )
...
* Upodate scale-info to 2.5.0
* A couple more clippy fixes
* more deprecation things that appeared
2023-04-03 12:52:25 +01:00
dependabot[bot]
9d40391261
Bump tokio from 1.26.0 to 1.27.0 ( #893 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.26.0...tokio-1.27.0 )
---
updated-dependencies:
- dependency-name: tokio
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-04-03 11:00:16 +01:00
James Wilson
a2b8dde5e6
Add 'Static' type and improve type substitution codegen to accept it ( #886 )
...
* Add Static type which defers to Encode/Decode and impls EncodeAsType/DecodeAsType
* rename to static_type and impl Deref/Mut
* Improve type substitution in codegen so that concrete types can be swapped in
* A couple of comment tweaks and no need for a macro export
* Extend type substitution logic to work recursively on destination type
* cargo fmt
* Fix a couple of comments
* update ui test outpuot
* Add docs and missing_docs lint
* Add test for replacing multiple of Ident
* Update codegen/src/error.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* update copyright year and fix ui test
* simplify another error
---------
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-03-31 16:56:19 +01:00
dependabot[bot]
6b08b6869d
Bump regex from 1.7.1 to 1.7.3 ( #883 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.7.1 to 1.7.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.7.1...1.7.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-03-27 12:22:11 +02:00
dependabot[bot]
3f67b2c307
Bump scale-info from 2.3.1 to 2.4.0 ( #884 )
...
Bumps [scale-info](https://github.com/paritytech/scale-info ) from 2.3.1 to 2.4.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/compare/v2.3.1...v2.4.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>
2023-03-27 10:45:42 +01:00
James Wilson
b5194be5a2
Improve Dispatch Errors ( #878 )
...
* better dispatch errors
* dry_run to use same DispatchError
* fix dry_run_fails; use correct transfer amount
* Hide ModuleError impl and avoid pulling details from metadata unless user needs them
* fix tests
* actually fix the tests (hopefully..)
* Add a couple more DispatchError test cases
* Add a comment about where the error was copied from
* Also expose a way to obtain the raw module error data
* Remove redundant variant prefixes
* explicit lifetime on From<str> for clarity
* fmt
2023-03-23 09:50:44 +00:00
James Wilson
7c252fccf7
cargo fmt with stable defaults ( #876 )
2023-03-21 16:53:47 +00:00
James Wilson
c63ff6ec6d
Use scale-encode and scale-decode to encode and decode based on metadata ( #842 )
...
* WIP EncodeAsType and DecodeAsType
* remove silly cli experiment code
* Get things finally compiling with EncodeAsType and DecodeAsType
* update codegen test and WrapperKeepOpaque proper impl (in case it shows up in codegen)
* fix tests
* accomodate scale-value changes
* starting to migrate to EncodeAsType/DecodeAsType
* static event decoding and tx encoding to use DecodeAsFields/EncodeAsFields
* some tidy up and add decode(skip) attrs where needed
* fix root event decoding
* #[codec(skip)] will do, and combine map_key stuff into storage_address since it's all specific to that
* fmt and clippy
* update Cargo.lock
* remove patched scale-encode
* bump scale-encode to 0.1 and remove unused dep in testing crate
* update deps and use released scale-decode
* update scale-value to latest to remove git branch
* Apply suggestions from code review
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
* remove sorting in derives/attr generation; spit them out in order given
* re-add derive sorting; it's a hashmap
* StaticTxPayload and DynamicTxPayload rolled into single Payload struct
* StaticStorageAddress and DynamicStorageAddress into single Address struct
* Fix storage address byte retrieval
* StaticConstantAddress and DynamicConstantAddress => Address
* Simplify storage codegen to fix test
* Add comments
* Alias to RuntimeEvent rather than making another, and prep for substituting call type
* remove unnecessary clone
* Fix docs and failing UI test
* root_bytes -> to_root_bytes
* document error case in StorageClient::address_bytes()
---------
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
2023-03-21 15:31:13 +00:00
James Wilson
4f1d9b98f8
Fix tests against nightly Substrate ( #873 )
...
* variant change in latest codegen
* fmt
2023-03-21 13:02:59 +00:00
Piotr Mikołajczyk
2fb7dfd2bf
Fix integration test for balances ( #871 )
...
* Fix integration test
* Fix extrinsic encoding
* Units
* comment out dry_run and transfer_error
* fmt
* imports
* imports
---------
Co-authored-by: James Wilson <james@jsdw.me >
2023-03-20 15:28:09 +00:00
James Wilson
f2b03d8f2a
Expose signer payload to allow external signing ( #861 )
...
* create_partial et al to expose the signer payload and call data just prior to being signed
* remove unnecessary Result
* fmt, make it easier to pass in signature bytes, and add a test for this flow
* remove unnecessary deref
2023-03-15 13:28:08 +00:00
dependabot[bot]
cf7975c1a4
Bump futures from 0.3.26 to 0.3.27 ( #856 )
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.26 to 0.3.27.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.26...0.3.27 )
---
updated-dependencies:
- dependency-name: futures
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: James Wilson <james@jsdw.me >
2023-03-13 13:38:19 +01:00
Alexandru Vasile
a02aa20a41
testing: Fix clippy ( #859 )
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-03-13 12:06:13 +00:00
dependabot[bot]
9ed042812f
Bump tokio from 1.25.0 to 1.26.0 ( #847 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.25.0...tokio-1.26.0 )
---
updated-dependencies:
- dependency-name: tokio
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-03-06 12:48:08 +02:00
Alexandru Vasile
a7b45ef1d1
codegen: Add codegen error ( #841 )
...
* codegen: Add codegen error
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Use codegen error instead of aborts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Remove `proc-macro-error` dependency
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* macro/subxt: Transform codegen error into compile_error!
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* cli: Pretty printing for `CodegenError`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update cargo.lock
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Adjust testing for codegen error
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Fix documentation example
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Export `CodegenError`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Use collect::<Result<_>, _>()
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* cli: Adjust comment regarding error printing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* codegen: Improve error messages
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-03-03 19:57:46 +02:00
Alexandru Vasile
5320ca9d55
codegen: Opt out of documentation ( #843 )
...
* codegen: Opt-out for API documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* cli: Add `--no-docs` flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Check no documentation was generated
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update cargo.lock
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Adjust testing for the new codegen API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* macro: Ensure `subxt` macro does not contain documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* macro: Expose documentation flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* expose_documentation => generate_docs
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: James Wilson <james@jsdw.me >
2023-03-02 21:35:02 +02:00
Piotr Mikołajczyk
1c5faf3f8f
Bump Substrate dependencies ( #840 )
2023-02-28 11:00:15 +01:00
dependabot[bot]
61457ea873
Bump syn from 1.0.107 to 1.0.109 ( #838 )
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.107 to 1.0.109.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.107...1.0.109 )
---
updated-dependencies:
- dependency-name: syn
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-02-27 10:55:56 +01:00
Qinxuan Chen
af00f68962
chore: use workspace inheritance for package info ( #832 )
...
* chore: use workspace inheritance for package info
* add rust-version field into workspace package
* .workspace = true
---------
Co-authored-by: James Wilson <james@jsdw.me >
2023-02-21 11:53:32 +00:00
Léa Narzis
6d3c377c16
bump version 0.27.1 ( #827 )
2023-02-15 17:45:47 +00:00
James Wilson
7b0e06cf8a
Release v0.27.0 ( #824 )
...
* Bump substrate deps
* Bump to 0.27.0
* update changelog
* Clone and Debug on TxPayload types
* move item to Changed
* remove chore entirely
2023-02-13 16:13:17 +00:00
dependabot[bot]
c2decc78f0
Bump futures from 0.3.25 to 0.3.26 ( #814 )
...
Bumps [futures](https://github.com/rust-lang/futures-rs ) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/rust-lang/futures-rs/releases )
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.25...0.3.26 )
---
updated-dependencies:
- dependency-name: futures
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-02-06 11:11:11 +00:00
dependabot[bot]
d820ab81f5
Bump tokio from 1.24.2 to 1.25.0 ( #808 )
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.24.2 to 1.25.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/commits/tokio-1.25.0 )
---
updated-dependencies:
- dependency-name: tokio
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-01-30 10:21:06 +00:00
James Wilson
ce0a82e322
Remove unneeded Config bounds and BlockNumber associated type ( #804 )
...
* remove unneeded Config bounds and BlockNumber associated type
* clippy and fmt
2023-01-27 14:01:47 +00:00
James Wilson
d92352ad73
Prep for releasing 0.26.0 ( #802 )
...
* Prep for releasing 0.26.0
* link to new RPC spec
2023-01-24 16:55:27 +00:00
dependabot[bot]
2a913a3aa9
Bump which from 4.3.0 to 4.4.0 ( #801 )
...
Bumps [which](https://github.com/harryfei/which-rs ) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/harryfei/which-rs/releases )
- [Commits](https://github.com/harryfei/which-rs/compare/4.3.0...4.4.0 )
---
updated-dependencies:
- dependency-name: which
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 10:40:17 +00:00
Alexandru Vasile
e4e9562b45
Add block-centric Storage API ( #774 )
...
* blocks: Add storage method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Add support for runtime API calls and expose it to the blocks API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* storage: Add storage type for block centric API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Adjust subxt to the new Storage interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-20 12:49:19 +02:00
Alexandru Vasile
4155850063
tests: Ensure correct signing of extrinsics larger than 256 bytes ( #797 )
...
* tests: Ensure correct signing of extrinsics larger than 256 bytes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Use `vec!` macro for blob creation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-19 16:13:36 +02:00
Alexandru Vasile
0750ccd5a0
Add chainHead RPC methods ( #766 )
...
* rpc/types: Add chainHead event types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* rpc: Add `chainHead` RPC methods
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* rpc: Fix chainHead doc links
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update subxt/src/rpc/rpc.rs
Co-authored-by: James Wilson <james@jsdw.me >
* tests: Test the chainHead RPC methods
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* rpc: Improve `chainhead_unstable_follow` 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 >
2023-01-19 13:53:32 +02:00
Igor Matuszewski
977f2a3333
Allow for remapping type parameters in type substitutions ( #735 )
...
* feat!: Allow for remapping type parameters in type substitutions
* chore: cargo fmt
* chore: cargo clippy
* chore: Remove some old code
* a little tidy
* address comment nit
Co-authored-by: James Wilson <james@jsdw.me >
2023-01-19 10:49:57 +00:00
Alexandru Vasile
b4bb17662a
Add Runtime API to execute runtime calls ( #777 )
...
* rpc: Add RuntimeAPI call via `state_call` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt: Add runtime API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Expose the RuntimeAPI client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Test the runtime API call against the metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* client: Fetch the metadata from runtime API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* blocks: Fix doc typo
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* blocks: Use &str instead of String to identify fn names
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update subxt/src/runtime_api/runtime_client.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2023-01-18 17:49:20 +02:00
James Wilson
26b8a81c17
Codegen: Preserve attrs and add #[allow(clippy::all)] ( #784 )
...
* Preserve attrs on codegen and ignore all clippy on generated code
* tweak and test attr preservation
2023-01-17 09:42:04 +00:00
James Wilson
b316301d61
Make sp_core and sp_runtime dependencies optional, and bump to latest ( #760 )
...
* begin porting over traits; remove Config use of Hash
* port over the Header bits that we need
* sp_core_hashing where possible, move Verify to PairSigner, remove unused errors
* tidy up Config things and move related bits into one place
* fix codegen
* copy Era over
* move AccountId, Address, Signer to Signer trait and a pass over fixing examples
* impl MultiAddress, MultiSignature, AccountId32 and add back to Config (for decoding later)
* Copy over StorageKey, StorageData, StorageChangeSet
* subxt core compiling with no sp_core or sp_runtime
* Get examples compiling
* pass over fixing tests
* cargo fmt
* clippy tweaks and update polkadot.rs
* fix codegen docs
* port over special DigestItem encoding/decoding
* clippy and doc fixes
* cargo fmt and example fix
* more cargo fmt-ing...
* substrate-extra to substrate-compat
* cargo.toml comments
* simplify PairSigner trait bounds
* move RPC types to a separate file
* fix docs
* Add some tests for things and other PR feedback
* bump to latest sp deps
* avoid needing substrate-compat feature in a test
2023-01-10 12:02:41 +00:00
Igor Matuszewski
ea5daa444f
ci: Appease Clippy ( #761 )
...
This should make the CI green again, as the lints have been introduced
in a new stable release, outside of the changes made in this repository.
2023-01-10 10:47:07 +00:00
Igor Matuszewski
f0ce26db7b
Add bitvec-like generic support to the scale-bits type for use in codegen ( #718 )
...
* Add bitvec-like generic support to the scale-bits type for use in codegen
* Use nightly 1.66 formatting
* Fix reading input while decoding bit sequences
* Add tests for our DecodedBits wrapper
* Add convenience DecodedBits::(in)to_bits functions
* Don't expose DecodedBits::bit_format
* Re-export scale_bits as peer dependency
* Move subxt::utils into a separate file
* Hide DecodedBits internals
* Don't re-export types from the `bits` module
* Update subxt/src/utils/bits.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* Update subxt/src/utils/bits.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* Address review feedback
* Clarify the byte needed calculation in DecodedBits encoding
* Remove remaining dbg! invocations
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2022-11-24 15:09:20 +01:00
Igor Matuszewski
523534464f
Add and adapt a publish.sh utility script from jsonrpsee ( #723 )
...
* refactor: Explicitly indicate which crates should be published
* chore: Add a convenience publish.sh script
* Update scripts/publish.sh
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* Update scripts/publish.sh
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
* fix: Don't use unsupported -P flag in BSD grep in publish.sh
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com >
2022-11-23 12:30:13 +01:00
Niklas Adolfsson
428bc35ed8
chore: prep release v0.25 ( #717 )
...
* bump versions 0.25
* update changelog
* adjust RELEASE.md
* fix weird formatting
* rephrase bad english
* Update CHANGELOG.md
* Update CHANGELOG.md
* Update CHANGELOG.md
2022-11-16 16:10:31 +01:00
Andrew Jones
389f20ff94
Update substrate crates ( #709 )
...
* Patch all substrate deps to use my substrate branch
* default-features = false causing issus in test-runtime
* Use substrate polkadot release branch
* Use default-features for sp-runtime again :(
* Restore default-features for subxt-cli/sp-core
* Fix module error integration test
* Add Send + Sync bounds to ExtrinsicEvents::iter()
* Elide lifetime
* Revert adding Send + Sync
* Add Sync bound to Rpc::ClientError
* Remove version in subxt-metadata
* Use released crates
* Use released sp-keyring
* Fix sp-keyring deps
* Remove unnecessary sp-keyring default-features = false
2022-11-16 13:21:17 +01:00