Questions tagged [substrateinterface]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
16 views

"EVM front tier remote code execution vulnerability"

Anyone using the latest EVM frontTier Pallet their - seems to be a possibility for a remote attacker to exploit your nodes remotely and control the nodes and every other nodes within your system, that'...
simon 's user avatar
  • 11
0 votes
1 answer
20 views

Async operations with substrate library in python

I am curious, does the current python library support Async operations ? For some reason, I am getting an Aenter error when calling the substrate in python library. Thanks
PutsandCalls's user avatar
1 vote
1 answer
118 views

I'm struggling to understand the concept of runtime calls, RPC calls, and extrinsics in Substrate

Can someone please explain these concepts in a simplified manner and highlight their key distinctions? I would greatly appreciate any help in clarifying these concepts. I'm relatively new to Substrate ...
UPENDRA SINGH's user avatar
0 votes
1 answer
81 views

How to find polkadot js API implementation in rust susbtrate

https://polkadot.js.org/docs/substrate/storage#accountaccountid32-framesystemaccountinfo account(AccountId32): FrameSystemAccountInfo interface: api.query.system.account summary: The full account ...
muddlebee's user avatar
1 vote
1 answer
191 views

the trait `std::clone::Clone` is not implemented for `Nominations<T>`

I was making a new event in the function nominate of Staking pallet which is going to show when the nominator is going to be added. But i facing one issue #[pallet::call_index(5)] #[pallet::weight(...
Arunjot Singh's user avatar
0 votes
1 answer
28 views

construct_runtime macro panics in a mock environment while it builds in normal runtime [closed]

Trying to create a mock environment for testing a pallet, but getting an error msg failed to resolve: could not find tt_error_token in the crate root whenever trying to add my pallet in the mock ...
Nakul Amate's user avatar
0 votes
0 answers
35 views

How to traverse extrinsics executed via substrate interface

I am interacting with the substrate node using substrate interfact. I am using following command to submit extrinsic to be executed by the runtime: extrinsic = substrate.create_signed_extrinsic( ...
Syed Kamran's user avatar
1 vote
1 answer
82 views

how to Decrease the unbonding Time in substrate?

i am working on substrate blockchain its era time and epoch are set too 2 minutes and when i changed unbonding duration to 4 min in blockchain it is working fine . when i have added evm base to to ...
Karanvir Singh's user avatar
1 vote
1 answer
48 views

Pagination issues in py-substrate-interface

It is not clear how to use pagination in py-substrate-interface. In the sample code below, there are only 32 records so all the query should be complete, but result.loading_complete shows false. from ...
Roger J Bos CFA's user avatar
2 votes
2 answers
168 views

How To Adjust The Fees On A Running Substrate Chain?

Fees for transactions in our test net are too high and we would like to adjust them to be some factor lower across the board. Is there a simple way to do that using a call from the Polkadot.js apps ...
KathrynColleen's user avatar
2 votes
1 answer
26 views

Pallet Call Indicies are Conflicting Error

This error cropped up somewhat unexpectedly, and I am not sure how it came to be. Nevertheless, it appears that 2 runtime calls, set_commission (a new function being added in the PR in question) and ...
Ross's user avatar
  • 141
1 vote
1 answer
105 views

How to get a list of all the smart contract account ids and WASM blobs on a parachain

I would like to figure out how to get a list of all the smart contracts account ids and WASM blobs that have been uploaded to a specific parachain, ideally into python using the substrate interface. ...
Roger J Bos CFA's user avatar
0 votes
1 answer
69 views

Get a block based on timestamp from python substrate interface

Is it possible to get either block_number or block_hash of the nearest block for a given timestamp from python substrate interface? For example if i pass timestamp of 2022-11-28 10:00:00 (+UTC) I ...
Pranay's user avatar
  • 141
1 vote
1 answer
27 views

final_checks() on Executive module

Inside final_checks(header: &System::Header) method fn final_checks() { let new_header = <frame_system::Pallet::<System>>::finalize(); ... let storage_root = new_header....
coco_yoon's user avatar
  • 119
0 votes
1 answer
68 views

How to start a local substrate node using python substrate interface

I am using python substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node. How to start my local substrate-node-template using python for ...
Syed Kamran's user avatar
0 votes
1 answer
164 views

How to get specific extrinsic using python substrate interface

I am using python substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node. I need to execute Pallet::Balances::transfer twice by combine both of ...
Syed Kamran's user avatar
0 votes
1 answer
119 views

How to submit a transaction form the root/sudo acount using python substrate interface

I am using Python Substrate Interface (https://github.com/polkascan/py-substrate-interface) to interact with the substrate node. I need to execute Pallet::Balances::force_transfer function, this ...
Syed Kamran's user avatar
4 votes
1 answer
151 views

Substrate learning resources

Can any one please point me to some very good step by step resource/course to learn substrate? I can't find any resources that would guide me step by step starting from substrate architecture and ...
Syed Kamran's user avatar
-1 votes
2 answers
88 views

How to generate node information?

How can i generate this information while starting my chain???
Amit Kumar Yadav's user avatar
0 votes
0 answers
13 views

How to interact with the pre-defined public address

I want to interact with the pre-defined public address. I want to use a map function to hide the public address with any name I want
Gabriel Moses's user avatar
0 votes
2 answers
106 views

How to subscribe the new pending transaction of polkadot in substrate python

How can i subscribe to the new pending transactions of polkadot by using substrate interface python
Shahbaz Ali's user avatar
1 vote
2 answers
79 views

Python substrate-interface discovering which params need to be passed into query function for parallel API?

I am trying to find the correct parameters to pass into the query function for the substrate interface module when interacting with the parallel api to interact with their AMM. I attempted to modify ...
travnado300's user avatar
0 votes
2 answers
99 views

How can I create a currencies.transfer transaction?

I have created a transaction by @substrate/txwrapper-orml import {methods as substrateMethods} from "@substrate/txwrapper-orml"; export const methods = { currencies: substrateMethods....
Lyn's user avatar
  • 31
1 vote
2 answers
88 views

How to determine what parameter to pass into substrate.query() to query a storage_function from polkascan's py-substrate-interface?

I am trying to use py-substrate-interface to query the acalaOracle.value for Acala/Karura. Below I show a screenshot of how to get the data using polkadot{js}. Here is the python code I am trying: ...
Roger J Bos CFA's user avatar
2 votes
1 answer
225 views

How to get the balance for a specific account using py-substrate

The following code will return the balance for a few random accounts? How would I pass in a specific account that I am interested in? url = 'wss://karura.polkawallet.io' substrate = ...
Roger J Bos CFA's user avatar
4 votes
2 answers
245 views

How key-values database and Merkle Tree works together on Substrate

I have been looking deep dive into Substrate and trying to understand things behind the hood, especially storage API. I am really keen to explore more in the Merkle abstraction between Storage API and ...
lucycollins's user avatar
1 vote
0 answers
125 views

How do externalities work in runtime?

What makes me confused about the runtime is the Externalities. I found the definition in sp_externalities, moreover I found that the pub fn set_and_run_with_externalities(ext: &mut dyn ...
George's user avatar
  • 21
3 votes
1 answer
203 views

How to obtain the staking amount for non-active validators?

Using substrate-interface I'm trying to get the amount of DOT in staking for non-active validators, those that are waiting. I can get the active validators' amount by using the storage_function ...
Saccharo's user avatar
3 votes
1 answer
44 views

Access The Unbonding Amount With Substrate Query

I'm trying to measure the unbonding amount directly from a substrate-interface query. Here's the amount I'm interested in: I can get some account information with this query: value = self....
kayolord's user avatar
5 votes
2 answers
327 views

How to find how many transactions are pending from address to be added to block?

In my application, I need to fire multiple transactions from same address, and want to create statusCheck() function, which will let me know how many transactions of total are still pending to be ...
pravin k's user avatar
  • 111
5 votes
1 answer
223 views

How to understand [runtime-interface] and `Externalities`?

I am struggling with #[runtime_interface] the whole day. here is the Runtime Interface Trait Defination, the expanded macro is too long to paste here, here is a expanded macro. I have lots of ...
boundless-forest's user avatar
5 votes
1 answer
124 views

How to convert substrate Specific Types(Option<BalanceOf<T>> ) to Rust Primitive types (U64)?

I don't know how can I convert Option<BalanceOf> (subtrate specific type)to u64 (rust primitive types)? I followed this article( How do you convert between Substrate specific types and Rust ...
Kapil Yadav's user avatar
1 vote
0 answers
52 views

How to solve " ValueError: Element count of value (1) doesn\'t match type_definition (2)" when I teleport ksm in kusama to ksm in statemine? [duplicate]

I want to teleport the ksm in kusama to ksm in statemine. I use the code call = _substrate.compose_call( call_module='XcmPallet', call_function='limited_teleport_assets', ...
Jack's user avatar
  • 61
2 votes
1 answer
140 views

Can generate an address by mnemonic with the sdk substrate-interface?

I want to generate an kusama address. The substrate-interface can make it?Or how to generate an ss58 format address by python
Jack's user avatar
  • 61
1 vote
1 answer
75 views

How to solve the issue"Element "asset_id" of struct is missing in given value" when I send a token transaction

I send the transaction using the substrate interface. I get the key pair and call: call_module = "Assets" call_function = 'transfer' call_params = { "id": asset_id, "...
Jack's user avatar
  • 61
2 votes
1 answer
106 views

How to decode and encode transactions by using substrate?

I want to decode blocks and transactions from the Node. I want to use https://github.com/paritytech/substrate . But I can not find methods about it. Could you tell me where it is ?
zeze's user avatar
  • 21
0 votes
1 answer
87 views

Retrieve reason of fail substrate rpc call

I would like to know if there is a way for understanding why a rpc call via python substrate-interface is failing. On my case, I'm using python substrateinterface lib. And in function "...
Nadav Sagie's user avatar