Skip to content

Commit

Permalink
test: Fix type id tests
Browse files Browse the repository at this point in the history
  • Loading branch information
b00ste committed Aug 8, 2024
1 parent 1120b62 commit f3132f7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions packages/lsp-smart-contracts/contracts/Mocks/LSP1TypeIDsTester.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import {
_TYPEID_LSP14_OwnershipTransferred_SenderNotification,
_TYPEID_LSP14_OwnershipTransferred_RecipientNotification
} from "@lukso/lsp14-contracts/contracts/LSP14Constants.sol";
import {
_TYPEID_LSP26_FOLLOW,
_TYPEID_LSP26_UNFOLLOW
} from "@lukso/lsp26-contracts/contracts/LSP26Constants.sol";

error LSP1TypeIdHashIsWrong(bytes32 typeIdHash, string typeIdname);

Expand Down Expand Up @@ -92,6 +96,15 @@ contract LSP1TypeIDsTester {
"LSP14OwnershipTransferred_RecipientNotification"
] = _TYPEID_LSP14_OwnershipTransferred_RecipientNotification;
// -------------------

// ------ LSP26 ------
_typeIds[
"LSP26FollowerSystem_FollowNotification"
] = _TYPEID_LSP26_FOLLOW;
_typeIds[
"LSP26FollowerSystem_UnfollowNotification"
] = _TYPEID_LSP26_UNFOLLOW;
// -------------------
}

function verifyLSP1TypeID(
Expand Down
6 changes: 4 additions & 2 deletions packages/lsp26-contracts/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ export const INTERFACE_ID_LSP26 = '0x2b299cea';

export const LSP26_TYPE_IDS = {
// keccak256('LSP26FollowerSystem_FollowNotification')
_TYPEID_LSP26_FOLLOW: '0x71e02f9f05bcd5816ec4f3134aa2e5a916669537ec6c77fe66ea595fabc2d51a',
LSP26FollowerSystem_FollowNotification:
'0x71e02f9f05bcd5816ec4f3134aa2e5a916669537ec6c77fe66ea595fabc2d51a',

// keccak256('LSP26FollowerSystem_UnfollowNotification')
_TYPEID_LSP26_UNFOLLOW: '0x9d3c0b4012b69658977b099bdaa51eff0f0460f421fba96d15669506c00d1c4f',
LSP26FollowerSystem_UnfollowNotification:
'0x9d3c0b4012b69658977b099bdaa51eff0f0460f421fba96d15669506c00d1c4f',
};

0 comments on commit f3132f7

Please sign in to comment.