Token standard for tokenized fine-tuned AI model weights — ownership, provenance, and tradability
kcolbchain — open-source blockchain tools and research since 2015.
Early development. Looking for contributors! See open issues for ways to help.
git clone https://github.com/kcolbchain/erc721-ai.git
cd erc721-ai
# Install dependencies
forge install
# Build contracts
forge build
# Run Solidity tests
forge testIf you don't have Foundry installed:
curl -L https://foundry.paradigm.xyz | bash
foundryupcd sdk/typescript
# Install dependencies
npm install
# Run tests
npm test
# Build
npm run buildOn Windows PowerShell, use npm.cmd if script execution policy blocks the
npm.ps1 shim:
cd sdk\typescript
npm.cmd install
npm.cmd test
npm.cmd run buildThe TypeScript SDK quickstart was verified on Windows PowerShell with Node v24.16.0 and npm v11.13.0:
cd sdk\typescriptnpm.cmd installnpm.cmd test(24 tests passed)npm.cmd run build
The Solidity commands above require Foundry's forge to be installed and
available on PATH. On Windows, Foundry's installer should be run from Git Bash
or WSL; after forge --version succeeds, run forge install, forge build,
and forge test from the repository root.
See CONTRIBUTING.md for how to get started. Issues tagged good-first-issue are great entry points.
The v0 draft of the ERC-721 AI standard is in docs/spec-erc721-ai.md. It defines the metadata schema (model id, weights CID, artifact hash, base-model provenance, license, inference endpoint, royalty), the required interface, and the ERC-2981 + attestation-hook integration.
contracts/ERC721AI.sol— minimal, dependency-free reference that implements the full ERC-721 AI surface (mintModel,modelAsset,setInferenceEndpoint,setAttestationKind,royaltyInfo) plus the ERC-721 subset needed for it to render in standard wallets.test/ERC721AI.t.sol— Foundry tests covering mint, provenance chain lookup, royalties, endpoint mutation, attestation kind mutation, transfer semantics, and revert paths.
Production deployments SHOULD substitute an audited ERC-721 base (OpenZeppelin) and inherit ERC721AI behavior — this reference optimizes for clarity, not bytecode size.
This repo also includes a pluggable contract-level attestation hook for verifiable training claims:
contracts/interfaces/ITrainingAttestationVerifier.solcontracts/mocks/MockTrainingAttestationVerifier.solcontracts/ERC721AIAttestationHook.sol
Design and integration details are documented in docs/attestation-hook.md.
A viem-based TypeScript SDK for the standard lives in sdk/typescript/ — it wraps ERC721AI, ERC721AIx402Metering, and ERC721AIAttestationHook behind three modules (model, metering, attestation) so consumers can mint a tokenized model, set an inference price, pay per call, and withdraw revenue in roughly five lines of code. See sdk/typescript/README.md for the quickstart.
- Docs: https://docs.kcolbchain.com/erc721-ai/
- All projects: https://docs.kcolbchain.com/
- kcolbchain: https://kcolbchain.com
MIT
Founded by Abhishek Krishna • GitHub: @abhicris