Questions tagged [parse]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
31 views

How to convert a u32 into a BoundedVec compatible format?

I am using a BoundedVec as the id for a storage map, and intend to transform a u32 value into a compatible format. Is there a streamlined way to accomplish this, or should I split the u32 into smaller ...
4 votes
1 answer
124 views

Serialisation of Extrinsic objects

Generating transaction via ApiPromise through api.tx.xxx method generated a SubmittableExtrinsicFunction object. Which has a toJSON() function that return what I would call a raw transaction. Is there ...
2 votes
1 answer
186 views

Parsing XCM Inbound Messages

A cross chain transfer generates several extrinsics depending on the number of hops. In this example: https://kusama.subscan.io/xcm_message/kusama-3c38ab02a51980022f63af373d4cad977cb9405b we have a ...
6 votes
2 answers
129 views

How to parse/match a specific frame_system event?

From the following function I can read the frame_system events: let events = frame_system::Pallet::<T>::read_events_no_consensus(); the above provides me the following example array: ...
2 votes
1 answer
694 views

How to convert Vec<u8> to u32 in Substrate runtime?

AFAIK, we can't use std in Substrate WASM runtime, what is the most effective way to convert a string to a number in runtime. For example: string "48" in Vec to 48 in u32.