Commit Graph

25 Commits

Author SHA1 Message Date
Niklas Adolfsson dc0795b3b9 move fetch metadata to a separate crate subxt_utils_fetchmetadata (#1829)
* macros: feature-gate jsonrpsee/fetch metadata url

* make CI happy

* Update codegen/src/error.rs

* extract `fetch-metdata` to separate crate

* add missing license headers

* introduce subxt-utils crate

* add missing files

* codegen: remove unused hex crate

* fix test build

* move subxt_utils -> subxt_utils_fetchmetadata

* cargo fmt

* runtime-path -> runtime-metadata-path

* Update utils/fetch-metadata/src/lib.rs
2024-10-24 14:45:39 +01:00
Pavlo Khrystenko 3866737b29 Add support for generating metadata from runtime wasm files (#1720)
closes #1660
2024-09-02 11:07:50 +02:00
Tadeo Hepperle f0b72b9104 Add subxt feature in subxt-signer crate to default features (#1193)
* add subxt to subxt-signer default features

* distinguish between native and web in signer

* fix formatting and clippy

* rustfmt
2023-10-06 15:54:14 +02:00
Tadeo Hepperle c8462defab Add proper test Custom values (#1147)
* add proper tests for custom values

* remove try operators

* use sustrate compat for import of hash

* add license and hex

* add script to artifacts.sh

* custom values with ids not in metadata can be accessed in static interface

* fmt and clippy

* access bytes of custom values directly, even if type id wrong

* final fixes

* removing substrate-compat flag from ui tests

* Update subxt/src/custom_values/custom_values_client.rs

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

* remove types access in type generator

* 2 extra lines

---------

Co-authored-by: James Wilson <james@jsdw.me>
2023-09-12 15:46:12 +02:00
James Wilson b4eb406ee5 Add subxt_signer crate for native & WASM compatible signing (#1016)
* Add and use subxt-signer crate for WASM compatible signing

* cargo fmt

* dev keypairs already references

* WIP fix various breakages

* re-jig features to be simpler and various test fixes etc

* doc and web fix

* fix various bits and pieces

* fix a test I broke

* dev-deps can't be linked to in docs, hrmph

* cargo fmt

* another doc link

* document the subxt_signer crate more thoroughly

* move feature flag for consistency

* more docs, no default subxt feature flag on signer, update release instrs

* Add missing license header

* unwrap_inner => into_inner

* extend a test a little to better check derive junctions

* note more clearly that the crypto bits come from sp_core::crypto
2023-06-20 11:32:12 +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
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 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
Alexandru Vasile 8a7c17289a Metadata: Retain a subset of metadata pallets (#879)
* Update cargo.lock to use scale-info v2.4.0

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata: Retain only a subset of the metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* codegen: Generate top level Event

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata: Only retain DispatchError

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata: Export just the retain method

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Retain pallets

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* metadata: Do not include extrinsic metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* retain: Fix clippy

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* test-runtime: Generate per pallet metadata and rs file

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* ui-tests: Check per metadata generated files

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Revert "test-runtime: Generate per pallet metadata and rs file"

This reverts commit 725a2e5f8339a795892dbbd2df19e49330ae3a9b.

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* ui-tests: Adjust path to metadata file

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* ui-tests: Change drop order to keep `PalletMetadata` around

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update metadata/src/retain.rs

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

* Address feedback

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* retain: Keep extrinsic type

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Introduce `MetadataSource`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Use `MetadataSource` helper

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* cli: Use `FileOrUrl` flatten command argument

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* retain: Do not include generic type params in retained metadata

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Adjust subxt to scale-info v2.5.0

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update scaleinfo to v2.5.0

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Remove deprecated fn

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* testing: Fix clippy

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* benches: Use inner fields of scale info

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* address nits, and strip RuntimeCall type instead of trying to filter out use of it for better overall wins/clarity

* fix UI test

* move utils out of commands folder and fix clippy etc

* address nits

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: James Wilson <james@jsdw.me>
2023-04-04 16:16:51 +01: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] 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
dependabot[bot] f8399ca81f Bump trybuild from 1.0.77 to 1.0.79 (#849)
Bumps [trybuild](https://github.com/dtolnay/trybuild) from 1.0.77 to 1.0.79.
- [Release notes](https://github.com/dtolnay/trybuild/releases)
- [Commits](https://github.com/dtolnay/trybuild/compare/1.0.77...1.0.79)

---
updated-dependencies:
- dependency-name: trybuild
  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-06 12:48:41 +02: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] 4c8ffc3073 Bump trybuild from 1.0.76 to 1.0.77 (#807)
Bumps [trybuild](https://github.com/dtolnay/trybuild) from 1.0.76 to 1.0.77.
- [Release notes](https://github.com/dtolnay/trybuild/releases)
- [Commits](https://github.com/dtolnay/trybuild/compare/1.0.76...1.0.77)

---
updated-dependencies:
- dependency-name: trybuild
  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-01-30 10:20:48 +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
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
Niklas Adolfsson d8c2e16151 fix(ci): pin trybuild v1.0.75 (#783) 2023-01-16 16:35:00 +00: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 52d4762d13 Upgrade to scale-info 2.3 and fix errors (#704) 2022-11-01 10:45:06 +01:00
James Wilson 75e383dfcf Prep for 0.24 release (#663)
* Bump versions and update changelog

* tweak text

* merge a couple of related changelog entries
2022-09-22 17:16:04 +01:00
James Wilson a3ea12663e Update version, tweak docs, and write up changelog (#616) 2022-08-11 15:04:50 +01:00
Alexandru Vasile c07b9e4be8 Release v0.22.0 (#574)
* Bump versions to `v0.22.0`

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Add missing crates for releasing chore

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update changelog

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update changelog message & remove non-user facing PRs

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Update CHANGELOG.md

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

* Update CHANGELOG.md

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

Co-authored-by: James Wilson <james@jsdw.me>
2022-06-20 17:07:38 +03:00
James Wilson 9cf63bafac Move test crates into a "testing" folder and add a ui (trybuild) test and ui-test helpers (#567)
* move test crates into a testing folder and add a ui test and helpers

* undo wee mixup with another PR

* cargo fmt

* clippy

* tidy ui-tests a little

* test different DispatchError types

* refactor dispatch error stuff

* name ui tests

* duff => useless

* align versions and cargo fmt
2022-06-17 14:33:58 +01:00