Can declare __NFTXEligibility_init_bytes
external to save gas
#110
Labels
bug
Something isn't working
Confirmed
duplicate
This issue or pull request already exists
G (Gas Optimization)
Handle
shw
Vulnerability details
Impact
The function
__NFTXEligibility_init_bytes
in the contractNFTXEligibility
can be declared external to save gas. Contracts that inheritNFTXEligibility
and override__NFTXEligibility_init_bytes
, i.e., theNFTX*Eligibility
ones, can also be declared external. Please refer to the following links as details.Proof of Concept
Referenced code:
NFTXEligibility.sol#L13
NFTXDeferEligibility.sol#L32-L37
NFTXListEligibility.sol#L28-L33
NFTXMintRequestEligibility.sol#L58-L68
NFTXRangeEligibility.sol#L44-L54
(NFTXUniqueEligibility.sol#L47-L57)[https://github.com/code-423n4/2021-05-nftx/blob/main/nftx-protocol-v2/contracts/solidity/eligibility/NFTXUniqueEligibility.sol#L47-L57]
Please refer to the files
500.js
,500-original.png
, and500-changed.png
in the following link.PoC: Link to PoC
Tools Used
None
Recommended Mitigation Steps
Change
public
toexternal
andbytes memory
tobytes calldata
.The text was updated successfully, but these errors were encountered: