Skip to content
LogoLogo

IMetaMorphoOracleFactory

Git Source

Functions

isMorphoFactory

Factory => Whether this is a whitelisted Morpho factory.

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

Parameters

NameTypeDescription
morphoFactoryaddress

Returns

NameTypeDescription
isFactorybool

isOracle

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

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

Parameters

NameTypeDescription
oracleaddress

Returns

NameTypeDescription
<none>bool

setMorphoFactory

Whitelist or unwhitelist a Morpho factory.

function setMorphoFactory(address morphoFactory, bool isFactory) external;

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

Events

MetaMorphoOracleCreated

event MetaMorphoOracleCreated(address indexed oracle);

Parameters

NameTypeDescription
oracleaddress

Errors

NotMetaMorphoVault

error NotMetaMorphoVault();

NotFactory

error NotFactory();