MetaMorphoOracleFactory
Inherits: AccessManagedUpgradeable, IMetaMorphoOracleFactory
Constants
MetaMorphoOracleFactoryStorageLocation
bytes32 private constant MetaMorphoOracleFactoryStorageLocation =
0x8b272443f96f44d511b8bb6ad6efe08c8771f99b7e57f25c3f699349a99dca00;Functions
_getMetaMorphoOracleFactoryStorage
function _getMetaMorphoOracleFactoryStorage() internal pure returns (MetaMorphoOracleFactoryStorage storage $);Returns
| Name | Type | Description |
|---|---|---|
| $ | MetaMorphoOracleFactoryStorage |
constructor
constructor();initialize
function initialize(address _initialAuthority) external initializer;Parameters
| Name | Type | Description |
|---|---|---|
| _initialAuthority | address |
isMorphoFactory
Factory => Whether this is a whitelisted Morpho factory.
function isMorphoFactory(address morphoFactory) external view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| morphoFactory | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
isOracle
Oracle => Whether this is an oracle instance deployed by this factory.
function isOracle(address oracle) external view override returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| oracle | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
setMorphoFactory
Whitelist or unwhitelist a Morpho factory.
function setMorphoFactory(address morphoFactory, bool isFactory) external override restricted;Parameters
| Name | Type | Description |
|---|---|---|
| morphoFactory | address | The address of the Morpho factory. |
| isFactory | bool | True to whitelist the factory, false to unwhitelist. |
createMetaMorphoOracle
Creates an oracle for the given MetaMorpho Vault.
function createMetaMorphoOracle(address factory, address metaMorphoVault, uint8 decimals)
external
override
restricted
returns (address);Parameters
| Name | Type | Description |
|---|---|---|
| factory | address | The factory used to create the MetaMorpho Vault. |
| metaMorphoVault | address | The Vault for which to create a wrapper oracle. |
| decimals | uint8 | Decimals to use for the oracle price. |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | address |
Structs
MetaMorphoOracleFactoryStorage
Note:
- storage-location: erc7201:makina.storage.MetaMorphoOracleFactory
struct MetaMorphoOracleFactoryStorage {
mapping(address oracle => bool isOracle) _isOracle;
mapping(address factory => bool isFactory) _isMorphoFactory;
}Properties
| Name | Type | Description |
|---|---|---|
| _isOracle | mapping(address oracle => bool isOracle) | |
| _isMorphoFactory | mapping(address factory => bool isFactory) |