MockMorphoVault
Title: MockMorphoVault
Localhost-only mock that emulates a third-party Morpho-like USDC vault.
Tracks principal-like balances by account and supports synthetic yield injection.
State Variables
USDC
IERC20 public immutable USDC
shareBalanceOf
mapping(address => uint256) public shareBalanceOf
totalShares
uint256 public totalShares
Functions
constructor
constructor(address usdc_) ;
depositUnderlying
function depositUnderlying(uint256 assets, address onBehalfOf) external returns (uint256 shares);
withdrawUnderlying
function withdrawUnderlying(uint256 assets, address to) external returns (uint256 withdrawn);
injectYield
function injectYield(uint256 amount) external;
totalAssets
function totalAssets() public view returns (uint256);
totalUnderlyingOf
function totalUnderlyingOf(address account) external view returns (uint256);
Events
Deposited
event Deposited(address indexed caller, address indexed onBehalfOf, uint256 assets);
Withdrawn
event Withdrawn(address indexed caller, address indexed to, uint256 assets);
YieldInjected
event YieldInjected(address indexed from, uint256 amount);