Skip to main content

Questions tagged [metadata]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9 votes
1 answer
162 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 ...
islami00's user avatar
  • 561
7 votes
0 answers
93 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 ...
Farcaller's user avatar
  • 158
6 votes
3 answers
333 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 ...
Werner S's user avatar
  • 629
5 votes
1 answer
175 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<...
William Freudenberger's user avatar
5 votes
1 answer
151 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 ...
PaperFrog's user avatar
  • 495
4 votes
2 answers
144 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(#...
PaperFrog's user avatar
  • 495
4 votes
1 answer
68 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.
Pavel Golovkin's user avatar
4 votes
2 answers
129 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, ...
Xiu Hung's user avatar
  • 527
4 votes
2 answers
58 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 ...
Alex Bean's user avatar
  • 5,757
3 votes
1 answer
145 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 ...
islami00's user avatar
  • 561
3 votes
1 answer
119 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 > ...
Alex Bean's user avatar
  • 5,757
3 votes
1 answer
206 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 ...
Yury Yukhananov's user avatar
3 votes
0 answers
46 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 ...
Hugo Trentesaux's user avatar
2 votes
1 answer
168 views

Why this metadata.json is not valid

{ "source": { "hash": "", "language": "Ask! 0.4.0", "compiler": "asc 0.19.23" }, "contract": { &...
user2999's user avatar
2 votes
1 answer
52 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
Mrisho Lukamba's user avatar
2 votes
1 answer
55 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 ...
Simson's user avatar
  • 1,201
2 votes
1 answer
63 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 ...
Robert La Ferla's user avatar
2 votes
1 answer
61 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 "...
mr_bovo's user avatar
  • 171
2 votes
1 answer
48 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
Abel's user avatar
  • 61
2 votes
1 answer
53 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 ...
Kyle's user avatar
  • 311
1 vote
1 answer
55 views

How can i update polkadot js metadata from inside my app?

i need to check in my dapp when the metadata of my wallet is expired and show a popup telling the user that he needs to update his metadata by clicking an update button on that popup. i need to do ...
Nikola Grujičić's user avatar
1 vote
1 answer
46 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 ...
boundless-forest's user avatar
1 vote
1 answer
215 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?
cibou's user avatar
  • 131
1 vote
1 answer
22 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/...
Wil W's user avatar
  • 433
1 vote
1 answer
28 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 ...
Squirrel's user avatar
  • 3,849
1 vote
2 answers
15 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 ...
JoshOrndorff's user avatar
  • 1,201
1 vote
1 answer
32 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 ...
JoshOrndorff's user avatar
  • 1,201
1 vote
1 answer
84 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 = ...
Antonio Antonino's user avatar
1 vote
1 answer
53 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 ...
Abel's user avatar
  • 61
1 vote
1 answer
76 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 / ...
Drew Stone's user avatar
  • 1,194
1 vote
0 answers
119 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 ...
cibou's user avatar
  • 131
0 votes
2 answers
48 views

No metadata hash in transaction

I see from the RFC (https://github.com/polkadot-fellows/RFCs/blob/main/text/0078-merkleized-metadata.md#inclusion-in-an-extrinsic) that it's possible to not provide the hash when crafting a polkadot ...
dierreh's user avatar
0 votes
1 answer
62 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 (...
Andy's user avatar
  • 73
0 votes
1 answer
80 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....
Dan Forbes's user avatar
0 votes
0 answers
15 views

Tool for Automatic Generation of Contract Wrapper Code from Ink Metadata

I am currently exploring ways to streamline the process of interacting with contracts on the Pallet Contracts. One challenge I've encountered is the need to manually write wrapper code for contracts ...
Luca Auet's user avatar