File tree 1 file changed +5
-2
lines changed
packages/lsp8-contracts/contracts
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
80
80
// Mapping a `tokenId` to its authorized operator addresses.
81
81
mapping (bytes32 => EnumerableSet.AddressSet) internal _operators;
82
82
83
+ // Mapping from `tokenId` to `dataKey` to `dataValue`
84
+ mapping (bytes32 => mapping (bytes32 => bytes )) internal _tokenIdData;
85
+
83
86
// --- Token queries
84
87
85
88
/**
@@ -683,7 +686,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
683
686
bytes32 dataKey ,
684
687
bytes memory dataValue
685
688
) internal virtual {
686
- _store[ keccak256 ( bytes . concat ( tokenId, dataKey)) ] = dataValue;
689
+ _tokenIdData[ tokenId][ dataKey] = dataValue;
687
690
emit TokenIdDataChanged (tokenId, dataKey, dataValue);
688
691
}
689
692
@@ -698,7 +701,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
698
701
bytes32 tokenId ,
699
702
bytes32 dataKey
700
703
) internal view virtual returns (bytes memory dataValues ) {
701
- return _store[ keccak256 ( bytes . concat ( tokenId, dataKey)) ];
704
+ return _tokenIdData[ tokenId][ dataKey];
702
705
}
703
706
704
707
/**
You can’t perform that action at this time.
0 commit comments