Skip to main content

Data Index Contract (IDataIndex)

1. Access Control


Q: How is the allowDataManager function's access control implemented in practice? Does it check if the caller is the Data Point maintainer or is this expected to be managed externally?

It verifies the msg.sender is the admin of the Data Point via the Data Point Registry (whose address is a part of the Data Point).

Q: What happens if an unauthorized address tries to call allowDataManager? Should this be explicitly enforced through modifiers?

allowDataManager is protected with a modifier, which only allows the Data Point admin to call it.


2. Data Operations


Q: How does the read function differentiate between different read operations using the operation parameter (bytes4)? Are there predefined operation selectors, or is this left for the Data Manager to define?

Operations are defined by the Data Object. It's a good practice to define the list of supported operations as an interface and use MyInterface.myFunction.selector to get the bytes4 value for such operations.