/ERC721-Linkable

The goal of ERC 721L is to make it easier to manage multiple NFTs and to simplify the transfer of ownership of all of them to a new owner.

Primary LanguageSolidity

NPM Contributors Forks Stargazers Issues


E7L logo

E7L Standard

A new way of linking 🔗
Explore the website »

Report Bug · Request Feature

Table of Contents
  1. About ERC 721-Linkable
  2. Technical specs
  3. Getting Started
  4. Future improvements

About ERC 721 Linkable

E7L teaser

The goal of ERC-721Linkable(E7L) is to allow nfts to be linked. The nfts that implements this standard is non-transferable until it is linked to a nft of other smart contract (parent token), once the E7L is linked it can only be transferred to the current owner of the parent token.

It creates a bunch of new opportunities to bring value to you holders and create new online experiences. Let's see 2 possible use cases below.

E7L allows you to create experiences where people can earn an E7L and link it to their favourite nft of your project increasing the perceived value of it and allowing an NFT to have on chain reputation, kind of POAP but for tokens.

It can also be used to create a multi nft drop, for example a physically backed hoodie that has a linked pfp, a decentralized version of that hoodie and a nft 3d render to show on oncyber. The ownership of all these nfts will be of the current owner of the hoodie pbt token automatically, and if that token is transferred all these complementary nft can be claim by the new owner.

Technical specs

ERC-721Linkable is an extension of the ERC-721, the main technical add-ons are the variable parentContract, the struct LinkableToken, and the _linkToken _unlinkToken and syncToken functions.

The function _linkToken initialize a minted token id linking it to a tokenId of the parent contract. If a token is not initialized it can not be transferred, once it is initialized it can only be transferred using the syncToken function that will transfer the nft to the current owner of the parent token ID. The function _unlinkToken reverts that token to the initial state. This last function is intended to be used only with an access control management.

Getting started

In order to use E7L you just need to install the following npm package.

npm i erc721l

or

yarn add erc721l

Once you have all the contracts you just need to create a new solidity file, import the ERC721Linkable contract and make your contract.

pragma solidity ^0.8.7;

import "erc721l/contracts/ERC721Linkable.sol";

contract E7L is ERC721Linkable {
  constructor(
    string memory _name,
    string memory _symbol,
    address _parentContract
  ) ERC721Linkable(_name, _symbol, _parentContract) {}

  function mint(uint256 tokenId) public {
    _safeMint(msg.sender, tokenId);
  }

  // CUSTOM CODE GOES HERE
}

Future improvements

During the development process of the standard we have realized that the ui and ux is really important in a project that implements this standard. So we are working on a sub graph base repo to help with that.