The HAPIID contract is a specialized ERC-721 NFT (Non-Fungible Token) contract with additional functionalities. It is built on Ethereum and primarily serves as a unique identification mechanism.
- ERC-721 Compliance: Inherits from OpenZeppelin's ERC-721 standard for NFTs.
- Enumerable: Implements the ERC721Enumerable extension for enumeration of token ownership.
- Access Control: Utilizes OpenZeppelin's
AccessControlto manage special roles like aMINTER_ROLE, which is responsible for minting new tokens. - Custom URI: Overrides
_baseURIto provide a custom base URI (https://id.hapi.one/) for metadata. - Minting: Exposes a
safeMintfunction which allows addresses with theMINTER_ROLEto securely mint new tokens. - Interface Support: Ensures compliance with various interfaces via
supportsInterface.
The contract has a security contact specified ([email protected]) to report security vulnerabilities.
# Run tests
npx hardhat test
# Run tests with gas calculation
REPORT_GAS=true npx hardhat test
# Run a local node
npx hardhat node
# Deploy the contract on the local node
npx hardhat run scripts/deploy.ts