Smart Contracts Architecture
The Tokentagged protocol uses a modular architecture that combines maximum security via hardware-based crypto chips (EAL 6+) with decentralized verification.
High-Level Overview
The system connects physical objects with the blockchain. At its core is the cryptographic verification of signatures generated directly on the NXP P71D321 chip.
The smart contracts act as "gatekeepers": a token (NFT) can only be minted if the physical chip cryptographically proves its authenticity and its authorization.
Architecture Diagram
The following diagram shows how the contracts interact when a user scans and mints a Tokentag.
Contract Components
| Contract | Type | Description |
|---|---|---|
| TokentaggedAssets | Collection | The public main collection (shared contract). Allows users to mint their Tokentags without deploying their own contract. |
| TokentaggedCollection | Collection | Exclusive collections for brands or creators (whitelist-only). These contracts are owned by the creator. |
| Tokentagged | Abstract Core | Contains the bit-splitting logic for token IDs and the interface to hardware verification. Not deployed directly; inherited by collections. |
| TokentaggedSignerRegistry | Security | Manages the "root of trust". Stores the manufacturer's public keys to validate chip authenticity (attestation). |
Process Flow: Secure Minting
This process shows how a token is created securely. Three signature layers are verified to ensure origin (manufacturer), integrity (card key), and authorization (user activation).