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, function signatures, 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
FUNCTION_SIGNATURE_POSITION
RULE_POSITION
POLICY_POSITION
POLICY_ASSOCIATION_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 | InitializedS | 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 | ForeignCallS | The storage structure for the foreign call map. |
getTrackerStorage
Retrieves the storage for trackers.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
ds | TrackerS | The storage structure for the tracker map. |
getFunctionSignatureStorage
Retrieves the storage for function signatures.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
ds | FunctionSignatureS | The storage structure for the function signature map. |
getRuleStorage
Retrieves the storage for rules.
Uses a fixed storage slot to avoid conflicts with other contracts.
Returns
Name | Type | Description |
---|---|---|
ds | RuleS | 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 | PolicyS | 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 | PolicyAssociationS | The storage structure for the policy association map. |