Questions tagged [tight-coupling]
The tight-coupling tag has no usage guidance.
7
questions
1
vote
0
answers
49
views
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 ...
0
votes
1
answer
68
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 ...
1
vote
1
answer
68
views
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(...
0
votes
1
answer
35
views
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, ...
1
vote
1
answer
140
views
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 tests.rs file for, but that's another issue ...
6
votes
1
answer
187
views
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 ...
5
votes
1
answer
105
views
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<...