Omniscia Seen Haus Audit
ItemsTicketer Code Style Findings
ItemsTicketer Code Style Findings
ITR-01C: Improper Initialization
Type | Severity | Location |
---|---|---|
Standard Conformity | Informational | ItemsTicketer.sol:L46 |
Description:
The ERC1155Upgradeable
contract is initialized with its unchained
counterpart.
Example:
contracts/market/client/ticketers/ItemsTicketer.sol
30contract ItemsTicketer is StringUtils, IEscrowTicketer, MarketClientBase, ERC1155Upgradeable {31
32 // Ticket ID => Ticket33 mapping (uint256 => EscrowTicket) internal tickets;34 35 // Consignment ID => Ticket Claimable Count (does not change after ticket burns)36 mapping (uint256 => uint256) internal consignmentIdToTicketClaimableCount;37
38 /// @dev Next ticket number39 uint256 internal nextTicket;40
41 /**42 * @notice Initializer43 */44 function initialize()45 public {46 __ERC1155_init_unchained(ESCROW_TICKET_URI);47 }
Recommendation:
We advise the normal counterpart to be initialized instead. While it bears no effect as the dependencies of ERC1155Upgradeable
have no logic in their initializers, its still more standardized to do it this way.
Alleviation:
The normal initialize counterpart is now properly invoked in the codebase.