DocsNFT drop
On this page

NFT drop

NFTDrop is an ERC-721 drop of a fixed number of pieces, minted in order for a HYPE price, with a per-wallet limit and no allowlist. Each token shows one of the images picked at deploy, in turn. The wallet that deployed it withdraws the mint proceeds.

#Parameters

Field in the Builder Constructor argument Default Notes
App name name_ the template's title Also the collection's name.
Symbol symbol_ NFT Upper case, up to 10 characters.
Total pieces maxSupply_ 333 Above zero. Fixed forever.
Per wallet maxPerWallet_ 3 Above zero.
Price in HYPE price_ 0.01 Per piece. Zero is allowed.
Art images_ (none) 1 to 12 image URLs.
(none) creator_ your wallet The only address that can withdraw.

#Art

The picker offers six engravings made for the site. You can also upload images: PNG, JPG, WebP or GIF, under 4 MB each, stored on the site's public file storage. The contract stores the image URLs, not the images: a token's picture lives at its URL.

#Minting

mint(quantity) with exactly price × quantity in HYPE.

  • Tokens are numbered from 0 upward.
  • Each address can mint at most maxPerWallet in total, counted by the address that calls mint. There is no allowlist, so the limit is per address, not per person.
  • The mint stops at maxSupply (SoldOut).
  • Tokens are minted with _safeMint: a contract receiving them must accept ERC-721 tokens.

#Metadata

tokenURI(id) returns the metadata on chain, as base64 JSON: the name <collection> #<id>, the description "Minted on a Demiurge layer." and the image imageOf(id), which is images[id mod number of images]. images() returns the whole list.

#Withdrawing the proceeds

withdraw() sends the contract's whole HYPE balance to the creator, and only the creator may call it. The drop's page has no withdraw button, so call it from the creator wallet on the layer, for example:

bash
cast send <drop address> "withdraw()" \
  --rpc-url https://www.elysiumdemiurge.com/rpc/<slug> --interactive

#Functions

Function Who may call What it does
mint(uint256) payable Anyone Mints pieces at the fixed price.
withdraw() Creator Sends all proceeds to the creator.
tokenURI(uint256), imageOf(uint256), images() Read Metadata and art.
maxSupply(), maxPerWallet(), price(), creator(), totalSupply(), mintedBy(address) Read The drop's terms and progress.
ERC-721 functions Holders transferFrom, safeTransferFrom, approve and the rest, from OpenZeppelin v5.

Events: Minted(to, fromId, quantity), Withdrawn(to, amount), and the ERC-721 events. Errors: SoldOut, WalletLimit, Underpaid, NoImages, NotCreator, TransferFailed, BadConfig.