An external access level provider may be utilized when you need to rely on controls and data passports provided by external systems. In order to switch to an external access level provider, the external provider contract must conform to the IAccessLevels interface or an adapter contract that conforms to the interface must be used. Once the external provider contract is deployed, the AppManager must be pointed to the new provider.
function proposeOwner(address _newOwner) external; function confirmOwner() external; function confirmDataProvider(ProviderType _providerType) external;
The implementations for each of the above functions can be found in the DataModule contract.
Process for switching to an external access level provider
The switching process consists of proposing and confirming the data provider. The first part of the 2 step process is to propose a new access level provider in the AppManager. Once the new provider address is proposed, then it is confirmed by invoking a confirmation function in the new provider that invokes the corresponding function in AppManager. The process is as follows:
Deploy the external Access Level Provider.
Call proposeAccessLevelsProvider in the AppManager.
Copy
Ask AI
function proposeAccessLevelsProvider(address _newProvider) external onlyRole(APP_ADMIN_ROLE);
Call confirmDataProvider in the external access level provider contract with provider type = IDataModule.ProviderType.ACCESS_LEVEL:
Copy
Ask AI
function confirmDataProvider(ProviderType _providerType) external;