Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address a series issues of event #187

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions contracts/interfaces/ip-org/IIPOrgController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,35 @@ import { IPOrgParams } from "contracts/lib/IPOrgParams.sol";
interface IIPOrgController {

/// @notice Emits when a new IP Org is registered.
/// @param owner_ The address of the IP Org owner.
/// @param ipAssetOrg_ The address of the new IP Org contract.
/// @param name_ Descriptive name for the new IP Org contract.
/// @param symbol_ A describe symbol for the new IP Org contract.
/// @param owner The address of the IP Org owner.
/// @param ipAssetOrg The address of the new IP Org contract.
/// @param name Descriptive name for the new IP Org contract.
/// @param symbol A describe symbol for the new IP Org contract.
/// @param ipAssetTypes String descriptors of the IP asset types available.
event IPOrgRegistered(
address owner_,
address ipAssetOrg_,
string name_,
string symbol_
address owner,
address ipAssetOrg,
string name,
string symbol,
string[] ipAssetTypes
kingster-will marked this conversation as resolved.
Show resolved Hide resolved
);

/// @notice Emits when an IP Org is transferred to a new owner.
/// @param ipOrg_ The address of the IP Org.
/// @param prevOwner_ The address of the previous owner of the IP Org.
/// @param newOwner_ The address of the new owner of the IP Org.
/// @param ipOrg The address of the IP Org.
/// @param prevOwner The address of the previous owner of the IP Org.
/// @param newOwner The address of the new owner of the IP Org.
event IPOrgTransferred(
address ipOrg_,
address prevOwner_,
address newOwner_
address ipOrg,
address prevOwner,
address newOwner
);

/// @notice Emits when an ownership transfer is initialized for a new owner.
/// @param ipOrg_ The address of the IP Org.
/// @param pendingOwner_ The pending owner to set for the IP Org.
/// @param ipOrg The address of the IP Org.
/// @param pendingOwner The pending owner to set for the IP Org.
event IPOrgPendingOwnerSet(
address ipOrg_,
address pendingOwner_
address ipOrg,
address pendingOwner
);

/// @notice Registers a new IP Org.
Expand Down
11 changes: 6 additions & 5 deletions contracts/interfaces/ip-org/IIPOrgFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import { IPOrgParams } from "contracts/lib/IPOrgParams.sol";
interface IIPOrgController is IVersioned {

event IPOrgRegistered(
address owner_,
address ipAssetOrg_,
string name_,
string symbol_,
string tokenURI_
address owner,
address ipAssetOrg,
string name,
string symbol,
string tokenURI,
string[] ipAssetTypes
);

function registerIpOrg(IPOrgParams.RegisterIPOrgParams calldata params_) external returns(address);
Expand Down
8 changes: 4 additions & 4 deletions contracts/interfaces/modules/IModuleRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ interface IModuleRegistry {
/// @notice Emits when a new module is added for a specific IP Org.
event ModuleAdded(
address indexed ipOrg,
string indexed moduleKey,
string moduleKey,
kingster-will marked this conversation as resolved.
Show resolved Hide resolved
address indexed module
);

/// @notice Emits when a module is removed for an IP Org.
event ModuleRemoved(
address indexed ipOrg,
string indexed moduleKey,
string moduleKey,
address indexed module
);

/// @notice Emits when a module is executed for an IP Org.
event ModuleExecuted (
address indexed ipOrg,
string indexed moduleKey,
string moduleKey,
address indexed caller,
bytes selfParams,
bytes[] preHookParams,
Expand All @@ -32,7 +32,7 @@ interface IModuleRegistry {
/// @notice Emits when a module is configured for an IP Org.
event ModuleConfigured(
address indexed ipOrg,
string indexed moduleKey,
string moduleKey,
address indexed caller,
bytes params
);
Expand Down
5 changes: 3 additions & 2 deletions contracts/ip-org/IPOrgController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,11 @@ contract IPOrgController is
);

emit IPOrgRegistered(
msg.sender,
owner_,
ipOrg_,
name_,
symbol_
symbol_,
ipAssetTypes_
);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/modules/base/HookRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ abstract contract HookRegistry {
uint256 public constant INDEX_NOT_FOUND = type(uint256).max;
uint256 public constant MAX_HOOKS = 10;

event HooksRegistered(HookType indexed hType, bytes32 indexed registryKey, address[] indexed hook);
event HooksRegistered(HookType indexed hType, bytes32 indexed registryKey, address[] hook);
kingster-will marked this conversation as resolved.
Show resolved Hide resolved
event HooksCleared(HookType indexed hType, bytes32 indexed registryKey);

/// @dev Modifier to check if the caller is the IPOrg owner.
Expand Down
2 changes: 1 addition & 1 deletion contracts/modules/licensing/LicenseRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ contract LicenseRegistry is ERC721 {
event LicenseRegistered(uint256 indexed id);
event LicenseNftBoundedToIpa(
uint256 indexed licenseId,
uint256 indexed ipaId
uint256 indexed ipAssetId
);
event LicenseActivated(uint256 indexed licenseId);
event LicenseRevoked(uint256 indexed licenseId);
Expand Down
2 changes: 1 addition & 1 deletion test/foundry/modules/base/HookRegistryTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { MockIPOrg } from "test/foundry/mocks/MockIPOrg.sol";
contract HookRegistryTest is BaseTest {
MockHookRegistry hookRegistry;

event HooksRegistered(HookRegistry.HookType indexed hType, bytes32 indexed registryKey, address[] indexed hook);
event HooksRegistered(HookRegistry.HookType indexed hType, bytes32 indexed registryKey, address[] hook);
kingster-will marked this conversation as resolved.
Show resolved Hide resolved
event HooksCleared(HookRegistry.HookType indexed hType, bytes32 indexed registryKey);

function setUp() public override {
Expand Down