Git Source Inherits: Ownable, IOwnershipErrors, IZeroAddressError Author: @ShaneDuncan602, @oscarsernarosero, @TJ-Everett This contract serves as a template for all data modules and is abstract as it is not intended to be deployed on its own. Allows for proper permissioning for both internal and external data sources.

State Variables

VERSION

string private constant VERSION = "1";

dataModuleAppManagerAddress

address public immutable dataModuleAppManagerAddress;

newOwner

address newOwner;

newDataProviderOwner

address newDataProviderOwner;

Functions

constructor

Constructor that sets the app manager address used for permissions. This is required for upgrades.
constructor(address _dataModuleAppManagerAddress);
Parameters
NameTypeDescription
_dataModuleAppManagerAddressaddressaddress of the owning app manager

appAdministratorOrOwnerOnly

Modifier ensures function caller is a Application Administrators or the parent contract
modifier appAdministratorOrOwnerOnly();

proposeOwner

This function proposes a new owner that is put in storage to be confirmed in a separate process
function proposeOwner(address _newOwner) external appAdministratorOrOwnerOnly;
Parameters
NameTypeDescription
_newOwneraddressthe new address being proposed

confirmOwner

This function confirms a new appManagerAddress that was put in storage. It can only be confirmed by the proposed address
function confirmOwner() external;

confirmDataProvider

Part of the two step process to set a new Data Provider within a Protocol AppManager
function confirmDataProvider(IDataEnum.ProviderType _providerType) external virtual appAdministratorOrOwnerOnly;
Parameters
NameTypeDescription
_providerTypeIDataEnum.ProviderTypethe type of data provider

version

Get the version of the contract
function version() external pure returns (string memory);
Returns
NameTypeDescription
<none>stringVERSION

Errors

AppManagerNotConnected

error AppManagerNotConnected();

NotAppAdministratorOrOwner

error NotAppAdministratorOrOwner();