Hyper Apes

Hyper Apes

Hyper Apes are NFTs generated by AI. Hyper Apes can swing bewtween blockchains. Holders earn one 🍌BANANA per second as mint passes, powered by Superfluid.

40
Hyper Apes

Hyper Apes

Hyper Apes are NFTs generated by AI. Hyper Apes can swing bewtween blockchains. Holders earn one 🍌BANANA per second as mint passes, powered by Superfluid.

The problem Hyper Apes solves

Artwork for Hyper Apes is generated at mint time by AI (DALL-E by OpenAI). Choose a color and an accessory and an Ape will be generated with a background color representing the "birth chain" of the Ape. Once the image has been generated, it is stored on IPFS (via the nft.storage service) and NFT metadata JSON is also saved to IPFS.

The Hyper Apes smart contracts adhere to the ERC721 standard. Hyper Apes enables minting NFTs from the collection ony any of the supported chains and the ability to send NFTs from one chain to another. Each chain has a defined range of IDs that can be minted on that chain -- but after minting, the NFTs can be sent to any of the other supported chains.

Challenges I ran into

Mint with Metadata URI. To add support for decentralized storage of metadata on IPFS, the mint() function for Hyper Apes assigns the IPFS metadata hash to the newly minted token. Open Zeppelin's ERC721URIStorage extension was used towards this end.

MintAndSend() Function. Hyper Apes includes a second mint function that enables minting a new NFT and immediately sending it to another chain, in the same transaction. Suppose you want one of the cool Moonbeam Hyper Apes with the red background, but you want it in your Etheruem wallet. The mintAndSend() function enables this.

Hyperlane Send and Receive Functions. A key challenge was ensuring the contract on the destination chain received the tokenURI (IPFS metadata hash), such that NFT marketplaces and explorers can access the Hyper Ape image and other metadata. I modified the TokenRouter.sol example to create ERC721Router.sol, a Router specifically for ERC721 tokens, with some flexibility to customize the message payload to be sent to remote chains.

Contracts Deployed are to the same address on each chain.

Streaming Mint Pass Tokens. The Streamer.sol deploys an ERC20-compatible Native Super Token that can be streamed using the Superfluid prootcol. Hyper Apes mints 420 Trillion BANANA tokens to the Streamer contract. Unlike the Hyper Apes NFT contracts, the Streamer contract only lives on Polygon Mumbai. When you mint a Hyper Ape on any of the supported chains, BANANA tokens will start streaming to you in real-time on Polygon Mumbai, at a rate of 1 BANANA per second. If you sell or transfer your Hyper Ape, the stream of BANANAS stops and the new owner starts to receive BANANAS. Message are dispatched across the Hyperlane network to the Streamer on Mumbai, so it doesn't matter where you mint, send, or transfer your Hyper Apes, the streams of BANANAS on Mumbai get updated accordingly.

Using Mint Passes. On the streamer chain only, you can use your mint pass (BANANA) tokens with the mintWithPass() function to mint speci

Discussion