Omniscia SaucerSwap Audit

NonfungiblePositionManager Code Style Findings

NonfungiblePositionManager Code Style Findings

NPM-01C: Generic Typographic Mistake

Description:

The referenced line contains a typographical mistake (i.e. private variable without an underscore prefix) or generic documentational error (i.e. copy-paste) that should be corrected.

Example:

contracts/NonfungiblePositionManager.sol
69address public _nft; // token id address of the hedera NFT

Recommendation:

We advise this to be done so to enhance the legibility of the codebase.

Alleviation (d8d187efd1fa23b943c82694aaaccb5b9e427096):

The underscore has been omitted from the _nft variable as advised.

NPM-02C: Redundant Statements

Description:

The referenced statements are redundant as they do not affect the outcome of the contract's NonfungiblePositionManager::constructor.

Example:

contracts/NonfungiblePositionManager.sol
83supplyKeyType = supplyKeyType.setBit(4);
84supplyKeyValue.contractId = address(this);
85
86IHederaTokenService.TokenKey[] memory keys = new IHederaTokenService.TokenKey[](1);
87keys[0] = IHederaTokenService.TokenKey (supplyKeyType, supplyKeyValue);
88// Set this contract as supply
89
90supplyKeyType = supplyKeyType.setBit(4);
91supplyKeyValue.contractId = address(this);

Recommendation:

We advise them to be safely omitted, optimizing the contract's deployment gas cost.

Alleviation (d8d187efd1fa23b943c82694aaaccb5b9e427096):

The redundant statements have been safely omitted as advised.

NPM-03C: Suboptimal Struct Declaration Style

Description:

The linked declaration style of a struct is using index-based argument initialization.

Example:

contracts/NonfungiblePositionManager.sol
87keys[0] = IHederaTokenService.TokenKey (supplyKeyType, supplyKeyValue);

Recommendation:

We advise the key-value declaration format to be utilized instead, greatly increasing the legibility of the codebase.

Alleviation (d8d187efd1fa23b943c82694aaaccb5b9e427096):

The SaucerSwap team evaluated this exhibit and opted to acknowledge it.