Subpages

If you hold alice, you can create blog.alice, pay.alice or any other subpage for free, paying only gas.

Creating subpages

From the page’s manage page, open the Subpages tab, enter a label and mint. You can mint to yourself or straight to any other address. Each subpage is its own ERC-721 token with its own addresses, profile, avatar and website.

The rules:

  • One level only. blog.alice can exist; x.blog.alice cannot. A subpage has no subpages.
  • The parent must be live and paid: not expired, not in grace, and not a trial. A trial page gets subpages once it is renewed.
  • Only the parent’s holder, or the subpage minter it picked, can create subpages.
  • Labels follow the same name rules as pages.

In the contract, registerSubpage(label, parentId) mints to the caller and registerSubpageFor(label, parentId, to) mints to any address. If to is a contract, it must accept ERC-721 tokens, unless it is the caller, or an account with no code or an EIP-7702 delegation.

The subpage minter

The holder may pick one other account that can also create subpages, with setSubpageMinter(parentId, minter). This is how a subpage sale works.

  • The minter only creates free subpages: new ones, ones from an earlier registration of the parent, and deleted ones. It cannot replace a subpage someone holds.
  • The minter counts only while the account that picked it holds the parent, in the same registration. When the parent moves or is registered again, the minter stops counting.
  • Only the holder can pick a minter, not an approved operator, and only while the page is live. After the page moves, the account that picked the minter can still clear it.
  • subpageMinterOf(parentId) returns the minter that counts now, or the zero address.

Subpages follow their parent

A subpage has no expiry of its own. It is active while its parent is active. When the parent expires, its subpages stop answering and cannot move; if the parent is renewed in its grace period, they come back.

Replacing a subpage

The parent’s holder can mint any subpage again, even one someone else holds. That burns the current token, and its holder loses the subpage, its addresses, its profile and its place as a display page. Buy a subpage only under a parent whose holder you trust, or whose interests match yours, such as a community that sells subpages as memberships.

Deleting a subpage

The holder of a subpage deletes it by sending it to the dead address 0x000000000000000000000000000000000000dEaD, with transferFrom or safeTransferFrom. The subpage must be active. Afterwards it answers nothing, its status is Invalid, and its label is free to be created again.

Only a subpage is deleted this way. A top-level page sent to the dead address stays registered until it lapses.

Epochs: when a parent is registered again

Every page counts its registrations in its epoch. A subpage records its parent’s epoch when it is minted. If the parent lapses and someone registers it again, the parent’s epoch goes up, and every subpage from the earlier registration becomes Invalid: it no longer answers, getPageName returns an empty string for it, and its label is free for the new holder.

Status

status(tokenId) returns what the subpage’s card shows:

Value Status Meaning
0 Active Live.
1 Grace The parent is in its grace period.
2 Expired The parent is past its grace period.
3 Invalid From an earlier registration of the parent, or deleted.

A subpage is never a trial (4).

Transferring

A subpage moves like any ERC-721 while it is active. Its addresses and its profile do not move with it (see the profile rule), and the sender’s display page clears if it was this subpage. A transfer does not end a subpage. It ends when the parent is registered again, when the parent’s holder replaces it, or when its holder deletes it.

Want to charge for subpages under your page? See Selling subpages.