Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
Fixes PR reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
leeren committed Jan 20, 2024
1 parent eafd446 commit dba4d74
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 145 deletions.
34 changes: 0 additions & 34 deletions contracts/interfaces/erc6551/IERC6551Registry.sol

This file was deleted.

8 changes: 6 additions & 2 deletions contracts/lib/IP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ pragma solidity ^0.8.21;
/// @notice Library for constants, structs, and helper functions used for IP.
library IP {
/// @notice Core metadata associated with an IP.
/// @dev This is what is fetched when `metadata()` is called from an IP
/// resolver, and includes aggregated attributes fetched from various
/// modules in addition to that which is stored on the resolver itself.
struct Metadata {
// The current owner of the IP.
address owner;
Expand All @@ -24,8 +27,9 @@ library IP {
}

/// @notice Core metadata exclusively saved by the IP resolver.
/// @dev Resolved attributes not referenced here are processed through
/// their corresponding data modules (e.g. licensing for license data).
/// @dev This only encompasses metadata which is stored on the IP metadata
/// resolver itself, and does not include those attributes which may
/// be fetched from different modules (e.g. the licensing modules).
struct MetadataRecord {
// The name associated with the IP.
string name;
Expand Down
2 changes: 2 additions & 0 deletions contracts/registries/IPRecordRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ contract IPRecordRegistry is IIPRecordRegistry {
/// @param tokenId The token identifier of the NFT.
function createIPAccount(uint256 chainId, address tokenContract, uint256 tokenId) external returns (address) {
address account = IP_ACCOUNT_REGISTRY.ipAccount(chainId, tokenContract, tokenId);
// TODO: Finalize disambiguation between IP accounts and IP identifiers.
if (account.code.length != 0) {
revert Errors.IPRecordRegistry_IPAccountAlreadyCreated();
}
Expand Down Expand Up @@ -158,6 +159,7 @@ contract IPRecordRegistry is IIPRecordRegistry {
if (resolverAddr == address(0)) {
revert Errors.IPRecordRegistry_ResolverInvalid();
}
// Resolvers may not be set unless the IP was registered into the protocol.
if (_resolvers[id] == address(0)) {
revert Errors.IPRecordRegistry_NotYetRegistered();
}
Expand Down
4 changes: 2 additions & 2 deletions test/foundry/ModuleRegistry.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "contracts/IPAccountImpl.sol";
import "contracts/interfaces/IIPAccount.sol";
import "lib/reference/src/interfaces/IERC6551Account.sol";
import "test/foundry/mocks/MockERC721.sol";
import { MockERC6551Registry} from "test/foundry/mocks/MockERC6551Registry.sol";
import { ERC6551Registry } from "lib/reference/src/ERC6551Registry.sol";
import "test/foundry/mocks/MockAccessController.sol";
import "test/foundry/mocks/MockModule.sol";
import "contracts/registries/ModuleRegistry.sol";
Expand All @@ -18,7 +18,7 @@ contract ModuleRegistryTest is Test {
IPAccountRegistry public registry;
IPAccountImpl public implementation;
ModuleRegistry public moduleRegistry = new ModuleRegistry();
MockERC6551Registry public erc6551Registry = new MockERC6551Registry();
ERC6551Registry public erc6551Registry = new ERC6551Registry();
MockAccessController public accessController = new MockAccessController();
MockModule public module;

Expand Down
107 changes: 0 additions & 107 deletions test/foundry/mocks/MockERC6551Registry.sol

This file was deleted.

0 comments on commit dba4d74

Please sign in to comment.