npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

erc721l

v1.0.0

Published

ERC721L allows you to create experiences where people can earn a erc721l and link it to their favourite nft of your project increasing the percieved value of it and giving a onchain reputation linked to that token.

Downloads

36

Readme

NPM Contributors Forks Stargazers Issues

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.