Skip to content

Commit

Permalink
refactor: make mapping deta key prefix bytes10 (#824)
Browse files Browse the repository at this point in the history
Co-authored-by: Jean Cvllr <31145285+CJ42@users.noreply.github.com>
  • Loading branch information
b00ste and CJ42 authored Dec 6, 2023
1 parent 2bf84f6 commit 0433a6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ bytes32 constant _LSP4_TOKEN_TYPE_KEY = 0xe0261fa95db2eb3b5439bd033cda66d56b96f9
// keccak256('LSP4Creators[]')
bytes32 constant _LSP4_CREATORS_ARRAY_KEY = 0x114bd03b3a46d48759680d81ebb2b414fda7d030a7105a851867accf1c2352e7;

// bytes10(keccak256('LSP4CreatorsMap')) + bytes2(0)
bytes12 constant _LSP4_CREATORS_MAP_KEY_PREFIX = 0x6de85eaf5d982b4e5da00000;
// bytes10(keccak256('LSP4CreatorsMap'))
bytes10 constant _LSP4_CREATORS_MAP_KEY_PREFIX = 0x6de85eaf5d982b4e5da0;

// keccak256('LSP4Metadata')
bytes32 constant _LSP4_METADATA_KEY = 0x9afb95cacc9f95858ec44aa8c3b685511002e30ae54415823f406128b85b238e;
4 changes: 2 additions & 2 deletions contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@ abstract contract LSP6SetDataModule {
* @dev more permissions types starting with `AddressPermissions:...` can be implemented by overriding this function.
*
* // AddressPermissions:MyCustomPermissions:<address>
* bytes12 CUSTOM_PERMISSION_PREFIX = 0x4b80742de2bf9e659ba40000
* bytes10 CUSTOM_PERMISSION_PREFIX = 0x4b80742de2bf9e659ba4
*
* if (bytes12(dataKey) == CUSTOM_PERMISSION_PREFIX) {
* if (bytes10(dataKey) == CUSTOM_PERMISSION_PREFIX) {
* // custom logic
* }
*
Expand Down
2 changes: 1 addition & 1 deletion contracts/LSP6KeyManager/LSP6Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
* Based on the LSP6 Key Manager standard.
*/
library LSP6Utils {
using LSP2Utils for bytes12;
using LSP2Utils for bytes10;

/**
* @dev Read the permissions of a `caller` on an ERC725Y `target` contract.
Expand Down

0 comments on commit 0433a6b

Please sign in to comment.