From f004918de297b7e0c0e2298e3611fa2ed2a5416d Mon Sep 17 00:00:00 2001 From: Pilou <76021631+0xPilou@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:11:03 +0100 Subject: [PATCH] added events --- src/libraries/ABEvents.sol | 2 +- src/royalty/ABClaim.sol | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libraries/ABEvents.sol b/src/libraries/ABEvents.sol index 7341413..1dc974d 100644 --- a/src/libraries/ABEvents.sol +++ b/src/libraries/ABEvents.sol @@ -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); diff --git a/src/royalty/ABClaim.sol b/src/royalty/ABClaim.sol index 47c6e58..3d4355e 100644 --- a/src/royalty/ABClaim.sol +++ b/src/royalty/ABClaim.sol @@ -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 { // _____ __ __ // / ___// /_____ _/ /____ _____ @@ -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( @@ -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; } @@ -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); } }