Alexandru Vasile
a5b3669f73
XXX: Adjust to u32::MAX and metaV15 built from IR
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-03-16 18:17:35 +02:00
Alexandru Vasile
8911550234
XXX: Dynamic return type under ValueThunk
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-14 19:38:51 +02:00
Alexandru Vasile
16944ea1fc
XXX/Dynamic: Add dynamic Runtime API calls
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-14 19:30:11 +02:00
Alexandru Vasile
c131c48124
XXX/metadata: Include runtime ty IDs in subxt::Metadata
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-14 18:08:17 +02:00
Alexandru Vasile
a491858ddd
XXX: Include return type for decoding
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-14 16:36:45 +02:00
Alexandru Vasile
90bf22a1fb
XXX: Check nonce value
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-07 19:37:09 +02:00
Alexandru Vasile
ccc53e4580
XXX: Modify polka_runtime.rs
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-07 19:34:55 +02:00
Alexandru Vasile
805d323479
XXX: Extend example: runtime_calls
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-07 19:34:24 +02:00
Alexandru Vasile
26d3123d75
XXX: Codegen export decoding type for the result call
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-07 19:20:42 +02:00
Alexandru Vasile
cd497aba54
XXX: Generate Runtime API
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-07 19:16:19 +02:00
Alexandru Vasile
7038902c74
XXX: Adjust frame-metadata path
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-02 19:38:14 +02:00
Alexandru Vasile
143e31f025
XXX: Backup v15 show md via metadata_at_version
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-02-02 14:46:23 +00:00
Alexandru Vasile
5369888edc
examples: Use substrate as polkadot.scale and print codegen
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-23 10:15:36 +00:00
Alexandru Vasile
044801b08d
XXX: Update metadata
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-20 19:26:02 +00:00
Alexandru Vasile
6be044e706
XXX: Generate runtime API without rpc calls
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-20 19:23:38 +00:00
Alexandru Vasile
92052d6952
XXX: Adjust repo to use V15 metadata
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-20 18:44:58 +00:00
Alexandru Vasile
73c4fa6a1c
XXX: Update cargo.lock to v15
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-20 18:39:51 +00:00
Alexandru Vasile
c6f90e24df
XXX: Adapt to new interface for metadata
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-20 18:34:43 +00:00
Alexandru Vasile
439c8725a2
tests: Use vec! macro for blob creation
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-19 13:13:12 +00:00
Alexandru Vasile
39eb580c30
tests: Ensure correct signing of extrinsics larger than 256 bytes
...
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-19 12:48:33 +00: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
James Wilson
b7a29a5efe
Add ability to set custom metadata etc on OnlineClient ( #794 )
...
* Add _at and _with methods to OnlineClient to allow for more instantiation options
* tweak warnings
* move a confusing comment
* expose ability to set metadata and such in OnlineClient, but remove most _at methods
2023-01-19 10:49:00 +00:00
Kevin Wang
61878cc20a
Fix bad signature when the extrinsic size is over 256 bytes ( #796 )
2023-01-19 10:48:06 +00:00
Alexandru Vasile
c0198acea8
Add Cargo.lock for deterministic builds ( #795 )
...
* Remove Cargo.lock from gitignore
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* cargo: Add `Cargo.lock`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update the releasing process
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-18 16:10:29 +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
kylezs
8ef80638d0
rename subscribe_to_updates() to updater() ( #792 )
2023-01-18 10:05:16 +00:00
kylezs
e036087db7
Expose Update ( #791 )
...
This will allow for use of `apply_update` on the `OnlineClient` which is already exposed as public.
2023-01-17 19:41:12 +01:00
James Wilson
08d6640a6c
Expose version info in CLI tool with build-time obtained git hash ( #787 )
...
* version info with built-time obtained git hash
* clippy
* rerun-if-changed properly and handle git command failing
* cargo fmt
2023-01-17 17:29:12 +00:00
Fredrik Simonsson
c9f414f4ed
Implement deserialize ( #773 )
2023-01-17 09:42:44 +00: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
Alexandru Vasile
a3713476da
Update trybuild to the latest version ( #785 )
...
* Update to trybuild version 1.0.76
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* tests: Adjust testing to the new trybuild location
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-17 09:41:09 +00:00
Alexandru Vasile
24c26e13a5
ci: Print substrate version ( #780 )
...
* ci: Print substrate version
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* ci: Move substrate version to dedicated CI step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Revert "ci: Move substrate version to dedicated CI step"
This reverts commit b83de672d5bd3c2f09b02a598d63fd88a38fd9ab.
* ci: Add version for all steps that download substrate
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2023-01-16 18:43:02 +02:00
abhi
25245ad112
make ChainBlockExtrinsic cloneable ( #778 )
2023-01-16 16:38:07 +00:00
Niklas Adolfsson
d8c2e16151
fix(ci): pin trybuild v1.0.75 ( #783 )
2023-01-16 16:35:00 +00:00
James Wilson
a433082118
Make dependabot less aggressive ( #771 )
...
* Make dependabot less aggressive
And ignore sp- crates, since they need to be updated together, and dependabot can't yet do grouped PRs.
We should periodically just keep on top of this anyway, but I don't think we need to be constantly updating them.
* dependency-name
* Try weekly instead of monthly
2023-01-11 13:33:40 +01:00
James Wilson
a71f32f60d
Fix decoding events via .as_root_event() and add test ( #767 )
...
* fix decoding events via as_root_event and add test
* fmt and clippy
* Update subxt/src/events/events_type.rs
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com >
2023-01-11 11:04:05 +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
Sabaun Taraki
d41f657417
Make verbose rpc error display ( #758 )
...
* Make verbose rpc erro display
* Apply review results
* Minor fix doc-comment
2023-01-09 15:43:50 +01:00
dependabot[bot]
392c1915ca
Bump JasonEtco/create-an-issue from 2.8.2 to 2.9.1 ( #757 )
...
Bumps [JasonEtco/create-an-issue](https://github.com/JasonEtco/create-an-issue ) from 2.8.2 to 2.9.1.
- [Release notes](https://github.com/JasonEtco/create-an-issue/releases )
- [Commits](https://github.com/JasonEtco/create-an-issue/compare/3a8ba796516b57db8cb2ee6dfc65bc76cd39d56d...e27dddc79c92bc6e4562f268fffa5ed752639abd )
---
updated-dependencies:
- dependency-name: JasonEtco/create-an-issue
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-09 15:42:14 +01:00
dependabot[bot]
0ff4e13b83
Bump JasonEtco/create-an-issue from 2.8.1 to 2.8.2 ( #744 )
...
Bumps [JasonEtco/create-an-issue](https://github.com/JasonEtco/create-an-issue ) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/JasonEtco/create-an-issue/releases )
- [Commits](https://github.com/JasonEtco/create-an-issue/compare/77399b6110ef82b94c1c9f9f615acf9e604f7f56...3a8ba796516b57db8cb2ee6dfc65bc76cd39d56d )
---
updated-dependencies:
- dependency-name: JasonEtco/create-an-issue
dependency-type: direct:production
update-type: version-update:semver-patch
...
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>
2022-12-14 13:24:18 +02:00
dependabot[bot]
8484c18624
Bump JasonEtco/create-an-issue from 2.6.0 to 2.8.1 ( #736 )
...
Bumps [JasonEtco/create-an-issue](https://github.com/JasonEtco/create-an-issue ) from 2.6.0 to 2.8.1.
- [Release notes](https://github.com/JasonEtco/create-an-issue/releases )
- [Commits](https://github.com/JasonEtco/create-an-issue/compare/9e6213aec58987fa7d2f4deb8b256b99e63107a2...77399b6110ef82b94c1c9f9f615acf9e604f7f56 )
---
updated-dependencies:
- dependency-name: JasonEtco/create-an-issue
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>
2022-12-02 10:56:33 +00:00
Alexandru Vasile
463e2aa93f
rpc: Expose the subscription ID for RpcClientT ( #733 )
...
* rpc: Extend `RpcClientT` to return the subscription ID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* rpc: Return `RpcSubscriptionId` for jsonrpsee clients
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* rpc: Expose subscription ID via subxt subscription
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* examples: Adjust example to return subscription ID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* rpc: Add structure for subscription stream and subscription id
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
2022-11-25 17:07:26 +02: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
Francisco Miguel García
a80d6cfd30
Add --derive-for-type to cli ( #708 )
...
* Add `--derive-for-type` to cli
* Remove clippy warnings
2022-11-23 15:25:32 +00:00
Igor Matuszewski
702e87e58d
Remove a soon-to-be-removed const_err lint ( #731 )
...
Removed in Rust 1.66:
```
warning: lint `const_err` has been removed: converted into hard error, see issue #71800 <https://github.com/rust-lang/rust/issues/71800 > for more information
--> subxt/src/lib.rs:114:5
|
114 | const_err,
| ^^^^^^^^^
|
= note: `#[warn(renamed_and_removed_lints)]` on by default
```
2022-11-23 16:08:26 +01:00
Alexandru Vasile
1c9aabf0f5
events: Fetch metadata at arbitrary blocks ( #727 )
...
* subxt/rpc: Fetch metadata at arbitrary blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* subxt/events: Fetch metadata for events at arbitrary blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Revert "subxt/events: Fetch metadata for events at arbitrary blocks"
This reverts commit 381409b7a8916611d7c44dc6ad58a90993b6c297.
* subxt/events: Custom constructor with metadata for events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* Update subxt/src/events/events_type.rs
Co-authored-by: James Wilson <james@jsdw.me >
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: James Wilson <james@jsdw.me >
2022-11-23 16:03:04 +02: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
Igor Matuszewski
8b46f5c786
Retain Rust code items from mod decorated with subxt attribute ( #721 )
...
* refactor: Simplify collecting type substitutes
* Simplify ItemMod::from
* Preserve inner Rust items when expanding the subxt::subxt macro
* No named lifetimes
* Update codegen/src/api/mod.rs
Co-authored-by: Andrew Jones <ascjones@gmail.com >
* Move passing UI tests under `ui_tests`
Co-authored-by: Andrew Jones <ascjones@gmail.com >
2022-11-23 12:28:49 +01:00