Questions tagged [call]
The call tag has no usage guidance.
20
questions
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::...
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.
...
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 ...
0
votes
1
answer
151
views
1010: Invalid Transaction: Transaction would exhaust the block limits
How to specify limit weight for extrinsic?
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> ...
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 ...
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 ...
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 ...
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::...
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:...
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 / ...
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",
...
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 ...
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/...
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 ...
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(
...
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 ...
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: ...
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 ...
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>:...