You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Shared storage for instantiable FRAME pallets #8320
Implementing instantiable pallets could benefit from more flexibility and ease of usability if they could share common storage items. This was brought up at Substrate Seminar by @chevdor whereby the following scenario was outlined to give a practical use case example:
Assume a runtime has 100 instances of the Societies pallet
Each Society shares some common constant, such as the minimum balance of a societies treasury for it to stay alive
Over time, as per discussions within the governing body of this system containing all these Societies, this constant may change
How could a change to a constant (which must remain common to all Societies) be brought without needing to make 100 separate calls to storage?
As pointed out by @shawntabrizi, the work-away around this would be to create a custom instantiable pallet (not using FRAME) and to hardcode some shared storage key where all pallets will know to look when needed to retrieve the common information they require. Having FRAME give developers this possibility "out-the-box" could be something useful. Thanks @chevdor for the thinking here!
Implementing instantiable pallets could benefit from more flexibility and ease of usability if they could share common storage items. This was brought up at Substrate Seminar by @chevdor whereby the following scenario was outlined to give a practical use case example:
As pointed out by @shawntabrizi, the work-away around this would be to create a custom instantiable pallet (not using FRAME) and to hardcode some shared storage key where all pallets will know to look when needed to retrieve the common information they require. Having FRAME give developers this possibility "out-the-box" could be something useful. Thanks @chevdor for the thinking here!