Questions tagged [call]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
3 answers
31 views

Is it possible for users to call non #[pallet::call_index(0)] functions

Is this possible? Say you have a function in a pallet outside of the lib.rs file that is a function like: impl<T: Config> Pallet<T> { pub fn tester(block: u64) { StorageElement::<...
Bob Linux's user avatar
  • 113
0 votes
0 answers
21 views

How can I manually build message in ink-e2e test?

I would like to manually build a message and send it in my ink-e2e test. I'd like to construct and pass a selector and call data by myself. How can I do it using ink 5.0.0-rc and ink-e2e 5.0.0-rc?
Yrefef's user avatar
  • 75
3 votes
0 answers
46 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
81 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
  • 543
2 votes
1 answer
151 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
286 views

1010: Invalid Transaction: Transaction would exhaust the block limits

How to specify limit weight for extrinsic?
rust.dev's user avatar
  • 519
2 votes
2 answers
176 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
4 votes
1 answer
93 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
  • 409
1 vote
1 answer
106 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
84 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
  • 543
2 votes
1 answer
169 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
  • 8,325
1 vote
1 answer
76 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,194
0 votes
1 answer
155 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
90 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
396 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,071
3 votes
1 answer
59 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
61 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
  • 103
6 votes
1 answer
120 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
126 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
101 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
110 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