ABX
Reference

Contracts

How the six canonical token contracts are assembled and deployed.

The reference implementation has six token contracts. Project shape and token standard are separate choices.

Project shapeERC-721 unique tokensERC-1155 copies
One workOneOfOneImageOneOfOneEdition
Many worksSeriesImageEditionImage
Code or generativeSeriesCodeEditionCode

Extensions

Each optional feature is an abstract mixin with its own interface, events, storage namespace, and version. Concrete tokens compose only the features they need.

Image contracts include onchain metadata and royalties. Series contracts add supply, minter, payee, and pause controls. Code contracts add scripts, dependencies, seeds, and configurable parameters.

ERC-721 and ERC-1155 twins share extension IDs and behavior where the token standard allows it. Edition supply is per token ID. Sequential ERC-721 supply is per collection.

Storage

Stateful extensions use ERC-7201 namespaces. Storage slots come from unique names rather than inheritance order, so mixins cannot overlap when reordered.

Small helper libraries compile into the token. Larger write paths use shared delegatecall libraries:

LibraryJob
AbxMetadataLibMetadata fields and locks for all six token types
AbxParamsLibParameter schemas, values, and hooks
AbxCodeLibScript and dependency writes
AbxEditionLibERC-1155 metadata and supply paths

These libraries operate on the calling token's namespaced storage. They are deployed at deterministic addresses before the factories that link them.

Clones and factories

Each token type has an ownerless factory. The factory deploys one implementation, disables direct initialization on that implementation, and creates EIP-1167 clones.

deploy(params) creates and initializes a clone in one transaction. deployDeterministic(params, salt) uses a predictable address. A salt prefixed with the deployer's 20-byte address reserves the deployment to that account.

The factory records every clone it creates. isAbxClone is the canonical trust check. The AbxDeployed event alone is not proof because any contract can emit it.

Shared contracts

AbxMetadataRenderer, AbxChunkStore, AbxGenerator, and AbxSeedSource are ownerless shared contracts. Tokens refer to them by address instead of inheriting them. A project can point to another compatible renderer, reader, or seed source where its configuration allows.

Run forge build --sizes after contract changes. SeriesCode is the binding EIP-170 case.

Source lives in contracts/src. Read Events, Interfaces, and Deployments next.

On this page