Files
smom-dbis-138/docs/nft/GRU_FORMULAS_NFT.md
2026-03-02 12:14:09 -08:00

45 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# GRU Formulas NFT
**Contract**: `contracts/nft/GRUFormulasNFT.sol`
**Standard**: ERC-721
---
## Overview
The GRU Formulas NFT mints up to three token types, each depicting a GRU-related monetary formula as an on-chain SVG graphic.
## Token ID Mapping
| Token ID | Formula | Name / Description |
|----------|----------------|--------------------|
| **0** | Money Supply | GRU monetary layers: **1 M00 = 5 M0 = 25 M1** (base M00, collateral M0, credit M1). See `GRUConstants.sol`. |
| **1** | Money Velocity | Equation of exchange: **M × V = P × Y** (money supply × velocity = price level × output). |
| **2** | Money Multiplier | **m = Reserve / Supply = 1.0** — no fractional reserve; enforced in ComplianceGuard and ISO4217W tokens. |
## Minting
- Only addresses with `MINTER_ROLE` can mint.
- `mint(to, tokenId)` with `tokenId` 0, 1, or 2.
- There are exactly three NFTs: tokenId 0, 1, and 2 (one per formula). Each tokenId can be minted once; the recipient receives that formulas graphic.
## Metadata
- `tokenURI(tokenId)` returns a data URI: `data:application/json;base64,<base64(JSON)>`.
- The JSON includes `name`, `description`, and `image`.
- The `image` field is a data URI with an on-chain SVG: `data:image/svg+xml;base64,<base64(SVG)>`.
- No off-chain or IPFS dependency; all graphics are on-chain.
## Deployment
Deploy with an admin address (receives `DEFAULT_ADMIN_ROLE` and `MINTER_ROLE`). Grant `MINTER_ROLE` to any additional minters as needed.
```bash
forge create contracts/nft/GRUFormulasNFT.sol:GRUFormulasNFT --constructor-args <ADMIN_ADDRESS> --rpc-url $RPC_URL --private-key $PRIVATE_KEY
```
## References
- GRU layers: `contracts/vault/libraries/GRUConstants.sol`
- Money multiplier validation: `contracts/iso4217w/ComplianceGuard.sol`, `docs/OPERATIONS_RUNBOOK.md`