Skip to content

Create a collection

Deploy an owner-controlled ERC-721 collection through Spawn.

Creating a collection deploys a new SpawnNFTCollection contract controlled by the connected wallet. The transaction records its identity, collection metadata URI, and default royalty terms.

Prepare collection metadata

The creation form needs a collection name, symbol, image, description, and optional royalty. Spawn uploads the image and JSON metadata through a wallet-authenticated session. Objects are stored by SHA-256 content hash, so the finalized URL identifies immutable bytes.

The metadata URL becomes contractURI. Marketplaces can use it to display collection-level information.

Royalty settings

Royalties use ERC-2981 basis points.

RoyaltyBasis points
0%0
2.5%250
5%500
10% maximum1000

A positive royalty requires a nonzero recipient. A zero royalty uses the zero address and clears the default royalty record.

Create from the app

  1. Open Create NFT and connect the future collection owner.
  2. Choose Collection and add the collection details.
  3. Upload the image and wait for metadata finalization.
  4. Review the name, symbol, royalty recipient, and percentage.
  5. Sign the factory transaction.
  6. Wait for six confirmations and indexed collection discovery.

The factory emits CollectionCreated with the new collection address. Save that address before moving to minting.

Factory state

The factory exposes collection counts and creator-specific lookup functions:

collectionCount() returns (uint256)
creatorCollectionCount(address creator) returns (uint256)
creatorCollectionAt(address creator, uint256 index) returns (address)
isSpawnCollection(address collection) returns (bool)

Use Marketplace write calls to create a collection from ethers v6.