Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster-will committed Mar 23, 2024
1 parent ffded33 commit 8fc4e78
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 40 deletions.
3 changes: 0 additions & 3 deletions contracts/registries/IPAssetRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { IIPAccount } from "../interfaces/IIPAccount.sol";
import { IIPAssetRegistry } from "../interfaces/registries/IIPAssetRegistry.sol";
import { IPAccountRegistry } from "../registries/IPAccountRegistry.sol";
import { Errors } from "../lib/Errors.sol";
import { IPAccountChecker } from "contracts/lib/registries/IPAccountChecker.sol";
import { IModuleRegistry } from "../interfaces/registries/IModuleRegistry.sol";
import { Governable } from "../governance/Governable.sol";
import { IPAccountStorageOps } from "../lib/IPAccountStorageOps.sol";

Expand Down Expand Up @@ -102,5 +100,4 @@ contract IPAssetRegistry is IIPAssetRegistry, IPAccountRegistry, Governable {
if (id != ipAccount(chainId, tokenContract, tokenId)) return false;
return bytes(IIPAccount(payable(id)).getString("NAME")).length != 0;
}

}
54 changes: 27 additions & 27 deletions test/foundry/integration/BaseIntegration.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -116,35 +116,35 @@ contract BaseIntegration is BaseTest {
parentIpIds[i] = licenseRegistry.licensorIpId(licenseIds[i]);
}

vm.expectEmit();
emit IERC6551Registry.ERC6551AccountCreated({
account: expectedAddr,
implementation: address(ipAccountImpl),
salt: ipAccountRegistry.IP_ACCOUNT_SALT(),
chainId: block.chainid,
tokenContract: nft,
tokenId: tokenId
});
vm.expectEmit();
emit IERC6551Registry.ERC6551AccountCreated({
account: expectedAddr,
implementation: address(ipAccountImpl),
salt: ipAccountRegistry.IP_ACCOUNT_SALT(),
chainId: block.chainid,
tokenContract: nft,
tokenId: tokenId
});

vm.expectEmit();
emit IIPAccountRegistry.IPAccountRegistered({
account: expectedAddr,
implementation: address(ipAccountImpl),
chainId: block.chainid,
tokenContract: nft,
tokenId: tokenId
});
vm.expectEmit();
emit IIPAccountRegistry.IPAccountRegistered({
account: expectedAddr,
implementation: address(ipAccountImpl),
chainId: block.chainid,
tokenContract: nft,
tokenId: tokenId
});

vm.expectEmit();
emit IIPAssetRegistry.IPRegistered({
ipId: expectedAddr,
chainId: block.chainid,
tokenContract: nft,
tokenId: tokenId,
name: string.concat(block.chainid.toString(), ": Ape #", tokenId.toString()),
uri: string.concat("https://storyprotocol.xyz/erc721/", tokenId.toString()),
registrationDate: block.timestamp
});
vm.expectEmit();
emit IIPAssetRegistry.IPRegistered({
ipId: expectedAddr,
chainId: block.chainid,
tokenContract: nft,
tokenId: tokenId,
name: string.concat(block.chainid.toString(), ": Ape #", tokenId.toString()),
uri: string.concat("https://storyprotocol.xyz/erc721/", tokenId.toString()),
registrationDate: block.timestamp
});

address ipId = ipAssetRegistry.register(nft, tokenId);

Expand Down
5 changes: 1 addition & 4 deletions test/foundry/modules/dispute/ArbitrationPolicySP.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ contract TestArbitrationPolicySP is BaseTest {
vm.label(expectedAddr, "IPAccount0");

vm.startPrank(u.admin);
ipAddr = ipAssetRegistry.register(
address(mockNFT),
0
);
ipAddr = ipAssetRegistry.register(address(mockNFT), 0);
licensingModule.addPolicyToIp(ipAddr, policyIds["pil_cheap_flexible"]);

// set arbitration policy
Expand Down
7 changes: 1 addition & 6 deletions test/foundry/utils/DeployHelper.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { MockERC20 } from "../mocks/token/MockERC20.sol";
import { MockERC721 } from "../mocks/token/MockERC721.sol";
import { TestProxyHelper } from "./TestProxyHelper.sol";


contract DeployHelper {
// TODO: three options, auto/mock/real in deploy condition, so that we don't need to manually
// call getXXX to get mock contract (if there's no real contract deployed).
Expand Down Expand Up @@ -222,11 +221,7 @@ contract DeployHelper {
console2.log("DeployHelper: Using REAL IPAccountRegistry");

// TODO: Allow using mock IPAssetRegistry, instead of forcing deployment of actual IPAssetRegistry.
ipAssetRegistry = new IPAssetRegistry(
address(erc6551Registry),
address(ipAccountImpl),
getGovernance()
);
ipAssetRegistry = new IPAssetRegistry(address(erc6551Registry), address(ipAccountImpl), getGovernance());
console2.log("DeployHelper: Using REAL IPAssetRegistry");

if (d.licenseRegistry) {
Expand Down

0 comments on commit 8fc4e78

Please sign in to comment.