Omniscia Boson Protocol Audit

BosonVoucher Code Style Findings

BosonVoucher Code Style Findings

BVR-01C: Hard-Coded Interface Type

TypeSeverityLocation
Code StyleBosonVoucher.sol:L98

Description:

The ERC2981 interface ID hard-coded in the referenced statement is ill-advised.

Example:

contracts/protocol/clients/voucher/BosonVoucher.sol
89* 0x2a55205a representes ERC2981 interface id
90 */
91function supportsInterface(bytes4 interfaceId)
92 public
93 view
94 override(ERC721Upgradeable, IERC165Upgradeable)
95 returns (bool)
96{
97 return (interfaceId == type(IBosonVoucher).interfaceId ||
98 interfaceId == 0x2a55205a ||
99 super.supportsInterface(interfaceId));
100}

Recommendation:

We advise the ERC2981 interface to be imported in the codebase and the interfaceId specifier to be utilized for specifying the interface the contract is meant to support.

Alleviation (44009967e4f68092941d841e9e0f5dd2bb31bf0b):

The interfaceId specifier of the IERC2981Upgradeable type is now correctly utilized in place of the literal optimizing the legibility of the codebase.