From 0f9a346a8fb156e3b06f559510661556c594a96f Mon Sep 17 00:00:00 2001 From: Spablob <99089658+Spablob@users.noreply.github.com> Date: Mon, 23 Sep 2024 21:12:10 +0100 Subject: [PATCH] add event IpRoyaltyVaultDeployed (#254) --- contracts/interfaces/modules/royalty/IRoyaltyModule.sol | 5 +++++ contracts/modules/royalty/RoyaltyModule.sol | 2 ++ 2 files changed, 7 insertions(+) diff --git a/contracts/interfaces/modules/royalty/IRoyaltyModule.sol b/contracts/interfaces/modules/royalty/IRoyaltyModule.sol index 783ce3e4..c682bf72 100644 --- a/contracts/interfaces/modules/royalty/IRoyaltyModule.sol +++ b/contracts/interfaces/modules/royalty/IRoyaltyModule.sol @@ -69,6 +69,11 @@ interface IRoyaltyModule is IModule { bytes externalData ); + /// @notice Event emitted when an IP royalty vault is deployed + /// @param ipId The ipId of IP asset + /// @param ipRoyaltyVault The address of the royalty vault + event IpRoyaltyVaultDeployed(address ipId, address ipRoyaltyVault); + /// @notice Sets the treasury address /// @dev Enforced to be only callable by the protocol admin /// @param treasury The address of the treasury diff --git a/contracts/modules/royalty/RoyaltyModule.sol b/contracts/modules/royalty/RoyaltyModule.sol index 6d21a629..b5e08f24 100644 --- a/contracts/modules/royalty/RoyaltyModule.sol +++ b/contracts/modules/royalty/RoyaltyModule.sol @@ -472,6 +472,8 @@ contract RoyaltyModule is IRoyaltyModule, VaultController, ReentrancyGuardUpgrad $.ipRoyaltyVaults[ipId] = ipRoyaltyVault; $.isIpRoyaltyVault[ipRoyaltyVault] = true; + emit IpRoyaltyVaultDeployed(ipId, ipRoyaltyVault); + return ipRoyaltyVault; }