NFTree

Plan is to build a tree-like data structure composed of ERC-721 NFTs. An NFTree can have 1 root and many elements having an address of it's parent. We want to do simple UI allowing to define NFTree and mint it on L2 and then burn while sending to L1, Optimism way.

NFTree

Created At

Scaling Ethereum

Project Description

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.

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.

background image mobile

Join the mailing list

Get the latest news and updates