DataModule
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
dataModuleAppManagerAddress
newOwner
newDataProviderOwner
Functions
constructor
Constructor that sets the app manager address used for permissions. This is required for upgrades.
Parameters
Name | Type | Description |
---|---|---|
_dataModuleAppManagerAddress | address | address of the owning app manager |
appAdministratorOrOwnerOnly
Modifier ensures function caller is a Application Administrators or the parent contract
proposeOwner
This function proposes a new owner that is put in storage to be confirmed in a separate process
Parameters
Name | Type | Description |
---|---|---|
_newOwner | address | the 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
confirmDataProvider
Part of the two step process to set a new Data Provider within a Protocol AppManager
Parameters
Name | Type | Description |
---|---|---|
_providerType | IDataEnum.ProviderType | the type of data provider |
version
Get the version of the contract
Returns
Name | Type | Description |
---|---|---|
<none> | string | VERSION |