Questions tagged [decode]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
3 answers
87 views

Decoding Polkadot/Kusama transactions in Rust

I would like to inspect transactions (extrinsics) in a given block to potentially: Find different types of transactions and their parameters Look through all transactions included in the block and ...
Szymig's user avatar
  • 183
3 votes
1 answer
52 views

Implications of invalid encoded extrinsic calls

We are seeing the following error whenever an invalidly encoded but properly signed extrinsic is submitted in our substrate based chain. { "jsonrpc": "2.0", "error&...
Aramik M's user avatar
0 votes
2 answers
53 views

How to decode an error that happened in a proxy.proxy call

I'd like to show my users if an error occurred while doing a proxy.proxy call. While I know how to decode a system.ExtrinsicFailed, as this is well documented, I have difficulties finding the correct ...
Tbaut's user avatar
  • 253
2 votes
2 answers
98 views

Decode preimages Bounded Dispatchable Call on a client side

I'm using Bounded trait from preimages frame that allows to store dispatchable calls, e.g. similar to the one that is used in pallet-democracy: pub type CallOf<T> = <T as frame_system::Config&...
Oleg Kalenik's user avatar
2 votes
1 answer
62 views

Reading arguments in chain extension

I have a question about reading data in a chain extension. To be precise, I'm concerned about methods Environment<_,_,_,S: BufIn>::read*. Do I understand correctly, that every such function ...
pmikolajczyk41's user avatar
0 votes
1 answer
71 views

Decoding extrinsic hex into readable form in Rust

I am running the substrate-dev node. Made a transaction using Polkadot-explorer. After fetching the block using subxt I am getting extrinsic hex as: ...
Rusty Pythonic Script's user avatar
0 votes
0 answers
135 views

Polkadot Explorer: decode storage system.events

I was doing some testing and sent a transaction on a custom substrate chain. On the polkadot explorer, the block which held the transaction had an error. The transaction completed; however, the ...
cboo's user avatar
  • 1
4 votes
1 answer
147 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
3 votes
2 answers
180 views

How does the encoded transaction in `Transact` turn into decoded transaction `call` when executing instructions in XCM?

let message_call = call.take_decoded().map_err(|_| XcmError::FailedToDecode)?; https://github.com/paritytech/polkadot/blob/master/xcm/xcm-executor/src/lib.rs#L342 I got this code above and tried to ...
Guantong's user avatar
  • 1,588
4 votes
1 answer
202 views

How can I decode an extrinsic or event dynamically in rust?

How can I decode an extrinsic or event dynamically in rust? (I want to be able to decode across all parachains) A lot of the heavy lifting seems to be frame-metadata and scale-info. There's a desub ...
Squirrel's user avatar
  • 3,667
3 votes
1 answer
76 views

Is there a way to know what event it is without decoding the encoded extinsisc?

We are manually decoding the encoded extrinsic. [ex 0x510284.. -> TransactionInfo{value=AccountID{address=14pT17...)] It was confirmed that polkadot-js is well decoded through the toHuman method ...
PaperFrog's user avatar
  • 495
2 votes
3 answers
128 views

What is the difference between check_extrinsic and uncheck_extrinsic?

I want to decode the polkadot's extrinsics I received through json-rpc (at rust or java). But every time I leave a question here, there's no clear answer. First, I'm using subxt. (subxt : https://...
PaperFrog's user avatar
  • 495
1 vote
1 answer
106 views

How to solve 'Invalid transaction version'?

use std::any::Any; use std::io; use subxt::*; use subxt::{ClientBuilder,DefaultConfig, DefaultExtra}; use subxt::codec::Decode; use crate::sp_runtime::OpaqueExtrinsic; use sp_runtime::{ generic::{ ...
PaperFrog's user avatar
  • 495
5 votes
2 answers
589 views

How to decode extrinsic at json-RPC call's data(byte code)

I call json-RPC through the terminal and get the data as below. extrinsics is raw byte, but I'm using polkadot-js(SCALE codec?) to decode it. But I don't know which method to call. "block": ...
PaperFrog's user avatar
  • 495