The divideNft
function contains two identical access modifiers, which is unnecessary and results in increased gas consumption.
The divideNft
function has two identical onlyNftOwner
access modifiers for the same nftAddress
and tokenId
parameters. This redundancy not only makes the code harder to read but also unnecessarily increases gas consumption during contract execution.
While this issue does not pose an immediate security risk, it can lead to increased gas costs for users interacting with the contract. This can be a concern for users who frequently use the divideNft
function, as they will have to pay more gas fees than necessary.
Solidity programming language, and a local blockchain environment for testing.
To address this issue, remove the duplicate access modifier in the divideNft
function. Keep only one onlyNftOwner
modifier for the given nftAddress
and tokenId
parameters. This will improve the readability of the code and reduce gas consumption during contract execution.
Example:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.