RulesEngineStoragePositionLib
Author: @mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220
This library is a critical component of the Rules Engine, enabling modular and efficient storage management.
This library provides functions to access and manage storage positions for various components of the Rules Engine. It defines fixed storage slots for initialized flags, foreign calls, trackers, calling functions, rules, policies, and policy associations. These storage slots are used to ensure consistent and conflict-free storage management across the diamond proxy pattern.
State Variables
DIAMOND_CUT_STORAGE_ENGINE_POS
INITIALIZED_POSITION
FOREIGN_CALL_POSITION
TRACKER_POSITION
CALLING_FUNCTION_POSITION
RULE_POSITION
POLICY_POSITION
POLICY_ASSOCIATION_POSITION
FOREIGN_CALL_METADATA_POSITION
CALLING_FUNCTION_METADATA_POSITION
TRACKER_METADATA_POSITION
Functions
_initializedStorage
Retrieves the storage for the initialized flag.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | InitializedStorage | The storage structure for the initialized flag. |
_getForeignCallStorage
Retrieves the storage for foreign calls.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | ForeignCallStorage | The storage structure for the foreign call map. |
_getForeignCallMetadataStorage
Retrieves the storage for foreign call metadata.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | ForeignCallMetadataStruct | The storage structure for the foreign call metadata map. |
_getTrackerStorage
Retrieves the storage for trackers.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | TrackerStorage | The storage structure for the tracker map. |
_getTrackerMetadataStorage
Retrieves the storage for tracker metadata.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | TrackerMetadataStruct | The storage structure for the tracker metadata map. |
_getCallingFunctionStorage
Retrieves the storage for calling functions.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | CallingFunctionStruct | The storage structure for the calling function map. |
_getCallingFunctioneMetadataStorage
Retrieves the storage for calling function metadata.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | CallingFunctionMetadataStruct | The storage structure for the calling function metadata map. |
_getRuleStorage
Retrieves the storage for rules.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | RuleStorage | The storage structure for the rule map. |
_getPolicyStorage
Retrieves the storage for policies.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | PolicyStorage | The storage structure for the policy map. |
_getPolicyAssociationStorage
Retrieves the storage for policy associations.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
_ds | PolicyAssociationStorage | The storage structure for the policy association map. |