Skip to content

Commit 6351159

Browse files
committed
fix: linting
1 parent a91bf8e commit 6351159

File tree

4 files changed

+39
-12
lines changed

4 files changed

+39
-12
lines changed

contracts/story-nft/OrgStoryNFTFactory.sol

+6-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ contract OrgStoryNFTFactory is IOrgStoryNFTFactory, AccessManagedUpgradeable, UU
6262

6363
// solhint-disable-next-line max-line-length
6464
// keccak256(abi.encode(uint256(keccak256("story-protocol-periphery.OrgStoryNFTFactory")) - 1)) & ~bytes32(uint256(0xff));
65-
bytes32 private constant OrgStoryNFTFactoryStorageLocation = 0x7ed1ac2e1c0769416119d5b0f885c648d2baac2de18cef73faf81ee04f3f7300;
65+
bytes32 private constant OrgStoryNFTFactoryStorageLocation =
66+
0x7ed1ac2e1c0769416119d5b0f885c648d2baac2de18cef73faf81ee04f3f7300;
6667

6768
/// @custom:oz-upgrades-unsafe-allow constructor
6869
constructor(
@@ -156,7 +157,8 @@ contract OrgStoryNFTFactory is IOrgStoryNFTFactory, AccessManagedUpgradeable, UU
156157
orgNft = address(ORG_NFT);
157158

158159
// Creates a new BeaconProxy for the story NFT template and initializes it
159-
orgStoryNft = address(new BeaconProxy(
160+
orgStoryNft = address(
161+
new BeaconProxy(
160162
IOrgStoryNFT(orgStoryNftTemplate).getBeacon(),
161163
abi.encodeWithSelector(IOrgStoryNFT.initialize.selector, orgTokenId, orgIpId, storyNftInitParams)
162164
)
@@ -211,7 +213,8 @@ contract OrgStoryNFTFactory is IOrgStoryNFTFactory, AccessManagedUpgradeable, UU
211213
orgNft = address(ORG_NFT);
212214

213215
// Creates a new BeaconProxy for the story NFT template and initializes it
214-
orgStoryNft = address(new BeaconProxy(
216+
orgStoryNft = address(
217+
new BeaconProxy(
215218
IOrgStoryNFT(orgStoryNftTemplate).getBeacon(),
216219
abi.encodeWithSelector(IOrgStoryNFT.initialize.selector, orgTokenId, orgIpId, storyNftInitParams)
217220
)

contracts/story-nft/StoryBadgeNFT.sol

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ contract StoryBadgeNFT is IStoryBadgeNFT, BaseOrgStoryNFT, ERC721Holder {
3838
}
3939

4040
// keccak256(abi.encode(uint256(keccak256("story-protocol-periphery.StoryBadgeNFT")) - 1)) & ~bytes32(uint256(0xff));
41-
bytes32 private constant StoryBadgeNFTStorageLocation = 0x00c5d7dc46f601fb1120e8b9ebb4fdf899cffbfddad19ced3e4dad5853224400;
41+
bytes32 private constant StoryBadgeNFTStorageLocation =
42+
0x00c5d7dc46f601fb1120e8b9ebb4fdf899cffbfddad19ced3e4dad5853224400;
4243

4344
constructor(
4445
address ipAssetRegistry,
@@ -86,7 +87,8 @@ contract StoryBadgeNFT is IStoryBadgeNFT, BaseOrgStoryNFT, ERC721Holder {
8687

8788
// The given signature must be valid
8889
bytes32 digest = keccak256(abi.encodePacked(msg.sender)).toEthSignedMessageHash();
89-
if (!SignatureChecker.isValidSignatureNow($.signer, digest, signature)) revert StoryBadgeNFT__InvalidSignature();
90+
if (!SignatureChecker.isValidSignatureNow($.signer, digest, signature))
91+
revert StoryBadgeNFT__InvalidSignature();
9092

9193
// Mint the badge and register it as an IP
9294
(tokenId, ipId) = _mintAndRegisterIp(address(this), $.tokenURI);

test/story-nft/OrgNFT.t.sol

+13-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ contract OrgNFTTest is BaseTest {
6363

6464
function test_OrgNFT_revert_setTokenURI_CallerIsNotOwner() public {
6565
vm.startPrank(u.bob);
66-
vm.expectRevert(abi.encodeWithSelector(IOrgNFT.OrgNFT__CallerNotOwner.selector, 0, u.bob, rootOrgStoryNftOwner));
66+
vm.expectRevert(
67+
abi.encodeWithSelector(IOrgNFT.OrgNFT__CallerNotOwner.selector, 0, u.bob, rootOrgStoryNftOwner)
68+
);
6769
orgNft.setTokenURI(0, "test");
6870
vm.stopPrank();
6971
}
@@ -103,12 +105,20 @@ contract OrgNFTTest is BaseTest {
103105
function test_OrgNFT_revert_mintOrgNft_CallerIsNotStoryNftFactory() public {
104106
vm.startPrank(u.bob);
105107
vm.expectRevert(
106-
abi.encodeWithSelector(IOrgNFT.OrgNFT__CallerNotOrgStoryNFTFactory.selector, u.bob, address(orgStoryNftFactory))
108+
abi.encodeWithSelector(
109+
IOrgNFT.OrgNFT__CallerNotOrgStoryNFTFactory.selector,
110+
u.bob,
111+
address(orgStoryNftFactory)
112+
)
107113
);
108114
orgNft.mintRootOrgNft(u.bob, "test");
109115

110116
vm.expectRevert(
111-
abi.encodeWithSelector(IOrgNFT.OrgNFT__CallerNotOrgStoryNFTFactory.selector, u.bob, address(orgStoryNftFactory))
117+
abi.encodeWithSelector(
118+
IOrgNFT.OrgNFT__CallerNotOrgStoryNFTFactory.selector,
119+
u.bob,
120+
address(orgStoryNftFactory)
121+
)
112122
);
113123
orgNft.mintOrgNft(u.bob, "test");
114124
vm.stopPrank();

test/story-nft/OrgStoryNFTFactory.t.sol

+16-4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ contract OrgStoryNFTFactoryTest is BaseTest {
6464
testOrgStoryNftFactoryImpl,
6565
abi.encodeCall(
6666
OrgStoryNFTFactory.initialize,
67-
(address(protocolAccessManager), address(defaultOrgStoryNftTemplate), address(orgStoryNftFactorySigner))
67+
(
68+
address(protocolAccessManager),
69+
address(defaultOrgStoryNftTemplate),
70+
address(orgStoryNftFactorySigner)
71+
)
6872
)
6973
)
7074
);
@@ -256,7 +260,10 @@ contract OrgStoryNFTFactoryTest is BaseTest {
256260
orgStoryNftFactory.setDefaultOrgStoryNftTemplate(address(0));
257261

258262
vm.expectRevert(
259-
abi.encodeWithSelector(IOrgStoryNFTFactory.OrgStoryNFTFactory__UnsupportedIOrgStoryNFT.selector, address(orgNft))
263+
abi.encodeWithSelector(
264+
IOrgStoryNFTFactory.OrgStoryNFTFactory__UnsupportedIOrgStoryNFT.selector,
265+
address(orgNft)
266+
)
260267
);
261268
orgStoryNftFactory.setDefaultOrgStoryNftTemplate(address(orgNft));
262269
vm.stopPrank();
@@ -272,7 +279,10 @@ contract OrgStoryNFTFactoryTest is BaseTest {
272279
orgStoryNftFactory.whitelistNftTemplate(address(0));
273280

274281
vm.expectRevert(
275-
abi.encodeWithSelector(IOrgStoryNFTFactory.OrgStoryNFTFactory__UnsupportedIOrgStoryNFT.selector, address(orgNft))
282+
abi.encodeWithSelector(
283+
IOrgStoryNFTFactory.OrgStoryNFTFactory__UnsupportedIOrgStoryNFT.selector,
284+
address(orgNft)
285+
)
276286
);
277287
orgStoryNftFactory.whitelistNftTemplate(address(orgNft));
278288
vm.stopPrank();
@@ -337,7 +347,9 @@ contract OrgStoryNFTFactoryTest is BaseTest {
337347

338348
signature = _signAddress(orgStoryNftFactorySignerSk, u.bob);
339349
vm.prank(u.alice);
340-
vm.expectRevert(abi.encodeWithSelector(IOrgStoryNFTFactory.OrgStoryNFTFactory__InvalidSignature.selector, signature));
350+
vm.expectRevert(
351+
abi.encodeWithSelector(IOrgStoryNFTFactory.OrgStoryNFTFactory__InvalidSignature.selector, signature)
352+
);
341353
orgStoryNftFactory.deployOrgStoryNft({
342354
orgStoryNftTemplate: address(defaultOrgStoryNftTemplate),
343355
orgNftRecipient: u.alice,

0 commit comments

Comments
 (0)