Omniscia Evergon Labs Audit

ERC721FacetStorage Code Style Findings

ERC721FacetStorage Code Style Findings

ERF-01C: Inexistent Specification of Memory Safety

Description:

The referenced assembly block is considered memory-safe yet does not declare it is so.

Example:

packages/contracts/contracts/erc721Facet/ERC721FacetStorage.sol
40function layout() internal pure returns (Layout storage l) {
41 bytes32 slot = STORAGE_SLOT;
42 assembly {
43 l.slot := slot
44 }
45}

Recommendation:

We advise such a declaration to be introduced, potentially aiding the compiler in further optimizations around the generated bytecode of the assembly block.

Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):

The referenced assembly block has been configured as "memory-safe", optimizing its gas cost.

ERF-02C: Non-Standard Storage Slot Definition

Description:

The referenced declaration will define a storage slot for use by a facet of the system's main EIP-2535 Diamond, however, the way it is declared does not adhere to the latest standards.

Example:

packages/contracts/contracts/erc721Facet/ERC721FacetStorage.sol
12/// @dev Unique identifier for the storage slot where the Layout struct is stored.
13bytes32 internal constant STORAGE_SLOT = keccak256("evergonlabs.Staking.ERC721.storage.ERC721FacetStorage");

Recommendation:

We advise the EIP-7201 name-spaced layout approach to be adhered to similarly to OpenZeppelin and other relevant standard libraries, ensuring consistency among the ecosystem's widely utilized libraries and conforming to the latest standards.

Alleviation (b64b659786cf3c84bea52feb3a69f546ba3601f0):

The referenced slot definition has been updated to its standardized EIP-7201 representation, addressing this exhibit.