Questions tagged [metadata]
The metadata tag has no usage guidance.
34
questions
2
votes
1
answer
43
views
Is there a build artefact for the runtime metadata?
You can download the metadata of a running node by calling the state_getMetadata RPC. But if I'm compiling a node, is the metadata built anywhere?
Ideally I'd rather not have to start the node to get ...
1
vote
1
answer
32
views
Is there a way to reconstruct the rust types from the runtime metadata?
It's possible to get the metadata information using the state_getMetadata RPC method. Then I want to reconstruct the corresponding rust types described in the metadata json type registry and decode ...
1
vote
2
answers
12
views
What is the purpose of the `contracts_runtime.scale` file in the `cargo-contracts` repository?
Cargo Contract is a popular tool for developing ink! contracts.
This tool is known to work well with the substrate contracts node, and I thought it should work with other chains that support pallet ...
4
votes
2
answers
56
views
WebAssembly runtime file into ValidationCode
I have a CLI tool that gets a WebAssembly runtime file:
let validation_code_content = fs::read_to_string(path_validation_code)
.expect("Should have been able to read the validation code ...
3
votes
0
answers
35
views
How to get runtime types in polkadotjs (typescript)
In subxt we can have Rust types directly from scale-encoded runtime metadata. Is the same possible in polkadotjs? Is there a "polkadots" which has typescript types automatically derived from ...
2
votes
1
answer
57
views
Metadata(PalletNotFound) with subxt
I am using subxt to get the list of parachains on the Polkadot network. Firstly I used the subxt-cli tool to download the metadata:
subxt metadata --url https://rpc.polkadot.io:443 -f bytes > ...
3
votes
1
answer
145
views
How to encode an extrinsic for RPC from a web client?
I need to programmatically pack an extrinsic for an RPC, I believe I'm looking for the following front-end functionality:
extract relevant indices from the Metadata
fill the extrinsic parameters
...
1
vote
1
answer
30
views
In a FRAME runtime, where is the metadata actually constructed?
I'm trying to figure out where in the runtime's codebase the metadata that describes it is constructed.
I've read all about the different versions of metadata and explored how they represent runtimes ...
2
votes
1
answer
45
views
How to get Runtime types and Runtime (PalletCustomOrigins) from subxt metadata.scale
The main aim is to get Governance Origins using subxt from the encoded metadata
7
votes
0
answers
76
views
Why do clients have to hardcode the extra types in the registry?
Context: I'm experimenting with an H160-address based substrate and I'm doing it from scratch (it's not a moon* or frontier template fork).
It's reasonably trivial to make changes to the substrate ...
2
votes
1
answer
39
views
TwoX128 hash for rpc.state.metadata pallet names not being a prefix for storage key
Following this tutorial: https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/
we should have that a pallet named "Members" should have prefix "...
0
votes
0
answers
27
views
How to use frame-metadata v12 to decode the storage data of chain?
Some blockchains are using metadata v12, like stafi, so is there any detailed example using Rust to decode the storage data dynamically? that don't depend any struct
like metadata v14 example:
pub fn ...
1
vote
1
answer
66
views
How to generate augmented types from V14 metadata generated with subwasm
The common way of generated type augmentation is by fetching the latest metadata from a running node with the following piece of code:
await provider.connect()
await provider.isReady
const result = ...
1
vote
1
answer
17
views
Custom Metadata Command Returnning Incorrect Data
I have written a command that exports the metadata at the CLI which /should/ duplicate the results of state_getMetadata.
Full Source Code: https://github.com/LibertyDSNP/frequency/blob/main/node/cli/...
2
votes
1
answer
51
views
Stable scale encoded events from ink contract
How to obtain a stable encoding of emitted events from a smart contract?
I have a smart contract which emits events when these events are later fetched from the chain:
#[ink(event)]
pub struct ...
2
votes
1
answer
52
views
Tool to generate human readable JSON of Substrate node metadata from a file?
The cli tool subwasm can get the metadata from a live node (url) and output JSON that is human readable. However, to troubleshoot various issues, I need a tool that generates human readable JSON from ...
0
votes
0
answers
49
views
Running cron job for metadata portal?
I have to pull down the latest metadata from each chains to sign. However, I do not see a script in the metadata-portal repo for running that cron job. Is that in a separate repo?
I'm probably going ...
1
vote
1
answer
40
views
When the blockchain upgrades the runtime, the upgraded height uses which metadata?
for example
the blockchain is upgraded at 1000 height(including systems code updates event), and I need to decode the storage data by metadata at 1000 height, which metadata do I need to use, is it ...
2
votes
1
answer
40
views
How use Metadata deocde Vec::<EventRecord<Event, H256>>
first get the system eventData state_getStorage api
now i need to decode the system eventData by metadata
is there some example how to decode it ?
for some reaseon ,only rust worker it ,thanks
1
vote
1
answer
65
views
Getting more call metadata from a generic call
I'm trying to build a somewhat generic, somewhat specific call dispatcher that allows me to inspect metadata about the call in order to constrain it by either
call index / pallet index
call name / ...
1
vote
0
answers
94
views
Metadata V12 / V14
We just migrated from substrate v3 to substrate v4, after that I expected to have metadata V14 when I'll call state_getMetadata rpc method.
but I still get V12 metadata and I don't understand why.
If ...
1
vote
1
answer
166
views
Get Metadata inside custom rpc call
Hello I am creating custom rpc call, I need metadata to be able to decode extrinsics call inside my calls.
But I don't know how to get substrate metadata inside my rpc call?
2
votes
1
answer
166
views
Why this metadata.json is not valid
{
"source": {
"hash": "",
"language": "Ask! 0.4.0",
"compiler": "asc 0.19.23"
},
"contract": {
&...
5
votes
1
answer
158
views
Migrate keytype of StorageMap without breakin API
Assume we have a StorageMap MyMap of which we want to extend the type of the decoded keys from KeyTypeOld to an enum including the old type as well as a new one.
Before
pub type MyMap = StorageMap<...
0
votes
1
answer
42
views
How to parse the data returned by the HTTP request RPC (state_getmetadata)?
https://github.com/emeraldpay/polkaj
I request the RPC method state through the method provided by the SDK linked above_ GetMetadata, but metadata cannot be resolved. There will be an error (...
1
vote
1
answer
26
views
At this point in time will one version of the metadata decode all blocks from genesis to the latest on a single parachain?
I understand that every so often the metadata version gets changed with runtime upgrades over time. What I'm not clear about is how does this affect trying to access the older blocks?
Today, will one ...
0
votes
1
answer
76
views
How to Determine Transaction Interface
In Substrate code, there is logic to determine the way in which extrinsics should be submitted to the runtime (ref: https://github.com/paritytech/substrate/blob/v3.0.0/client/transaction-pool/src/api....
4
votes
2
answers
118
views
RPC full type specification from metadata
Since metadata v14 and scale-info were introduced, the runtime fully specifies all runtime interfaces and types. On the RPC side however the rpc_methods only returns the list of methods exposed, ...
6
votes
3
answers
216
views
How do I check what metadata version a chain is running?
I'm quite new at this, but I'm having trouble understanding the "metadata version".
My confusion stems from the fact that I know that Polkadot/Kusama has upgraded to v14 a while back, but I ...
3
votes
1
answer
128
views
How does typegen work with metadata v14?
In the new metadata v14, a types.json is no longer required for custom types. How does this affect the typegen procedure in the docs which require us to specify these types in the definition.ts for ...
9
votes
1
answer
127
views
What are type bundles and versioned metadata?
I was exploring typegen for my node's custom types and came across these two concepts in the acala.js codebase in the type-definitions package (their use of a "types-bundle.json"), and ...
4
votes
2
answers
109
views
Can the metadata of Polkadot change?
As far as I know, the metadata of Polkadot is version 14.
Assuming that the metadata version is not updated,
Can the metadata of the recent block be different?
ex) Block(#9135844)'s metadata != Block(#...
5
votes
1
answer
129
views
What is the difference between Metadata and FRAME-Metadata?
What is the difference between Metadata and Metadata Type Definitions in Substrate?
Also, when I do the state_getMetadata RPC call I get the metadata. It is rather long. Is there a way to cache this ...
4
votes
1
answer
63
views
How to migrate to metadataV14
I have a live network working on Substrate V3 and MetadataV12. How can I migrate to the MetadataV14?
The MetadataV14 is a part of the Substrate V4. Unfortunately Substrate V4 isn't released.