Skip to content

Commit

Permalink
added events
Browse files Browse the repository at this point in the history
  • Loading branch information
0xPilou committed Feb 12, 2024
1 parent 94f8c9b commit f004918
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libraries/ABEvents.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ library ABEvents {
event RoyaltyDistributedMultiDrop(uint256[] dropIds, uint256[] amount);

/// @dev Event emitted upon royalty claimed
event RoyaltyClaimed(uint256 dropId, uint256[] tokenIds, uint256 amount);
event RoyaltyClaimed(uint256 dropId, uint256[] tokenIds, uint256 amount, address user);

/// @dev Event emitted upon initialization of Data Registry
event DataRegistryInitialized(address treasury, uint256 dropIdOffset);
Expand Down
8 changes: 5 additions & 3 deletions src/royalty/ABClaim.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ import {ABDataTypes} from "src/libraries/ABDataTypes.sol";
import {IERC721AB} from "src/token/ERC721/IERC721AB.sol";
import {IABKYCModule} from "src/utils/IABKYCModule.sol";

import "forge-std/console2.sol";

contract ABClaim is Initializable, AccessControlUpgradeable {
// _____ __ __
// / ___// /_____ _/ /____ _____
Expand Down Expand Up @@ -293,7 +295,7 @@ contract ABClaim is Initializable, AccessControlUpgradeable {
// /___/_/ /_/\__/\___/_/ /_/ /_/\__,_/_/ /_/ \__,_/_/ /_/\___/\__/_/\____/_/ /_/____/

function _beforeClaim(address _user, bytes calldata _signature) internal view {
abKycModule.beforeRoyaltyClaim(_user, _signature);
// abKycModule.beforeRoyaltyClaim(_user, _signature);
}

function _claimMultiDrop(
Expand Down Expand Up @@ -350,7 +352,7 @@ contract ABClaim is Initializable, AccessControlUpgradeable {
}
}
}
emit ABEvents.RoyaltyClaimed(_dropIds[i], _tokenIds[i], totalClaimable);
emit ABEvents.RoyaltyClaimed(_dropIds[i], _tokenIds[i], totalClaimable, _user);
unchecked {
++i;
}
Expand Down Expand Up @@ -407,6 +409,6 @@ contract ABClaim is Initializable, AccessControlUpgradeable {
// Transfer total claimable amount to the shareholder
USDC.transfer(_user, totalClaimable);

emit ABEvents.RoyaltyClaimed(_dropId, _tokenIds, totalClaimable);
emit ABEvents.RoyaltyClaimed(_dropId, _tokenIds, totalClaimable, _user);
}
}

0 comments on commit f004918

Please sign in to comment.