Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 27 additions & 67 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,100 +1,60 @@
# VaultV2 Deployment Environment Variables
#
# For deployed contract addresses, see:
# https://docs.morpho.org/get-started/resources/addresses/
#
# Morpho V1 Contracts: Morpho, Adaptive Curve IRM, Oracle Factory, MetaMorpho Factory
# Morpho V2 Contracts: VaultV2Factory, MorphoVaultV1AdapterFactory, MorphoMarketV1AdapterV2Factory, MorphoRegistry

# =============================================================================
# REQUIRED: Core Protocol Addresses
# =============================================================================
# ==============
# Core Addresses
# ==============

# Morpho Blue core contract
MORPHO_ADDRESS=
MORPHO_ADDRESS=0x99D31FEcc885204b4136ea5D2ef2a37F36E3AeB8

# Adaptive Curve IRM (Interest Rate Model)
IRM_ADDRESS=

# =============================================================================
# REQUIRED: Vault V2 Infrastructure
# =============================================================================
IRM_ADDRESS=0x723E35C4CBb5B91669b62F130f2aC12931DF8049

# VaultV2Factory address
VAULT_V2_FACTORY=
VAULT_V2_FACTORY=0x3137e22F379A1Df004DDb10EBbecF1CfD8CbC0e2

# Adapter registry (MorphoRegistry)
ADAPTER_REGISTRY=

# MorphoVaultV1AdapterFactory address
MORPHO_VAULT_V1_ADAPTER_FACTORY=
ADAPTER_REGISTRY=0x83dd673Fa2C4DE16cAAF0e6109845EeEbb6d1E00

# MorphoMarketV1AdapterV2Factory address
MORPHO_MARKET_V1_ADAPTER_V2_FACTORY=
MORPHO_MARKET_V1_ADAPTER_V2_FACTORY=0x01Ff31888b1FB51f951273C409f653Dba5Ce8200

# =============================================================================
# REQUIRED: Role Addresses
# =============================================================================
DEPLOYER=

# =====
# Roles
# =====

# Owner address (receives ownership of deployed vaults)
OWNER=

# =============================================================================
# OPTIONAL: Additional Role Addresses
# =============================================================================

# Curator address (defaults to OWNER if not set)
CURATOR=

# Allocator address (defaults to OWNER if not set)
ALLOCATOR=

# Sentinel address (optional guardian role)
# Sentinel address
SENTINEL=

# =============================================================================
# OPTIONAL: Vault V1 Configuration (for migrations)
# =============================================================================

# MetaMorpho Factory V1.1 address
VAULT_V1_FACTORY_ADDRESS=

# Target Vault V1 address (for migration scripts)
VAULT_V1=

# =============================================================================
# OPTIONAL: Oracle Configuration
# =============================================================================
# ============
# Vault config
# ============

# MorphoChainlinkOracleV2 Factory address (if not set, MockOracle is deployed)
ORACLE_FACTORY_ADDRESS=
NAME=

# Use existing deployed oracle (skips oracle deployment)
DEPLOYED_ORACLE=
SYMBOL=

# =============================================================================
# OPTIONAL: Timelock Configuration
# =============================================================================
LOAN_TOKEN=0x8D82c4E3c936C7B5724A382a9c5a4E6Eb7aB6d5D

# Vault V2 timelock duration in seconds (default: 0)
TIMELOCK_DURATION=
COLLATERAL_TOKEN=0x3100000000000000000000000000000000000006

# Adapter timelock duration in seconds (default: 259200 = 3 days)
ADAPTER_TIMELOCK_DURATION=
MARKET_ID=0x739380ffb364373a0e47422174b37be743ba39af80c1fb115418396431e7748a

# =============================================================================
# OPTIONAL: Dead Deposit Configuration
# =============================================================================
COLLATERAL_TOKEN_CAP=

# Amount for dead deposit to prevent share inflation attacks (default: 1e9)
DEAD_DEPOSIT_AMOUNT=
MARKET_CAP=

# =============================================================================
# OPTIONAL: Deposit Script Variables
# =============================================================================
PERFORMANCE_FEE=

# Deployed Vault V2 address (for deposit operations)
VAULT_V2_ADDRESS=
MANAGEMENT_FEE=

# Amount to deposit
DEPOSIT_AMOUNT=
FEE_RECIPIENT=
11 changes: 11 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]

script := "script/DeployVaultV2WithMarketAdapter.s.sol:DeployVaultV2WithMarketAdapter"

# Simulate script execution (no on-chain broadcast).
vault-simulate *args:
forge script {{script}} -vvv --rpc-url https://rpc.mainnet.citrea.xyz {{args}}

# Deploy on-chain and verify contracts.
vault-deploy *args:
forge script {{script}} -vvv --broadcast --verify --slow --rpc-url https://rpc.mainnet.citrea.xyz {{args}}
Loading