* 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
* 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
* Move Extrinsic decoding things to subxt_core and various tidy-ups
* A couple more fixes and fmt
* first pass moving tx logic to subxt_core
* cargo fmt
* fix wasm example
* clippy
* more clippy
* WIP Adding examples and such
* Move storage functionality more fully to subxt_core and nice examples for storage and txs
* Add example for events
* consistify how addresses/payloads are exposed in subxt-core and add runtime API fns
* Add runtime API core example
* fmt
* remove scale-info patch
* Add a little to the top level docs
* swap args around
* clippy
* cargo fmt and fix wasm-example
* doc fixes
* no-std-ise new subxt-core additions
* alloc, not core
* more no-std fixes
* A couple more fixes
* Add back extrinsic decode test
* start migrating, broken
* first iteration of updating
* fmt and clippy
* add Composite<u32> decoding via scale value patch
* bump scale type gen versions
* fix decoding with new scale decode
* compiling with changed deps
* core utils, condig, client, metadata
* core crate compiling
* signer crate no once lock
* add core to no-std-tests, change imports
* broken commit, start pulling everything together in subxt
* port more things to subxt
* events in core crate, extrinsics sadly much more difficult
* almost all examples pass again
* dynamic values fix in examples
* fix no std issue and fmt
* remove unused dependencies
* fix lightclient impl
* runtime version refactor
* formatting and addressing nits
* more comments addressed
* update wasm example and no-std-signer tests
* other nits and error impl on signer errors
* fix feature flag
* fix runtime version refactor
* fix doc links
* fix integration tests
* fix feature flag gated client state
* fix native feature in CI
* fix lightclient utils
* make imports more lean in subxt-core
* integrate changes from subxt-core imports into subxt
* other changes in subxt simplify imports more
* fix and docs
* doc false for cli
* fix clippy
* remove events block hash in tests
* codegen no-std support in generated code
* export alloc crate for no-std codegen
* fix doc test
* implement James comments
* remove std traits, use core traits instead
* address nits
* remove unusued dep in no-std tests
* fix Box import in no_std
* sp-crypto-hashing instead of sp-core-hashing
* bump scale-typegen, add no std codegen tests
* fix some things
* replace unmaintained derivative with derive_where to remove non-canonical warnings
* fmt
* remove unused dep
* fix deps
* update artifacts to fix type ID mismatches
* bump to latest scale-typegen
---------
Co-authored-by: James Wilson <james@jsdw.me>
* generate docs for feature-gated items on crates.io
* add newline in Cargo.toml
* unify newlines
* fix clippy
* introduce macros for features
* commit missing file
* Update subxt/src/lib.rs
* make it compile
* integrate scale-typegen, remove types mod
* reintroduce default substitutes and derives
* support runtime_types only again
* generating polkadot.rs ok
* update scale-typegen to discrete error types
* scale-typegen-api-changes
* add note about UncheckedExtrinsic in default substitutes
* add resursive attributes and derives
* adjust example where Clone bound recursive
* move scale-typegen dependency to workspace
* expose default typegen settings
* lightclient: Fix wasm socket closure called after being dropped (#1289)
* lightclient: Close wasm socket while dropping from connecting state
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Construct one time only closures
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Enable console logs for lightclient WASM testing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Separate wakes and check connectivity on poll_read
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Close the socket depending on internal state
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "lightclient: Separate wakes and check connectivity on poll_read"
This reverts commit 866094001d4c0b119a80ed681a74b323f74eae1b.
* lightclient: Return pending if socket is opening from poll_read
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Close the socket on `poll_close`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Reset closures on Drop to avoid recursive invokation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* lightclient: Close the socket if not already closing
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* workflows: Install rustup component for building substrate (#1295)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Command to fetch chainSpec and optimise its size (#1278)
* cli: Add chainSpec command
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli/chainSpec: Move to dedicated module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Compute the state root hash
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Remove code substitutes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Update polkadot.json
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* scripts: Generate the chain spec
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Remove testing artifacts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Apply rustfmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Introduce feature flag for smoldot dependency
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli: Rename chain-spec to chain-spec-pruning
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* scripts: Update chain-spec command
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* remove comments and unused args
* Update substrate- and signer-related dependencies (#1297)
* update crypto dependencies, adjust keypair
* add scale_info::TypeInfo derive in some places
* add multi signature derive
* fix lock file
* fix lock file again :|
* adjust to new interface in scale-typegen
* use released scale typegen
* reintroduce type aliases
* introduce type aliases again using scale-typegen
* cargo fmt and clippy
* reconcile changes with master branch
* update polkadot.rs
* bump scale-typgen to fix substitution
* implemented Alex suggestions, regenerated polkadot.rs (did not change)
* resolve conflicts in Cargo.lock
* make expect messages more clear
* correct typos
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
* add insecure url checks
* rename variables
* add feature flags to expose Url properly
* fix test compile error
* fix feature errors
* remove comment
* add url crate and use it for url parsing
* fix compile errors
* satisfy the holy clippy
* fix typos and host loopback
* macro attribute, provide validation function in utils
* fix expected output of ui tests
* remove the success case for --allow-insecure because we cannot establish ws:// connection at the moment.
* codegen: Generate type alias for storage return types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Generate type alias for call function arguments
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Update polkadot.rs code from commit 2e2a75ff81
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Type aliases for runtime API parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Type alias for runtime apis output
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* storage: Change path of the aliased module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Adjust module indentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Do not alias for api::runtime_types with unresolved generics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Fix and document runtime API alias generation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update artifacts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update cargo.lock file
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Generate composite structs with alias unnamed fields
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Update polkadot.rs file
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Alias storage unnamed parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* examples: Change polkadot to rococo runtime
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Fix compiling tests in the codegen crate
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Extend storage test with alias module
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli/tests: Adjust exepcted commands to the latest metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Remove missleading comment and docs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Ensure unique names for generated runtime API types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen/tests: Test expected runtime type generation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen/tests: Check duplicate params in runtime APIs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen/tests: Test colliding names of type aliases and parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Separate alias module from struct definition
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Remove outdated docs from composite def
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Remove unstable lints that cause compile warnings
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Switch to workspace lints
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Fix codec package at root level
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Move profiles to the root level
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix lightclient and metadata crates
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "cargo: Fix codec package at root level"
This reverts commit cdf9e1628d708a972673eb3a9e967b6896edbd73.
* Fix complexity clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Remove lints to be replaced by `cargo machete`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Remove unused dependencies (detected by machete)
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Add machete step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cargo: Bump rust version
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Rename machete step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Rename cargo machete step
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* add web feature to subxt codegen
* add getrandom
* remove compile error
* metadata: Generate runtime outer enums if not present in V14 (#1174)
* metadata: Extend outer enum generation for V14
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Generate outer enums if not present
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Porpagate v14 error instead of panic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Try to find `RuntimeCall` then `Call` enums
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Ensure the returned type is variant for outer enums
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Replace or with or_else
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Apply clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Return error and generate only `RuntimeError`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Remove modified path
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/tests: Check missing runtime types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* add empty use of getrandom
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com>
Co-authored-by: James Wilson <james@jsdw.me>
* 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>
* work in progress
* add custom types access
* nit
* custom values client
* adjust light client
* adjust doc comments
* adjust book for custom values in code gen
* format and check docs
* work in progress
* add custom types access
* nit
* custom values client
* adjust light client
* codegen and validation
* adjust docs
* use ignore in docs in book
* change iter implementation
* use validation hash and other codegen changes
* add ui test for custom values codegen
* allow 'latest' metadata to be returned from the fallback code (#1127)
* nits
* fix validation check
* fix comments
* nits
---------
Co-authored-by: James Wilson <james@jsdw.me>
* refactor: support default port in URL
Update jsonrpsee to v0.20 to support the default port number in URLs.
* fix nit, revert web feature
* fix lightclient code
* codegen: Add uncheckedExtrinsic substitute
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Add uncheckedExtrinsic replacement
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Test uncheckedExtrinsic encoding
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Apply clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Implement encode_to instead of encode for uncheckedExtrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Remove encode_as_fields from uncheckedExtrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: Extend the UncheckedExtrinsic interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: Use Static<Encoded> for uncheckedExtrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: Remove extra impl on the uncheckedExtrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: Add back the EncodeAsType
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: Simplify the decode_as_type
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: Use encode_as_type
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: impl Decode for UncheckedExtrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update subxt/src/utils/unchecked_extrinsic.rs
Co-authored-by: James Wilson <james@jsdw.me>
* utils: Apply cargo fmt
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils: Check encoding / decoding of uncheckedExtrinsic
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* utils/tests: Use an already encoded tx bytes to start with
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>
* Update frame-metadata to the latest branch
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Add outer enum types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Extend the extrinsic with address,call,sign,extra types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Codegen test Event, Error and Call for outer enums
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "Codegen test Event, Error and Call for outer enums"
This reverts commit db542dca0369eedd257a7ec031d5b5549bc46a88.
* Update frame-metadata from the latest release
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update scale-info
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen/error: Support v15 message
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Convert v14 to v15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/retain: Adjust to extrinsic type for V15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/validation: Adjust hashing for extrinsic types V15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* scripts: Fetch V15 and output codegen for full_client only
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt/blocks: Use extrinsic types directly
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Fetch V15 for build script
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Generate from latest polkadot version
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Fetch legacy with old API for v14 only
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc: Fetch metadata versions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* client: Fetch latest unstable then V15 then V14
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Adjust testing API to latest interface
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjust clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Generate the `RuntimeError` type for V14
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Remove testing files
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing/staking: Remove controller account from bond
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/validation: Use specific variants for hashing RuntimeCall
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* XXX: Custom Substrate binary: must revert with next release
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* XXX: To revert: CI use hardcoded substrate
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Use v15 outer enum types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Retain outer enum types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* codegen: Use outer enum types instead of generating them
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update artifacts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Revert "XXX: Custom Substrate binary: must revert with next release"
This reverts commit e9705298661919f5769720b35030759fb8a7b01d.
Revert "XXX: To revert: CI use hardcoded substrate"
This reverts commit b18a5a0985a56ee4ad99bc9a1c0f9cd733cf4271.
* testing: Include env for dummy wat contracts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Adjsut clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Use new link for fetching latest substrate binary
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tests: Include dummy RuntimeEvent into test metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* ci: Bump light-client timeout tests to 25min
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/validation: Use specific pallets as provided
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* testing: Rename metadata constant
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Use call_ty instead of signature_ty
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Rename retaining variant function
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Use Option<&[&str]>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* online_client: Fetch V15 metadata explicitely
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/validation: Include the hash of the outer enum types
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Fix sign typo
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Update the artifacts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Remove RootError RootEvent and RootExtrinsic traits
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update polkadot.rs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/tests: Ensure outer enum variants are retained
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* scripts: Include multiple pallets for our decoding purposes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Apply clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* artifacts: Update small metadata
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* error: Keep raw bytes for the ModuleError representation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* error: Modify docs to not include links
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt/tests: Propagate `RuntimeCall` to outer enums
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* subxt: Provide proper byte slice for decoding
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update artifacts
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* cli/tests: Adjust expected pallets message
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Test conversion from v14 to v15
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata: Fix typo
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update subxt/src/blocks/extrinsic_types.rs
Co-authored-by: James Wilson <james@jsdw.me>
* metadata: Simplify type path for RuntimeError
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* metadata/validation: Use visited ids per outer enum
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* error: Remove RawModuleError
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Fix new clippy error from updated rust version
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>
* modify code gen
* cargo fmt
* fix return
* move the runtime_apis static
* small layout change
* tidy up metadata UI testing and test validation function too
* fix validation tests to point to metadata
* update codegen
* fix clippy and tests
* tweak a comment
* rename validate_codegen => is_codegen_valid_for
---------
Co-authored-by: James Wilson <james@jsdw.me>
* add `#[allow(rustdoc::broken_intra_doc_links)]` to subxt-codegen
* Add for "main" codegen path too
---------
Co-authored-by: James Wilson <james@jsdw.me>
* WIP new Metadata type
* Finish basic Metadata impl inc hashing and validation
* remove caching from metadata; can add that higher up
* remove caches
* update retain to use Metadata
* clippy fixes
* update codegen to use Metadata
* clippy
* WIP fixing subxt lib
* WIP fixing tests, rebuild artifacts, fix OrderedMap::retain
* get --all-targets compiling
* move DispatchError type lookup back to being optional
* cargo clippy
* fix docs
* re-use VariantIndex to get variants
* add docs and enforce docs on metadata crate
* fix docs
* add test and fix docs
* cargo fmt
* address review comments
* update lockfiles
* ExactSizeIter so we can ask for len() of things (and hopefully soon is_empty()
* Ensure unique types in codegen
* tweak comment
* Test the duplicate type codegen stuff
* appease clippy
* fix import
* add another test for generics being de-duplicated
* cargo fmt
---------
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>