-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata V15: Generate Runtime APIs #918
Merged
Merged
Changes from 66 commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
8af6a40
Update frame-metadata to v15.1.0
lexnv dd89dd6
Enable V15 unstable metadata in frame-metadata
lexnv 073aea9
metadata: Move validation hashing to dedicated file
lexnv 3c2d78a
Use sp-metadata-ir from substrate to work with metadata
lexnv d2d29dc
Revert using sp-metadata-ir in favor of conversion to v15
lexnv a795b62
metadata: Convert v14 to v15
lexnv 98360c3
metadata: Use v15 for validation
lexnv 04dc695
codegen: Use v15 for codegen
lexnv 47d84bc
metadata/bench: Use v15
lexnv 365e78d
Adjust to v15 metadata
lexnv 9302fa2
Adjust testing
lexnv dd48979
Merge remote-tracking branch 'origin/master' into lexnv/metadata_v15
lexnv bc2cf2a
Merge remote-tracking branch 'origin/master' into lexnv/metadata_v15
lexnv f52b92b
Merge remote-tracking branch 'origin/master' into lexnv/metadata_v15
lexnv 9da2bf3
Merge remote-tracking branch 'origin/master' into lexnv/metadata_v15
lexnv 7f3931a
Improve documentation
lexnv 4663300
force CI
lexnv 334f7fb
rpc: Fetch metadata at version
lexnv 15ddaaa
artifacts: Update polkadot.scale from commit 6dc9e84dde2
lexnv 78fafe6
codegen: Fetch V15 using the new API
lexnv 561c16d
codegen: Add runtime API interface
lexnv d7141ec
metadata: Hash runtime API metadata for validation
lexnv d7652e5
metadata: Extract runtime API metadata wrapper from subxt::Metadata
lexnv 21741d8
subxt: Adjust hashing cache to reflect root+item keys
lexnv bff5b7c
rpc: Add raw state_call API method
lexnv 2546520
runtime_api: Add payload with static and dynamic variants
lexnv c1c8fd4
subxt: Allow payloads to call into the runtime
lexnv 0f8a86d
examples: Add example to make a runtime API call both static and dynamic
lexnv d1229e7
Update polkadot.rs
lexnv 16474c7
Merge remote-tracking branch 'origin/master' into lexnv/add_runtime_api
lexnv 67d63b3
codegen: Simplify client fetching
lexnv 82548ce
Address feedback and fallback to old API if needed
lexnv 9f7d26e
runtime_api: Make mutability conditional on input params
lexnv 1b60e89
Regenerate polkadot.rs
lexnv ae35fa7
metadata: Retain only pallets without runtime API info
lexnv df8e3b2
codegen: Retry via `Metadata_metadata` without conversion
lexnv ce2d6d6
payload: Remove `Decode` and change validation fn
lexnv 8cfdbe3
Merge branch 'master' into lexnv/add_runtime_api
lexnv 26688d3
metadata: Retain runtime API types
lexnv 57790d6
codegen: Runtime APIs documentation based on flag
lexnv a58fbdc
Update examples/examples/custom_metadata_url.rs
lexnv fc5a952
Merge remote-tracking branch 'origin/lexnv/add_runtime_api' into lexn…
lexnv e355c14
Update artifacts from polkadot-a6cfdb16e9
lexnv 320f260
Update polkadot.rs with polkadot-a6cfdb16e9
lexnv 5754c09
codegen: Generate input structures for runtime API
lexnv 719a004
runtime_api: Remove the static paylaod and use single impl
lexnv c8b3fee
examples: Fetch account nonce
lexnv cd9d1e6
testing: Adjust build script to fetch latest metadata
lexnv df24528
testing: Check account nonce from runtime API
lexnv ff6efca
Update cargo.lock
lexnv 7bd91ff
codegen: Fix doc generation for runtime types
lexnv b597b5d
Merge remote-tracking branch 'origin/master' into lexnv/add_runtime_api
lexnv ee9e679
codegen: Rename `inputs` runtime calls module to `types`
lexnv 834e3ad
codegen: Generate Calls structs inside the types module
lexnv 3866c6b
testing: Check Alice account nonce before submitting the tx
lexnv 69f5322
cli: Add metadata version option flag supporting v14 and unstable
lexnv 014b758
cli: Specify version to fetch
lexnv 334ee4c
subxt: Fallback to fetching latest stable metadata
lexnv dc3433c
subxt: Add unstable-metadata feature to fetch the latest
lexnv f74cf75
Merge branch 'master' into lexnv/add_runtime_api
lexnv 2d8e68d
RuntimeVersion with Latest and Version(u32)
lexnv 4273fb7
Update polkadot.rs
lexnv ff64caa
codegen: Adjust fetch_metadata to inspect version list
lexnv b6f5f7b
Merge remote-tracking branch 'origin/master' into lexnv/add_runtime_api
lexnv 9e02da4
testing: Adjust metadata to metadata_legacy
lexnv 0e17af5
events: Adjust docs to use metadata_legacy
lexnv b336ff3
have a pass over fetch_metadata
jsdw 4138b6a
cargo fmt
jsdw 05ebbe0
Option<String> when fetch metadata via latest API
jsdw bd665d1
clippy
jsdw 9c92ade
fmt
jsdw f16525d
cli: Use the MetadataVersion from codegen
lexnv e632b66
Merge remote-tracking branch 'origin/lexnv/add_runtime_api' into lexn…
lexnv 9bf0f66
cli: Specify latest as default for MetadataVersion
lexnv 0655df8
Merge remote-tracking branch 'origin/master' into lexnv/add_runtime_api
lexnv f29c048
cli: Remove version from metadata and use the one from file_or_url
lexnv a032374
Fix clippy
lexnv 0ea32fc
codegen: Decode metadata independently for different RPC calls
lexnv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe just manually have an
into_codegen_metadata_version(metadata_version: Option<MetadataVersion>) -> CodegenMetadataVersion
so we don't have to hardcode the 14 here (I'm trying to get away from assuming anything about what the node has in terms of metadata versions :))?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or clap has
default_value = <str>
which we could use so thatMetadataVersion
could have aLatest
variant and clap will default to using that. (maybe we can just useCodegenMetadataVersion
directly in that case?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense! Have ended up using just the
CodegenMetadataVersion
here :D Thanks!