Inspiration

The first time I heard about the Metaverse I envisioned myself in a new reality where I could unlock a skateboard from Tony Hawk’s to immediately ride it in GTA.

What it does

We have developed a use case for dynamic NFTs that will take us a step closer to this flash of inspiration, where your digital objects can be used at will. Due to their open-source nature, we will start with Decentraland Wearables which live in the Polygon and Ethereum network.

In this initial version we will generate a nft_collection of dynamic ERC-721 NFTs, from here on dNFT, named Flying People, from here on fp_nft, with the ability to link three other referenced NFTs using their contractAddress and tokenId, in this case Decentraland wearables NFT, from here on dclwearable_nft.

How we built it

The references to these dclwearable_nft(s) will be stored in each fp_nft at the smart contract level to validate that the owner of an fp_nft is also the owner of the dclwearable_nft before linking them. Now we create a representation of a Flying People Avatar with the ability to equip a set of external NFTs as wearables.

In addition to the above, once the ownership of the items is proven in a contract function we will use ‘Chainlink’ to call an API that we will generate a basic visual representation for the dynamic ERC-721 NFTs images from here on ‘dnft_image’, which in this case is composed of four different images - from here on called ‘layers’.

  • In layer_1, the fp_image of a Flying People NFT is represented as a base shape.

  • In layer_2, layer_3, and layer_4, the images of each dclwearable_nft (referenced in the fp_nft) will be used.

Said layering grants the NFT holder the ability to set three assets, likewise stored as three separated layers at the fp_nft animation_url.

Flying People Diagram

In this proof of concept we used Chainlink, to call an API from our Contract, this API gets the dclwearable_nft metadata stored on IPFS (Interplanetary File System) and then get the dclwearable_nft images required to compose the new dnft_image.

Next a representation of fp_nft is created with its user selected dclwearable_nft(s) through the Flying People API that generates and updates to the new dnft_image.

Finally, a visual representation is generated by the Flying People API - that is capable of combining the images from all sources and assembling a final image that represents a Flying People Avatar.

The following sequence diagram shows a flow for the proof of concept, which allows us to obtain the entire information stack of a fp_nft and its linked dclwearable_nft to generate the final image of an avatar by equipping a set of dclwearable_nft(s) to it.

Flying People Sequence Diagram

Challenges we ran into

One of the key requirements for this proof of concept was to generate from a smart contract a metadata update on an NFT. For this we required an OFFCHAIN– API to be triggered by an on-chain transaction. Our first approach was to consume the API by listening to a confirmation event on a dApp/browser level. However, we detected that if a user closed the session during the process the dnft_image will not be created. To resolve this, we decided that the API should be called from the smart contract and that Chainlink was the perfect fit. Ensuring the call to the API to regenerate the new images in real time, thus producing our dNFT.

Another crucial piece in the workflow is for the smart contract to validate both ownerships: the external wearable/item and the Flying People NFT. In case both digital assets live on the same blockchain, and share the ERC-721 standard, an on-chain validation will take place by using the ownerOf method. If the assets lived on different chains - i.e. Ethereum and Polygon - Chainlink can be integrated making possible a cross-chain integration for our future implementations.

The digital wearables were not available on Goerli, therefore we created and minted our own sample collection to represent the first Decentraland Wearables.

Accomplishments that we're proud of

We created interoperability among existing NFT collection items. Flying People will now be a dNFT collection that gives holders a second use case for the digital assets they own.

The tech we built can be implemented in multiple NFT projects - and thereby, metaverses. This creates a more horizontal and frictionless ecosystem. Making even small realities competitive, because they can interoperate.

What we learned

  • Building an efficient worldwide team from different backgrounds and professions.
  • Compiling an image into an NFT with data from different sources in real time.
  • Creating and extending custom features on a Solidity smart contract.
  • Connecting Chainlink to any API while discovering how its multiple features work.
  • While working on this proof of concept lots of new possibilities and use cases came to our minds, some likely to be implemented in the future.

We now believe that the Flying People collection can, at the very least, make a dent in this vast expanding ecosystem - while still flexing on the tech we’re building. Yes, flexing.

What's next for Flying People

  • When assets live on different chains, Chainlink can be integrated making it possible to cross-validate our future implementations.
  • We will continue to evolve our brand and our story -- main keys to accelerating the growth of our new platform.
  • Our primary focus is enhancing the UX by building a user-friendly interface for our product to maintain user engagement on the platform.
  • Cleaning and improving our code in terms of contracts and APIs.
  • Creating a cooperative workflow to incentivize help from other developers or teams that feel aligned with our vision.
  • Developing the first version of the Flying People NFT in Ethereum Mainnet.
  • Exploring new use cases for interoperable dNFTs.

Built With

+ 4 more
Share this project:

Updates