Documentation Index
Fetch the complete documentation index at: https://mintlify.com/morpho-org/vault-v2/llms.txt
Use this file to discover all available pages before exploring further.
MorphoMarketV1AdapterV2Factory
Factory contract for deployingMorphoMarketV1AdapterV2 adapter instances. Each factory is bound to a specific Morpho instance and Adaptive Curve IRM, ensuring consistent adapter configuration across deployments.
Overview
TheMorphoMarketV1AdapterV2Factory uses CREATE2 deployment with a fixed salt (bytes32(0)) to create deterministic adapter addresses. It maintains registries to track deployed adapters and their parent vaults.
The IRM parameter must be the Adaptive Curve IRM for proper functionality.
Immutable variables
The address of the Morpho Blue instance that adapters will interact with.
The address of the Adaptive Curve IRM contract that markets must use.
State variables
Maps parent vault addresses to their deployed adapter addresses. Returns
address(0) if no adapter exists for a vault.Returns
true if an address is a MorphoMarketV1AdapterV2 deployed by this factory.Constructor
The Morpho Blue contract address
The Adaptive Curve IRM contract address
Functions
createMorphoMarketV1AdapterV2
MorphoMarketV1AdapterV2 for the specified parent vault.
The VaultV2 address that will use this adapter
The address of the newly deployed adapter
Each parent vault can only have one adapter deployed through this factory. Calling this function multiple times with the same
parentVault will revert during deployment.Events
CreateMorphoMarketV1AdapterV2Factory
CreateMorphoMarketV1AdapterV2
Usage example
Related contracts
- MorphoMarketV1AdapterV2 - The adapter contract this factory deploys
- VaultV2 - Parent vault that uses these adapters