From 063dc3239395609e368bfb1447e875e92ee91f6c Mon Sep 17 00:00:00 2001 From: b00ste Date: Thu, 8 Aug 2024 15:33:03 +0300 Subject: [PATCH] test: Fix type id tests --- package-lock.json | 59 ++++++++++++++++++- .../contracts/Mocks/LSP1TypeIDsTester.sol | 13 ++++ packages/lsp26-contracts/constants.ts | 6 +- 3 files changed, 74 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c4a50cad..826fc5772 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18154,11 +18154,66 @@ "version": "0.15.0", "license": "Apache-2.0", "dependencies": { - "@lukso/lsp0-contracts": "*", - "@lukso/lsp1-contracts": "*", + "@lukso/lsp0-contracts": "~0.15.0", + "@lukso/lsp1-contracts": "~0.15.0", "@openzeppelin/contracts": "^4.9.3" } }, + "packages/lsp26-contracts/node_modules/@lukso/lsp0-contracts": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lukso/lsp0-contracts/-/lsp0-contracts-0.15.0.tgz", + "integrity": "sha512-dKQu9juDJNxKdJMHkF3wOfjC/VZZW+RonQ5hSw9kBhLAhyFd6SVYU3VSUOYG3G3bLDAE9We+DeONc0N/j4zjIQ==", + "dependencies": { + "@erc725/smart-contracts": "^7.0.0", + "@lukso/lsp1-contracts": "~0.15.0", + "@lukso/lsp14-contracts": "~0.15.0", + "@lukso/lsp17contractextension-contracts": "~0.15.0", + "@lukso/lsp2-contracts": "~0.15.0", + "@lukso/lsp20-contracts": "~0.15.0", + "@openzeppelin/contracts": "^4.9.3" + } + }, + "packages/lsp26-contracts/node_modules/@lukso/lsp1-contracts": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lukso/lsp1-contracts/-/lsp1-contracts-0.15.0.tgz", + "integrity": "sha512-8xhehHa+EOiJ9MfqDStFgF8ot4scER7ip+MCKGF7Ybrv8aWlXyJgfl7H5TX8DA9XZbqb096GKicNi7v79H2hQg==", + "dependencies": { + "@lukso/lsp2-contracts": "~0.15.0", + "@openzeppelin/contracts": "^4.9.3" + } + }, + "packages/lsp26-contracts/node_modules/@lukso/lsp14-contracts": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lukso/lsp14-contracts/-/lsp14-contracts-0.15.0.tgz", + "integrity": "sha512-dqTY9QjGk9b+lZFchqm1ZAJ5c/AJlTPwZtXsqRyJrSS5WHwx3jteh/0mCt/1fmv8dzqgMadtOIJVpEXPannMWw==", + "dependencies": { + "@erc725/smart-contracts": "^7.0.0", + "@lukso/lsp1-contracts": "~0.15.0" + } + }, + "packages/lsp26-contracts/node_modules/@lukso/lsp17contractextension-contracts": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lukso/lsp17contractextension-contracts/-/lsp17contractextension-contracts-0.15.0.tgz", + "integrity": "sha512-fwLrXi1jyiw6DlP6mt+NTweSxyPI3KaKk5UN9OwuT5KbaC7Upm50TFuA/IX+V4gY8/iVdr6uhy7nLg1+LQpSAw==", + "dependencies": { + "@erc725/smart-contracts": "^7.0.0", + "@openzeppelin/contracts": "^4.9.3" + } + }, + "packages/lsp26-contracts/node_modules/@lukso/lsp2-contracts": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lukso/lsp2-contracts/-/lsp2-contracts-0.15.0.tgz", + "integrity": "sha512-3SnuAmdZo+Y7pv5E3DajguCfawf/2KEygAjpV3QNfuK5MnBtNSYTg9nmjvP/+VcAG9nNlkMSGba43s5Jz0TuSw==", + "dependencies": { + "@erc725/smart-contracts": "^7.0.0", + "@openzeppelin/contracts": "^4.9.3" + } + }, + "packages/lsp26-contracts/node_modules/@lukso/lsp20-contracts": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lukso/lsp20-contracts/-/lsp20-contracts-0.15.0.tgz", + "integrity": "sha512-TfAM9tN6zzIQXq0xq3uE0zkBfVjQ52jXY69fvMSBqs/PsKV49J/T4tH9pMqazTgCF1PlAOnoA8m2MTdjJ7OCqA==" + }, "packages/lsp3-contracts": { "name": "@lukso/lsp3-contracts", "version": "0.15.0-rc.0", diff --git a/packages/lsp-smart-contracts/contracts/Mocks/LSP1TypeIDsTester.sol b/packages/lsp-smart-contracts/contracts/Mocks/LSP1TypeIDsTester.sol index ac2dc7156..d9c7c1ced 100644 --- a/packages/lsp-smart-contracts/contracts/Mocks/LSP1TypeIDsTester.sol +++ b/packages/lsp-smart-contracts/contracts/Mocks/LSP1TypeIDsTester.sol @@ -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); @@ -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( diff --git a/packages/lsp26-contracts/constants.ts b/packages/lsp26-contracts/constants.ts index fe11d89bf..fe81df8a2 100644 --- a/packages/lsp26-contracts/constants.ts +++ b/packages/lsp26-contracts/constants.ts @@ -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', };