MorphoMarketV1AdapterV2Factory

0x79370ed003ce325c088e530d5e8655c99c2993e1

Verification
Verified
v0.8.28+commit.7893614a
Type
Contract
13,633 bytes
ABI entries
8
4 read · 1 write
License
none

Contract information

Address
0x79370ed003ce325c088e530d5e8655c99c2993e1
Chain
Robinhood Chain (4663)
Compiler
v0.8.28+commit.7893614a
Optimization
Enabled
Creation tx
0xc84e84ec3a…939a540572

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (4)

adaptiveCurveIrm()address
isMorphoMarketV1AdapterV2(address)bool
morpho()address
morphoMarketV1AdapterV2(address)address

Events (2)

CreateMorphoMarketV1AdapterV2CreateMorphoMarketV1AdapterV2Factory

ABI

[
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_morpho",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_adaptiveCurveIrm",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "parentVault",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "morphoMarketV1AdapterV2",
        "type": "address"
      }
    ],
    "name": "CreateMorphoMarketV1AdapterV2",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "morpho",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "adaptiveCurveIrm",
        "type": "address"
      }
    ],
    "name": "CreateMorphoMarketV1AdapterV2Factory",
    "type": "event"
  },
  {
    "inputs": [],
    "name": "adaptiveCurveIrm",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "parentVault",
        "type": "address"
      }
    ],
    "name": "createMorphoMarketV1AdapterV2",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "account",
        "type": "address"
      }
    ],
    "name": "isMorphoMarketV1AdapterV2",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "morpho",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "parentVault",
        "type": "address"
      }
    ],
    "name": "morphoMarketV1AdapterV2",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }
]

Source code

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2025 Morpho Association
pragma solidity 0.8.28;

import {MorphoMarketV1AdapterV2} from "./MorphoMarketV1AdapterV2.sol";
import {IMorphoMarketV1AdapterV2Factory} from "./interfaces/IMorphoMarketV1AdapterV2Factory.sol";

/// @dev irm must be the adaptive curve irm.
contract MorphoMarketV1AdapterV2Factory is IMorphoMarketV1AdapterV2Factory {
    /* IMMUTABLES */

    address public immutable morpho;
    address public immutable adaptiveCurveIrm;

    /* STORAGE */

    mapping(address parentVault => address) public morphoMarketV1AdapterV2;
    mapping(address account => bool) public isMorphoMarketV1AdapterV2;

    /* CONSTRUCTOR */

    constructor(address _morpho, address _adaptiveCurveIrm) {
        morpho = _morpho;
        adaptiveCurveIrm = _adaptiveCurveIrm;
        emit CreateMorphoMarketV1AdapterV2Factory(morpho, adaptiveCurveIrm);
    }

    /* FUNCTIONS */

    function createMorphoMarketV1AdapterV2(address parentVault) external returns (address) {
        address _morphoMarketV1AdapterV2 =
            address(new MorphoMarketV1AdapterV2{salt: bytes32(0)}(parentVault, morpho, adaptiveCurveIrm));
        morphoMarketV1AdapterV2[parentVault] = _morphoMarketV1AdapterV2;
        isMorphoMarketV1AdapterV2[_morphoMarketV1AdapterV2] = true;
        emit CreateMorphoMarketV1AdapterV2(parentVault, _morphoMarketV1AdapterV2);
        return _morphoMarketV1AdapterV2;
    }
}
Chain explorer3135msChain node74ms