IDataPointRegistry
What is a Data Point Registry?
Data Point Registry defines a space of compatible DataPoints. Behaves as an Access Management smart contract responsible for creating, managing, and controlling access to Data Points. Multiple Data Point Registries can coexist under the Nexera Standard, and they allocates new Data Points to specified owners and manages administrative roles, ensuring that only authorized individuals have control over the Data Points. When a user allocates a Data Point, they can grant permissions to the desired Data Manager (DM) for asset management. If a change in DM implementation is required, the user can use the registry to assign permissions to a new DM and revoke access from the previous one if necessary.
Fig 1. Data Point Registry interaction with DataPoints.
Methods
1. isAdmin()
function isAdmin(DataPoint dp, address account) external view returns (bool);
Description | Parameters | Returns | Modifiers |
---|---|---|---|
Verifies if an address has an Admin role for a Data Point | dp : Data Point identifieraccount : Account to verify | Boolean indicating if the account is an admin | external view |
2. allocate()
function allocate(address owner) external payable returns (DataPoint);
Description | Parameters | Returns | Modifiers |
---|---|---|---|
Allocates a Data Point to an owner | owner : Owner of the new Data Point | Allocated Data Point | external payable |
Note: Owner SHOULD be granted Admin role during allocation.
3. transferOwnership()
function transferOwnership(DataPoint dp, address newOwner) external;
Description | Parameters | Returns | Modifiers |
---|---|---|---|
Transfers ownership of a Data Point to a new owner | dp : Data Point identifiernewOwner : New owner | None | external |
4. grantAdminRole()
function grantAdminRole(DataPoint dp, address account) external returns (bool);
Description | Parameters | Returns | Modifiers |
---|---|---|---|
Grant permission to grant/revoke other roles on the Data Point inside a Data Index Implementation | dp : Data Point identifieraccount : New admin | Boolean indicating if the role was granted | external |
5. revokeAdminRole()
function revokeAdminRole(DataPoint dp, address account) external returns (bool);
Description | Parameters | Returns | Modifiers |
---|---|---|---|
Revoke permission to grant/revoke other roles on the Data Point inside a Data Index Implementation | dp : Data Point identifieraccount : Old admin | Boolean indicating if the role was revoked | external |
Note: If an owner revokes Admin role from himself, he can add it again.
Events
1. DataPointAllocated
event DataPointAllocated(DataPoint indexed dp, address owner);
Description | Parameters |
---|---|
Emitted when a Data Point is allocated | dp : Data Point identifier (indexed)owner : Address of the owner of the new Data Point |
2. DataPointOwnershipTransferred
event DataPointOwnershipTransferred(DataPoint indexed dp, address previousOwner, address newOwner);
Description | Parameters |
---|---|
Emitted when ownership of a Data Point is transferred | dp : Data Point identifier (indexed)previousOwner : Address of the previous ownernewOwner : Address of the new owner |
3. DataPointAdminGranted
event DataPointAdminGranted(DataPoint indexed dp, address account);
Description | Parameters |
---|---|
Emitted when Admin role is granted | dp : Data Point identifier (indexed)account : Address of the account granted the Admin role |
4. DataPointAdminRevoked
event DataPointAdminRevoked(DataPoint indexed dp, address account);
Description | Parameters |
---|---|
Emitted when Admin role is revoked | dp : Data Point identifier (indexed)account : Address of the account revoked from the Admin role |
Errors
1. CounterOverflow
error CounterOverflow();
Description | Parameters |
---|---|
Thrown when the Data Point allocation counter overflows | None |
2. NativeCoinDepositIsNotAccepted
error NativeCoinDepositIsNotAccepted();
Description | Parameters |
---|---|
Thrown when native coin is sent during Data Point allocation | None |
3. InvalidDataPointOwner
error InvalidDataPointOwner(DataPoint dp, address owner);
Description | Parameters |
---|---|
Thrown when caller is not the owner of the Data Point | dp : Data Point identifierowner : Address of the invalid owner |
For more on Data Point allocation and the Registry's role, visit the Data Point Registry Contract Section.