Smart Contracts
All Litany assets are fully onchain. The contracts generate, store, and render every NFT without external dependencies.
Architecture
Litany uses a two-contract architecture for the inscription collection:
LitanyRenderer — Holds all content pools and SVG generation logic. Deployed once. Immutable. Pure view functions.
LitanyCards — The ERC-721 mint contract. Stores attribute indices. Calls the renderer for tokenURI. Implements ERC-2981 for 10% royalties.
This split keeps the mintable contract lightweight while allowing the renderer to hold all the content data needed for onchain SVG generation.
Key Interfaces
Reading Inscription Data
Any external contract or agent can read Litany data:
interface ILitanyCards {
function getCardIndices(uint256 tokenId)
external view returns (uint256);
function getCardText(uint256 tokenId)
external view returns (
string memory name,
string memory class_,
string memory speed,
string memory aggression,
string memory caution,
string memory precision,
string memory trait
);
}For Game Developers
If you’re building a game that uses Litany inscriptions:
- Call
getCardText(tokenId)to read the inscription’s text - Map the phrases to your game’s stat system however you choose
- The inscription’s meaning in YOUR game is up to you
This is the composability model. Your game decides what “Reaction Time: Before the Signal” means. Another game decides differently. Both are valid. The inscription is just the config.
Standards
| Standard | Usage |
|---|---|
| ERC-721 | NFT ownership |
| ERC-2981 | 10% royalty enforcement |
| Onchain SVG | tokenURI returns base64-encoded SVG |
| Base64 JSON | tokenURI returns data:application/json;base64 |
Contract Addresses
Contract addresses will be published here after deployment.