Skip to content

Commit

Permalink
pr comments improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Manoj Patra committed Sep 20, 2023
1 parent b9070f5 commit 4982308
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions contracts/StaderStakePoolsManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -166,25 +166,25 @@ contract StaderStakePoolsManager is
}

/**
* @notice auxiliary method for KOL users/referrals to stake ETH and mints ETHx for _receiver based on exchange rate
* @notice auxiliary method for KOL users/referrals to stake ETH and mint ETHx for _receiver based on exchange rate
* @param _receiver account where ETHx minted are sent
* @param _referralId referral id of KOL
* @return _shares amount of ETHx token minted and sent to receiver
* @dev emits an event with _referralId
*/
function depositViaKOL(address _receiver, string calldata _referralId)
function deposit(address _receiver, string calldata _referralId)
external
payable
override
whenNotPaused
returns (uint256 _shares)
{
_shares = deposit(_receiver);
emit DepositedViaKOL(msg.sender, _receiver, msg.value, _shares, _referralId);
emit DepositReferral(msg.sender, _receiver, msg.value, _shares, _referralId);
}

/**
* @notice stake ETH and mints ETHx for _receiver based on exchange rate
* @notice stake ETH and mint ETHx for _receiver based on exchange rate
* @param _receiver account where ETHx
* @return shares amount of ETHx token minted and sent to receiver
*/
Expand Down
4 changes: 2 additions & 2 deletions contracts/UserWithdrawalManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ contract UserWithdrawalManager is
* @return _requestId
* @dev emits an event with referralId
*/
function requestWithdrawViaKOL(
function requestWithdraw(
uint256 _ethXAmount,
address _owner,
string calldata _referralId
) external override whenNotPaused returns (uint256 _requestId) {
uint256 etherAmount = IStaderStakePoolManager(staderConfig.getStakePoolManager()).previewWithdraw(_ethXAmount);
_requestId = requestWithdraw(_ethXAmount, _owner);
emit WithdrawRequestReceivedViaKOL(msg.sender, _owner, _requestId, _ethXAmount, etherAmount, _referralId);
emit WithdrawRequestReferral(msg.sender, _owner, _requestId, _ethXAmount, etherAmount, _referralId);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/interfaces/IStaderStakePoolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface IStaderStakePoolManager {

// Events
event UpdatedStaderConfig(address staderConfig);
event DepositedViaKOL(
event DepositReferral(
address indexed caller,
address indexed owner,
uint256 assets,
Expand All @@ -30,7 +30,7 @@ interface IStaderStakePoolManager {
event WithdrawVaultUserShareReceived(uint256 amount);
event UpdatedExcessETHDepositCoolDown(uint256 excessETHDepositCoolDown);

function depositViaKOL(address _receiver, string calldata _referralId) external payable returns (uint256);
function deposit(address _receiver, string calldata _referralId) external payable returns (uint256);

function deposit(address _receiver) external payable returns (uint256);

Expand Down
4 changes: 2 additions & 2 deletions contracts/interfaces/IUserWithdrawalManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface IUserWithdrawalManager {
// Events
event UpdatedFinalizationBatchLimit(uint256 paginationLimit);
event UpdatedStaderConfig(address staderConfig);
event WithdrawRequestReceivedViaKOL(
event WithdrawRequestReferral(
address indexed _msgSender,
address _recipient,
uint256 _requestId,
Expand Down Expand Up @@ -70,7 +70,7 @@ interface IUserWithdrawalManager {

function updateFinalizationBatchLimit(uint256 _paginationLimit) external;

function requestWithdrawViaKOL(
function requestWithdraw(
uint256 _ethXAmount,
address receiver,
string calldata referralId
Expand Down

0 comments on commit 4982308

Please sign in to comment.