HappyGaj NFT - Smart Contract Audit Report

Summary

HappyGaj Audit Report HappyGaj ($HPYGAJ) is a new protocol that allows users to purchase HappyGaj NFTs.

We audited the HappyGaj contract at commit b11906cfeffd8fe4900bbfe00e5d2a0ee2d7ccba on the project team's Github repository.


Notes on the Contract:
  • The maximum supply is set to 5,000 HappyGaj NFTs.
  • Any user has the ability to purchase HappyGaj NFTs in exchange for ETH.
  • The standard price for purchasing HappyGaj NFTs is 0.05 ETH per NFT, however users can qualify for discounts.
  • Users who hold at least 1 $LOOT token can purchase HappyGaj NFTs at a rate of 0.035 ETH per NFT.
  • Users who hold at least 5,000 $GAJ token can purchase HappyGaj NFTs at a rate of 0.03 ETH per NFT.
  • The project team is able to mint themselves up to 250 HappyGaj NFTs at no cost.
  • There is a maximum transaction amount which imposes a limit of 20 NFTs that can be purchased during any given transaction.
  • Users must exercise caution as to enter the exact amount of ETH required for purchasing their desired amount of NFTs. Any excess amount of ETH provided will be accepted and sent directly to the project team.

  • The owner has the ability to withdraw all of the ETH from the contract address at any time.
  • The owner has the ability to pause/unpause the purchasing of NFTs at any time.
  • The owner has the ability to update the ProvinceHash, BaseURI at any time.
  • The owner has the ability to update an NFT's license text at any time until it is locked by the project team.
  • The contract utilizes SafeMath to prevent overflows and complies with the ERC721 standard.
Audit Findings Summary
  • No external threats were identified.
  • Users must exercise caution as to enter the exact amount of ETH required for purchasing their desired amount of NFTs. Any excess amount of ETH provided will be accepted and sent directly to the project team.
  • Date: September 27th, 2021

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Deprecated OpcodesN/APASS
Ether ThiefN/APASS
ExceptionsN/APASS
External CallsN/APASS
Integer Over/UnderflowN/APASS
Multiple SendsN/APASS
SuicideN/APASS
State Change External CallsN/APASS
Unchecked RetvalN/APASS
User Supplied AssertionN/APASS
Critical Solidity CompilerN/APASS
Overall Contract Safety PASS

ERC20 Token Graph

Multi-file Token


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 + [Int] IERC165 
    - [Ext] supportsInterface

 + [Int] IERC721 (IERC165)
    - [Ext] balanceOf
    - [Ext] ownerOf
    - [Ext] safeTransferFrom #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] getApproved
    - [Ext] setApprovalForAll #
    - [Ext] isApprovedForAll
    - [Ext] safeTransferFrom #

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IERC721Metadata (IERC721)
    - [Ext] name
    - [Ext] symbol
    - [Ext] tokenURI

 + [Int] IERC721Enumerable (IERC721)
    - [Ext] totalSupply
    - [Ext] tokenOfOwnerByIndex
    - [Ext] tokenByIndex

 + [Int] IERC721Receiver 
    - [Ext] onERC721Received #

 +  ERC165 (IERC165)
    - [Int]  #
    - [Pub] supportsInterface
    - [Int] _registerInterface #

 + [Lib] SafeMath 
    - [Int] tryAdd
    - [Int] trySub
    - [Int] tryMul
    - [Int] tryDiv
    - [Int] tryMod
    - [Int] add
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] mod
    - [Int] sub
    - [Int] div
    - [Int] mod

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Prv] _verifyCallResult

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at

 + [Lib] EnumerableMap 
    - [Prv] _set #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Prv] _tryGet
    - [Prv] _get
    - [Prv] _get
    - [Int] set #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] tryGet
    - [Int] get
    - [Int] get

 + [Lib] Strings 
    - [Int] toString

 +  ERC721 (Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable)
    - [Pub]  #
    - [Pub] balanceOf
    - [Pub] ownerOf
    - [Pub] name
    - [Pub] symbol
    - [Pub] tokenURI
    - [Pub] baseURI
    - [Pub] tokenOfOwnerByIndex
    - [Pub] totalSupply
    - [Pub] tokenByIndex
    - [Pub] approve #
    - [Pub] getApproved
    - [Pub] setApprovalForAll #
    - [Pub] isApprovedForAll
    - [Pub] transferFrom #
    - [Pub] safeTransferFrom #
    - [Pub] safeTransferFrom #
    - [Int] _safeTransfer #
    - [Int] _exists
    - [Int] _isApprovedOrOwner
    - [Int] _safeMint #
    - [Int] _safeMint #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _transfer #
    - [Int] _setTokenURI #
    - [Int] _setBaseURI #
    - [Prv] _checkOnERC721Received #
    - [Int] _approve #
    - [Int] _beforeTokenTransfer #

 +  Ownable (Context)
    - [Int]  #
    - [Pub] owner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 +  HappyGaj (ERC721, Ownable)
    - [Pub]  #
       - modifiers: ERC721
    - [Pub] withdraw #
       - modifiers: onlyOwner
    - [Pub] reserveHappyGajs #
       - modifiers: onlyOwner
    - [Pub] setProvenanceHash #
       - modifiers: onlyOwner
    - [Pub] setBaseURI #
       - modifiers: onlyOwner
    - [Pub] flipSaleState #
       - modifiers: onlyOwner
    - [Ext] tokensOfOwner
    - [Pub] tokenLicense
    - [Pub] lockLicense #
       - modifiers: onlyOwner
    - [Pub] changeLicense #
       - modifiers: onlyOwner
    - [Pub] mintHappyGaj ($)
    - [Pub] mintHappyGajWithLoot ($)
    - [Pub] mintHappyGajWithGaj ($)
    - [Pub] changeHappyGajName #
    - [Pub] viewHappyGajName
    - [Ext] happyGajNamesOfOwner