From 873c4c53086c069118fa2dac985073ae1eba1d23 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 12 Dec 2024 14:20:03 +0000 Subject: [PATCH] feat!: add old interfaces ids for lsp7 & lsp8 --- packages/lsp-smart-contracts/constants.ts | 5 +++-- packages/lsp7-contracts/constants.ts | 7 +++---- packages/lsp7-contracts/contracts/LSP7Constants.sol | 4 ++++ packages/lsp8-contracts/constants.ts | 7 +++---- packages/lsp8-contracts/contracts/LSP8Constants.sol | 4 ++++ 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/lsp-smart-contracts/constants.ts b/packages/lsp-smart-contracts/constants.ts index d78844d9e..76b2960d6 100644 --- a/packages/lsp-smart-contracts/constants.ts +++ b/packages/lsp-smart-contracts/constants.ts @@ -32,8 +32,9 @@ export { LSP25_VERSION } from '@lukso/lsp25-contracts'; // Old interface Ids of previous releases of LSP7/8 Tokens // for backward compatibilities for dApps and interfaces -export { INTERFACE_ID_LSP7_PREVIOUS } from '@lukso/lsp7-contracts'; -export { INTERFACE_ID_LSP8_PREVIOUS } from '@lukso/lsp8-contracts'; + +export { INTERFACE_ID_LSP7_V0_12_0 } from '@lukso/lsp7-contracts'; +export { INTERFACE_ID_LSP7_V0_14_0 } from '@lukso/lsp7-contracts'; // ERC165 interface IDs of each LSP import { INTERFACE_ID_LSP0 } from '@lukso/lsp0-contracts'; diff --git a/packages/lsp7-contracts/constants.ts b/packages/lsp7-contracts/constants.ts index a8952a18f..845d16da9 100644 --- a/packages/lsp7-contracts/constants.ts +++ b/packages/lsp7-contracts/constants.ts @@ -1,9 +1,8 @@ export const INTERFACE_ID_LSP7 = '0xc52d6008'; -export const INTERFACE_ID_LSP7_PREVIOUS = { - 'v0.14.0': '0xb3c4928f', - 'v0.12.0': '0xdaa746b7', -} as const; +export const INTERFACE_ID_LSP7_V0_12_0 = '0xdaa746b7'; + +export const INTERFACE_ID_LSP7_V0_14_0 = '0xb3c4928f'; export const LSP7_TYPE_IDS = { // keccak256('LSP7Tokens_SenderNotification') diff --git a/packages/lsp7-contracts/contracts/LSP7Constants.sol b/packages/lsp7-contracts/contracts/LSP7Constants.sol index ab24c50fc..6bed1f234 100644 --- a/packages/lsp7-contracts/contracts/LSP7Constants.sol +++ b/packages/lsp7-contracts/contracts/LSP7Constants.sol @@ -4,6 +4,10 @@ pragma solidity ^0.8.4; // --- ERC165 interface ids bytes4 constant _INTERFACEID_LSP7 = 0xc52d6008; +bytes4 constant _INTERFACEID_LSP7_V0_12_0 = 0xdaa746b7; + +bytes4 constant _INTERFACEID_LSP7_V0_14_0 = 0xb3c4928f; + // --- Token Hooks // keccak256('LSP7Tokens_DelegatorNotification') diff --git a/packages/lsp8-contracts/constants.ts b/packages/lsp8-contracts/constants.ts index 9a1a22f8b..65380a91e 100644 --- a/packages/lsp8-contracts/constants.ts +++ b/packages/lsp8-contracts/constants.ts @@ -1,9 +1,8 @@ export const INTERFACE_ID_LSP8 = '0x3a271706'; -export const INTERFACE_ID_LSP8_PREVIOUS = { - 'v0.14.0': '0xecad9f75', - 'v0.12.0': '0x30dc5278', -} as const; +export const INTERFACE_ID_LSP8_V0_12_0 = '0x30dc5278'; + +export const INTERFACE_ID_LSP8_V0_14_0 = '0xecad9f75'; export const LSP8DataKeys = { LSP8TokenIdFormat: '0xf675e9361af1c1664c1868cfa3eb97672d6b1a513aa5b81dec34c9ee330e818d', diff --git a/packages/lsp8-contracts/contracts/LSP8Constants.sol b/packages/lsp8-contracts/contracts/LSP8Constants.sol index a2b327981..c2ba5890c 100644 --- a/packages/lsp8-contracts/contracts/LSP8Constants.sol +++ b/packages/lsp8-contracts/contracts/LSP8Constants.sol @@ -4,6 +4,10 @@ pragma solidity ^0.8.4; // --- ERC165 interface ids bytes4 constant _INTERFACEID_LSP8 = 0x3a271706; +bytes4 constant _INTERFACEID_LSP8_V0_12_0 = 0x30dc5278; + +bytes4 constant _INTERFACEID_LSP8_V0_14_0 = 0xecad9f75; + // --- ERC725Y Data Keys // keccak256('LSP8TokenIdFormat')