Skip to content

Commit

Permalink
feat!: add old interfaces ids for lsp7 & lsp8
Browse files Browse the repository at this point in the history
  • Loading branch information
skimaharvey committed Dec 12, 2024
1 parent acc576f commit 873c4c5
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
5 changes: 3 additions & 2 deletions packages/lsp-smart-contracts/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
7 changes: 3 additions & 4 deletions packages/lsp7-contracts/constants.ts
Original file line number Diff line number Diff line change
@@ -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')
Expand Down
4 changes: 4 additions & 0 deletions packages/lsp7-contracts/contracts/LSP7Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
7 changes: 3 additions & 4 deletions packages/lsp8-contracts/constants.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
4 changes: 4 additions & 0 deletions packages/lsp8-contracts/contracts/LSP8Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 873c4c5

Please sign in to comment.