minor update

This commit is contained in:
Shriya Tyagi 2022-10-21 04:10:04 +04:00
parent 23c966d2df
commit 671bf7a714
2 changed files with 12 additions and 7 deletions

View File

@ -3,7 +3,11 @@ pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
contract Events { contract Events {
event LogClaimedMorpho(uint256 claimable, bytes32[] proofs); event LogClaimedMorpho(
address account,
uint256 claimable,
bytes32[] proof
);
event LogClaimedAave( event LogClaimedAave(
address[] poolTokenAddresses, address[] poolTokenAddresses,

View File

@ -13,20 +13,21 @@ abstract contract MorphoRewards is Helpers, Events {
/** /**
* @dev Claim Pending MORPHO Rewards. * @dev Claim Pending MORPHO Rewards.
* @notice Claims rewards. * @notice Claims rewards.
* @param _account The address of the claimer.
* @param _claimable The overall claimable amount of token rewards. * @param _claimable The overall claimable amount of token rewards.
* @param _proofs The merkle proof that validates this claim. * @param _proof The merkle proof that validates this claim.
*/ */
function claimMorpho(uint256 _claimable, bytes32[] calldata _proofs) function claimMorpho(address _account, uint256 _claimable, bytes32[] calldata _proof)
external external
payable payable
returns (string memory _eventName, bytes memory _eventParam) returns (string memory _eventName, bytes memory _eventParam)
{ {
require(_proofs.length > 0, "proofs-empty"); require(_proof.length > 0, "proofs-empty");
MORPHO_REWARDS.claim(address(this), _claimable, _proofs); MORPHO_REWARDS.claim(_account, _claimable, _proof);
_eventName = "LogClaimedMorpho(uint256,bytes32[])"; _eventName = "LogClaimedMorpho(address,uint256,bytes32[])";
_eventParam = abi.encode(_claimable, _proofs); _eventParam = abi.encode(_account, _claimable, _proof);
} }
/** /**