Questions tagged [tight-coupling]
The tight-coupling tag has no usage guidance.
8
questions
0
votes
0
answers
14
views
trait bound pallet::Config not satisfied even it is implemented
If more context is needed, it is available in commit b392cfa3, file mock.rs.
I'm trying to add a mock for my pallet pallet_quotas in order to implement unit tests.
My pallet depends on a certain ...
3
votes
0
answers
79
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 ...
1
vote
1
answer
130
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
87
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
55
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
187
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 ...
7
votes
1
answer
240
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 ...
6
votes
1
answer
172
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<...