Overview
The NFT layer represents unique, non-fungible assets — a single land parcel deed, a single property title, a single mining license, a single certified warehouse receipt. It mirrors the ERC-20 layer’s architecture (UUPS proxies, role-based access, pluggable identity verifier) but issuesERC721Upgradeable tokens instead of fungible balances.
AnkaraNFTBase
Abstract base contract inherited by all four NFT templates. Provides:ERC721Upgradeable— standard non-fungible tokenERC721PausableUpgradeable— halt transfersERC721BurnableUpgradeable— token burningAccessControlUpgradeable— role-based permissionsUUPSUpgradeable— upgrade authorization
Roles
admin_ at initialization, same as the ERC-20 base.
State
linkToERC20() (MANAGER_ROLE) lets an NFT deed reference a companion fungible token — for example, a RealEstateNFT deed backing a RealEstateToken that represents fractional ownership of the same property.
Minting
Templates call the internal_mintNext(to) helper, which auto-increments the token ID starting at 1 and runs the identity-verifier check before minting:
Transfer Hook
Every mint, burn, and transfer passes through_update(), exactly like the ERC-20 base’s _update() — the identity verifier is checked for both from and to when set (skipped on mint for from, skipped on burn for to):
Templates
Each template extends
AnkaraNFTBase with its own metadata struct (e.g. RealEstateNFTMetadata has propertyId, propertyType, locationAddress, titleDocumentHash, valuationUSD, rentalYieldBps, etc.) and a mint(address to, ...metadata) function restricted to MINTER_ROLE.
NFTFactory
Deploys all four NFT templates viaERC1967Proxy, following the exact same pattern as TokenFactory:
- Owner registers an implementation address per template via
registerTemplate() - Developer calls
deployFarmlandNFT()/deployRealEstateNFT()/deployMiningRightsNFT()/deployCommodityVaultNFT() - Factory deploys an
ERC1967Proxypointing at the registered implementation - The developer’s
admin_address receives full role-based control of the new NFT contract - An optional native-token deployment fee is collected (
0during testnet)
totalDeployedNFTs(), getDeployerNFTs(address deployer).
SDK Integration
TokenFactory.deployFarmlandNFT() / deployRealEstateNFT() / deployMiningRightsNFT() / deployCommodityVaultNFT() wrap the factory calls, plus getDeployedNFTs() and totalDeployedNFTs() for the registry views. See the CLI’s ankara deploy-nft command for an interactive example.