Skip to content
LogoLogo

MetaMorphoOracleFactory

Git Source

Inherits: AccessManagedUpgradeable, IMetaMorphoOracleFactory

Constants

MetaMorphoOracleFactoryStorageLocation

bytes32 private constant MetaMorphoOracleFactoryStorageLocation =
        0x8b272443f96f44d511b8bb6ad6efe08c8771f99b7e57f25c3f699349a99dca00;

Functions

_getMetaMorphoOracleFactoryStorage

function _getMetaMorphoOracleFactoryStorage() internal pure returns (MetaMorphoOracleFactoryStorage storage $);

Returns

NameTypeDescription
$MetaMorphoOracleFactoryStorage

constructor

constructor();

initialize

function initialize(address _initialAuthority) external initializer;

Parameters

NameTypeDescription
_initialAuthorityaddress

isMorphoFactory

Factory => Whether this is a whitelisted Morpho factory.

function isMorphoFactory(address morphoFactory) external view override returns (bool);

Parameters

NameTypeDescription
morphoFactoryaddress

Returns

NameTypeDescription
<none>bool

isOracle

Oracle => Whether this is an oracle instance deployed by this factory.

function isOracle(address oracle) external view override returns (bool);

Parameters

NameTypeDescription
oracleaddress

Returns

NameTypeDescription
<none>bool

setMorphoFactory

Whitelist or unwhitelist a Morpho factory.

function setMorphoFactory(address morphoFactory, bool isFactory) external override restricted;

Parameters

NameTypeDescription
morphoFactoryaddressThe address of the Morpho factory.
isFactoryboolTrue 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

NameTypeDescription
factoryaddressThe factory used to create the MetaMorpho Vault.
metaMorphoVaultaddressThe Vault for which to create a wrapper oracle.
decimalsuint8Decimals to use for the oracle price.

Returns

NameTypeDescription
<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

NameTypeDescription
_isOraclemapping(address oracle => bool isOracle)
_isMorphoFactorymapping(address factory => bool isFactory)