Composing
Grouping of NFTs to create one NFT
Composing Assets / NFTs is the process of assigning owner of sub Assets / NFTs to a main Asset / NFT. The owner of the main NFT is then the beneficiary owner of the sub NFTs, but when the owner transfers the main NFT to another wallet, the sub NFTs go with it.
To compose two NFTs, they must have the same owner. Prior to composing them, the owner must approve a transfer of the sub NFT's token id to the Asset Contract.
As previously stated, composing the assets means assigning ownership of the sub NFT to the main NFT. This happens by calling a custom function as per the code below:
The result is that if the owner of the main NFT transfers it to another wallet, then both NFTs are transfered to the new owner.
Last updated