NFTree is kind of data structure composed of many ERC-721 tokens. Think of it as inheritance structure where one NFT is root others are it's children, referring it's parent and each of them can have children too. This could be used to represent Sci-Fi metaverse composed of planetary systems. Each planetary system having root NFT a sun-like star and planets that go around it, and each planet having it's moon(s) as children NFTs.

NFTree showcase

How it's made

We made it using Optimistic Rollups. Main contract is deployed on L2, where NFTree is created. It's based no ERC721 that we extended to allow tree structure. Each Nftree has one root and forms a DAG (directed acyclic graph). When tree is ready user can export to L1 where receiving contract will mint it on L1 layer. For inter-chain communication we used examples and contracts provided by Optimism in particular OVM_CrossDomainEnabled. We used hardhat, ethers, waffle.

Technologies used