Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/token/ERC721/Metadata/ERC721MetadataFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ contract ERC721MetadataFacet {
string baseURI;
}

/**
* @notice Returns a pointer to the ERC-721 storage struct.
* @dev Uses inline assembly to access the storage slot defined by STORAGE_POSITION.
* @return s The ERC721Storage struct in storage.
*/
function getStorage() internal pure returns (ERC721MetadataStorage storage s) {
bytes32 position = STORAGE_POSITION;
assembly {
s.slot := position
}
}

bytes32 constant ERC721_STORAGE_POSITION = keccak256("erc721");

/**
Expand All @@ -57,13 +45,25 @@ contract ERC721MetadataFacet {
* @dev Uses inline assembly to access the storage slot defined by STORAGE_POSITION.
* @return s The ERC721Storage struct in storage.
*/
function getERC721Storage() internal pure returns (ERC721Storage storage s) {
function getStorage() internal pure returns (ERC721MetadataStorage storage s) {
bytes32 position = STORAGE_POSITION;
assembly {
s.slot := position
}
}

/**
* @notice Returns a pointer to the ERC-721 storage struct.
* @dev Uses inline assembly to access the storage slot defined by STORAGE_POSITION.
* @return s The ERC721Storage struct in storage.
*/
function getERC721Storage() internal pure returns (ERC721Storage storage s) {
bytes32 position = ERC721_STORAGE_POSITION;
assembly {
s.slot := position
}
}

/**
* @notice Returns the token collection name.
* @return The name of the token collection.
Expand Down
Loading
Loading