Skip to main content

Contract Reference

Technical reference for developers who want to interact with the Tokentagged Smart Contracts.

Deployed Contracts

Here you can find the official addresses of our Smart Contracts. Always verify that you are interacting with the correct addresses.

Verified Source Code

The complete source code is verified on Etherscan.

Mainnet (Ethereum)

ContractAddressLinks
TokentaggedAssets0xeEdCB10A43306F1fc8Bc80B8B0Bf16112c739815Etherscan ↗
SignerRegistry0x51670DB4a91153A94d287BaFe45474CC40f6b8E3Etherscan ↗

TokentaggedAssets (Public Collection)

The main contract for public mints.

mintTokentag

Mints a new token based on a physical scan.

function mintTokentag(
uint256 id,
string memory tokenURI,
uint256 amount,
address royaltyReceiver,
uint96 royaltyFraction,
uint blocknumber,
uint8 v, bytes32 r, bytes32 s, // 1. Chip Signature (User Action)
bytes memory cardAtstSignature, // 2. Card Attestation (Integrity)
bytes memory atstSignature // 3. Root Attestation (Authenticity)
) external
  • id: The Token ID (containing the Card Address and Type-Flags).
  • blocknumber: Block number of the signature creation (Replay Protection).
  • v, r, s: The signature of the current transaction (generated with the Card-Private-Key).
  • cardAtstSignature: Proof that the Card-Key was derived from the Master-Key.
  • atstSignature: Proof that the Master-Key was signed by the Issuer (Tokentagged).

burn

Allows users to destroy the digital twin.

function burn(uint256 id, uint256 amount) external
Irreversible

When the last token of an ID is burned (totalSupply == 0), the status _burned[id] = true is set. This chip can never be minted again.


Core Verification

The low-level verification function implemented in Tokentagged.sol.

verifyTokentag

Verifies the entire chain of signatures (Chain of Trust) without executing a mint. Useful for read-only checks or off-chain validation.

function verifyTokentag(
uint256 id,
uint blocknumber,
uint8 v,
bytes32 r,
bytes32 s,
bytes calldata data
) external returns (bool);
  • data: Arbitrary data that is included in the verification signature. This allows attaching additional information (e.g., an Arweave link) that gets signed along with the verification, enabling permanent storage of signed data for the Tokentag on the blockchain.

TokentaggedSignerRegistry

The specific verification logic for the "Chain of Trust". This contract stores the public keys of the manufacturers (Issuers) and verifies if a chip signature is valid and not blacklisted.

verifyTokentagAuthenticity

The main entry point for third-party verification. Checks if a given cardAtstSignature maps to a valid Master Key, and if that Master Key maps to a trusted Issuer.

function verifyTokentagAuthenticity(
address id,
bytes memory cardAtstSignature,
bytes memory atstSignature
) external view returns (bool)
  • id: The address of the chip (Card-Key address).
  • cardAtstSignature: The signature proving the link between Master-Key and Card-Key.
  • atstSignature: The signature proving the link between Issuer and Master-Key.
  • Returns: true only if the entire chain is valid and the Master Key is not blacklisted.

Management Functions (Governance)

(Only Owner)

  • authorizeSigner(address _signer): Adds a new authorized Issuer key (e.g. for a new production batch).
  • blacklistMaster(address _master): Revokes trust in a specific physical chip (Master Key), rendering all derived tokens invalid. Used in case of physical compromise/extraction attempts.

Events

TokentagVerified

Emitted when a signature has been successfully verified.

event TokentagVerified(
uint256 indexed id,
address indexed sender,
uint blocktime,
bytes data
);