Slots and modules
This page describes the v1 module model. V1 has a renderer slot, an address-based minter set, and an optional price strategy in its canonical minter.
Current Surface v2 instead has exactly one
minter() address, set by the owner with setMinter(address), and an owner-set
renderer. Its FixedPriceSale handles
fixed-price payment and an optional gate such as
AllowlistGate. There are no admins,
individual locks, or price-strategy slot on the v2 primitives. Renouncing the
collection's ownership freezes owner-only token and sale settings. Use
Launcher for the common token/sale wiring,
or CloneFactory directly.
Surface is one ERC721 core used across forms of work: editions, generative
drops, onchain SVG works, participatory works, backed pooled works. The core
holds ownership, one seed per token, the renderer pointer, the royalty, the
supply cap, and the minter authorization, and no sale logic. The v1 core
stores a seed per token. What varies between works is which modules are
attached and what the minter does. The core has no
work-specific code; it calls its renderer and authorizes its minters.
The token has two attachment points, and the canonical minter adds a third:
- the renderer slot on the token: one address, swappable by the owner or
an admin (
setRenderer) and pinnable one-way (lockRenderer) - the minter set on the token: addresses the owner grants and revokes
individually (
setMinter), freezable one-way (lockMinter). Every mint enters through an authorized minter - the price-strategy slot inside the canonical minter: one optional
address on the FixedPriceMinter
clone (
setPriceStrategy), which quotes the price when set and falls back to the minter's fixedpricewhen unset
Price, mint window, payment, referral, and gating are not token slots. They live in the minter, because they are sale-time concerns and the token holds no value.
Renderer (IRenderer)
function tokenURI(address collection, uint256 tokenId) external view returns (string memory);
function contractURI(address collection) external view returns (string memory);- Type:
IRenderer, stored in the collection'sSurfaceConfig.renderer - Set by:
setRenderer(address), owner or admin, only while the renderer is not locked (lockRendererpins it permanently, optional and off by default) - Fallback: the slot always holds a nonzero address. When the artist sets
none at init, the collection uses the factory's
defaultRenderer; a slot left at zero with no factory default revertsRendererRequiredat creation - What it does:
tokenURIdelegates entirely toIRenderer(renderer()).tokenURI(address(this), tokenId). The collection address is passed explicitly rather than read frommsg.sender, so one renderer instance can serve every collection that points at it, and it can be called offchain for any collection directly - What it can do: full EVM read access. A renderer can read the token's seed, the current owner, sibling tokens, companion contract state, foreign contracts, and block state. It is a view function, so it cannot alter state
- Historical modules:
DefaultRenderer,RenderAssets, andScriptyRendererwere v1 renderer modules/templates. Their Solidity sources and contract-reference pages have been removed from the current tree; checked-in legacy ABIs are not a current deployment or compatibility promise. Bring your own renderer against the collection's actual read ABI.
See IRenderer and Write a renderer.
Minter
- Type: an address the owner authorizes, tracked in
mapping(address => bool). The token trusts a minter for one thing: permission to call its non-payable mint entrypoint. The value-facing shape a minter presents to frontends is IMinter, but the token does not enforce that interface - Set by:
setMinter(address minter, bool allowed), owner or admin (owner only on the pooled form). Not a single-slot swap like the renderer: any number of minters can be authorized at once, granted and revoked individually. Revoking a grant removes a live minter's authorization.lockMinterfreezes the set permanently, one-way - What it does: an authorized minter calls
mintTo(to, quantity)(the sequential form) ormintToId(to, tokenId)(the pooled form) on the collection. Both are non-payable: the minter handles all economics. Pooled ids remain a v1 feature. - What it can and cannot do: a minter fully owns its own economics (its
own price, payment token, window, referral, gates, escrow) and its own
schedule. It cannot bypass the id-mode rule (each form exposes only its own
entrypoint) or the supply cap (
ExceedsCap). The FixedPriceMinter clone the factory wires is the canonical minter; bespoke projects grant their own
See Surface, FixedPriceMinter, Write a minter.
Price strategy (IPriceStrategy)
function priceOf(address collection, address minter, uint256 quantity)
external view returns (uint256);- Type:
IPriceStrategy, stored on the canonical minter aspriceStrategy, not on the token - Set by:
setPriceStrategy(address)on the minter, owner or admin (the collection's, borrowed by the minter), no freeze gate - Fallback: when unset, the minter charges its stored
pricetimesquantityand requires an exact match (WrongPaymenton mismatch) - What it does: when set,
mintand the read-onlypriceOfcallpriceOf(collection, to, quantity)to get the required payment. The strategy sees no caller-supplied data, so a collector cannot steer their own quote. Because a strategy's quote can move between when a collector reads it and when their transaction lands (for example a basefee-driven price), the minter acceptsmsg.value >= requiredand accrues any excess back to the payer as a pull withdrawal, rather than reverting on overpayment - What it can and cannot do: a
viewfunction only, so it can read anything (basefee, companion state, the collection itself) but cannot move funds. The quote is read once and reused for the settle, so a misbehaving strategy cannot split value the minter never received