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.
I need a place to store some values that are global accessible by multiple modules. The lifetime of this store does not need to exceeds the execution of extrinsic. i.e. it get cleared between each time an extrinsic is applied.
Basically I want to setup a Map<Vec<u8>, Vec<u8>> before this line and make it accessible during the extrinsic execution. May be some helper methods/macros to ensure type safety.
I can't find a way to implement it without some kind of global variables. I am not sure if lazy_static is allowed in the runtime. The only other solution I can think of is add new method in Externalities
I need a place to store some values that are global accessible by multiple modules. The lifetime of this store does not need to exceeds the execution of extrinsic. i.e. it get cleared between each time an extrinsic is applied.
Basically I want to setup a
Map<Vec<u8>, Vec<u8>>before this line and make it accessible during the extrinsic execution. May be some helper methods/macros to ensure type safety.substrate/srml/executive/src/lib.rs
Line 186 in c4ca27f
I can't find a way to implement it without some kind of global variables. I am not sure if
lazy_staticis allowed in the runtime. The only other solution I can think of is add new method in ExternalitiesRelated comments:
#1924 (comment)
#1815 (comment)