Skip to main content

Questions tagged [tight-coupling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer

Modifying / extending existing substrate pallet without cloning full source

I would like to modify the substrate transaction-payment pallet's CurrencyAdapter without cloning the entire crate into the local pallets. What's the best practice to provide another implementation ...
Rehan's user avatar
  • 167
0 votes
0 answers

trait bound pallet::Config not satisfied even it is implemented

If more context is needed, it is available in commit b392cfa3, file I'm trying to add a mock for my pallet pallet_quotas in order to implement unit tests. My pallet depends on a certain ...
Hugo Trentesaux's user avatar
3 votes
0 answers

Combining instanced pallets w/ non-instanced pallets

Overview We have a system that leverages both instanced pallets and non-instanced pallets. Specifically, we have pallets that maintain on-chain merkle trees. We can have many instances of these ...
Drew Stone's user avatar
  • 1,194
2 votes
1 answer

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
1 vote
1 answer

Transactional macro cross pallet transaction

Suppose I have the following cross pallet function call // Pallet A : method that sets a storage variable pub fn try_set_value_in_pallet_a(value: u64) -> DispatchResult { ensure!(!value.is_zero(...
mr_bovo's user avatar
  • 171
0 votes
1 answer

When should I split a pallet in two or more?

I've recently posted a question about this topic, but I want to make it more general, as people might have the same issue as me. I've checked some substrate based repositories like subsocial or debio, ...
andresvsm's user avatar
  • 1,114
1 vote
1 answer

How to properly use pallet coupling

I'm trying to avoid using tight coupling for my pallets as it seems to be a bad idea for later enhancements. I'm also facing issues when trying to create a file for, but that's another issue ...
andresvsm's user avatar
  • 1,114
7 votes
1 answer

pallet loose-coupling+tight-coupling, and missing traits

The question is about both types of pallets-coupling. let's say we have 3 pallets A,B, and C. C is tightly coupled to B (C Config is added in B Config), and we want to do a loose Coupling of A and B ...
Kazunobu Ndong's user avatar
6 votes
1 answer

How do I use storage and functions from one custom pallet in another?

Is there a way for one custom pallet to access the storage or functions from another custom pallet? For Example: Pallet 1 #[pallet::storage] pub(super) type MyValue<T: Config> = StorageValue<...
Shawn Tabrizi's user avatar
  • 16.1k