Questions tagged [call]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
0 answers
32 views

Filter pallet call by origin

Is there a way to access the call origin when using BaseCallFilter from frame_system::Config? Something like: // Disallow any call to a given pallet pub struct CallFilter; impl frame_support::traits::...
Rodrigo Quelhas's user avatar
4 votes
1 answer
60 views

How to iterate a large `StorageMap` over multiple extrinsic calls?

Hey valuable Substrate community, I am running into the problem that I need to iterate over an unbounded StorageMap. So I need an IterationLimit and use an extrinsic which gets called multiple times. ...
Chralt's user avatar
  • 483
1 vote
1 answer
119 views

How to create a RuntimeCall with custom values and submit it to the utility pallet's batch function?

I have a custom pallet that is tightly coupled to the utility pallet. I am trying to call the batch function to perform a batch of balance transfers. The tests of the utility pallet (that create ...
Paul Neale's user avatar
0 votes
1 answer
151 views

1010: Invalid Transaction: Transaction would exhaust the block limits

How to specify limit weight for extrinsic?
rust.dev's user avatar
  • 509
2 votes
2 answers
167 views

Accessibility of functions inside custom pallet

I have two custom pallets pallet1 and pallet2. In pallet1 I have a bunch of calls with assigned weights declared under pallet call macro like this #[pallet::call] impl<T: Config> Pallet<T> ...
Derek Shaw's user avatar
3 votes
1 answer
78 views

Whitelist a call subset of a pallet

Is there a way to whitelist a call subset of a pallet? And hide the rest from the end user. // something like Pallet { fn call_a(){} fn call_b(){} }; // Some Pallet ... construct_runtime!( pub ...
muharem's user avatar
  • 334
0 votes
0 answers
41 views

Handling Democracy proposal execution

According to this answer, if I understood correctly, there are 2 ways to handle proposal execution when using the democracy pallet: through pallet-collective, or pallet-pre-image. I am trying to do ...
Kazunobu Ndong's user avatar
1 vote
1 answer
92 views

Democracy proposal not enacted

First of all I am working on Polkadot-v0.9.29. I am struggling to understand the right way to format a pallet call before submitting it as a proposal to the democracy pallet. Let's the pallet call be ...
Kazunobu Ndong's user avatar
3 votes
2 answers
77 views

How to conditionally include an extrinsic with a rustc feature?

Hey Substrate Community, is there a way to annotate a extrinsic call function with the Rust cfg condition compile execution? #[cfg_attr(feature = "with-global-disputes", pallet::weight(T::...
Chralt's user avatar
  • 483
2 votes
1 answer
107 views

What are Call Filters?

I see this code used in the Substrate runtime: pub enum ProxyType { Any, NonTransfer, Governance, Staking, } impl InstanceFilter<Call> for ProxyType { fn filter(&self, c:...
Bruno's user avatar
  • 7,783
1 vote
1 answer
56 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,164
0 votes
1 answer
121 views

Create hex encoded call (for XCM transact call) in javascript?

I'm trying to create the encoded element for an XCM V0 transact call such as: const message = { V0: { Transact: { originType: "Native", ...
lucgerrits's user avatar
6 votes
1 answer
62 views

What should be the maximum size of Call for a runtime

There are unit tests in Polkadot and Kusama runtimes that fail if the core::mem::size_of<Call> is greater than 230 bytes. Kusama, Polkadot, Substrate. What exactly is this size of and how was ...
Mokhtar Naamani's user avatar
3 votes
1 answer
296 views

Using Scheduler Pallet to schedule Contract pallet call

I'm trying to use the Scheduler pallet to schedule a call to the Contracts pallet as part of a chain extension implementation. I've managed to get the following to compile and execute: // In `runtime/...
HCastano's user avatar
  • 1,061
3 votes
1 answer
54 views

Does `max_block` take into account `base_block`?

I'm writing a hook that will pop Calls out of storage and dispatch them. I want to dispatch as many of those calls as possible in the limits of max_block. My approach was to store the cumulated weight ...
Timothée Delabrouille's user avatar
1 vote
1 answer
55 views

How to pass a call to tx.scheduler.schedule?

I am attempting to submit tx.scheduler.schedule as follows: const wasm = await readFile(file) const call = api.tx.parachainSystem.enactAuthorizedUpgrade(wasm) await api.tx.scheduler .schedule( ...
user1813's user avatar
6 votes
1 answer
106 views

When using pallet-assets in another pallet: how to make pallet-assets calls private?

I'm using pallet-assets for my pallet, let's say custom-assets. In custom_assets::transfer I make some additional business logic and call pallet_assets::transfer. I want to make pallet_assets calls ...
nikania's user avatar
  • 63
0 votes
2 answers
86 views

Substrate Pallet::Call, unpack the Pallet:Call's content

In default Substrate-Node-Template I want to make some actions inside validate_transaction function which is located in runtime/src/lib.rs: fn validate_transaction( source: ...
Alexander Sinchenko's user avatar
3 votes
1 answer
97 views

Event type & Call type

I am doing Substrate-tutorial and I just have a question about template-node. Inside impl 'frame_system::Config for Runtime {} code, there are type Event = Event and type Call = Call, but I don't see ...
coco_yoon's user avatar
  • 119
3 votes
1 answer
103 views

Why can't we use `T::Call` in pallet like `T::AccountId` and `T::BlockNumber`?

I am trying to use T::Call (This type is defined in frame_system) in storage and pallet dispatchable functions but getting below error. error[E0277]: the trait bound `<T as frame_system::Config>:...
Ayush Mishra's user avatar