Skip to content

Commit

Permalink
Addressed review feedback from @jrhea and @mcclurejt
Browse files Browse the repository at this point in the history
  • Loading branch information
jalextowle committed Jul 18, 2024
1 parent 414fe6d commit e2d415f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract MorphoBlueTarget4Deployer is IHyperdriveTargetDeployer {
/// @param _extraData The extra data for the Morpho instance. This contains
/// the market parameters that weren't specified in the config.
/// @param _salt The create2 salt used in the deployment.
/// @return The address of the newly deployed MorphoBlueTarget3 instance.
/// @return The address of the newly deployed MorphoBlueTarget4 instance.
function deployTarget(
IHyperdrive.PoolConfig memory _config,
bytes memory _extraData,
Expand Down
12 changes: 7 additions & 5 deletions contracts/src/instances/morpho-blue/MorphoBlueBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ abstract contract MorphoBlueBase is HyperdriveBase {
/// @param _baseAmount The base amount to deposit.
/// @param _extraData Additional data to pass to the Morpho vault. This
/// should be zero if it is unused.
/// @return The shares that were minted in the deposit.
/// @return The amount of ETH to refund. Since this yield source isn't
/// @return sharesMinted The shares that were minted in the deposit.
/// @return value The amount of ETH to refund. Since this yield source isn't
/// payable, this is always zero.
function _depositWithBase(
uint256 _baseAmount,
bytes calldata _extraData
) internal override returns (uint256, uint256) {
) internal override returns (uint256 sharesMinted, uint256 value) {
// Take custody of the deposit in base.
ERC20(address(_baseToken)).safeTransferFrom(
msg.sender,
Expand All @@ -90,7 +90,7 @@ abstract contract MorphoBlueBase is HyperdriveBase {
address(_vault),
_baseAmount + 1
);
(, uint256 sharesMinted) = _vault.supply(
(, sharesMinted) = _vault.supply(
MarketParams({
loanToken: address(_baseToken),
collateralToken: _collateralToken,
Expand All @@ -104,7 +104,9 @@ abstract contract MorphoBlueBase is HyperdriveBase {
_extraData
);

return (sharesMinted, 0);
// NOTE: Since this yield source isn't payable, the value must be zero.
value = 0;
return (sharesMinted, value);
}

/// @dev Deposits with shares are not supported for this integration.
Expand Down

0 comments on commit e2d415f

Please sign in to comment.