Search projects, hackathons, sponsors and tech

    ← All projects

    Tagged Contracts

    Contract Tags is like Docker tags, but for blockchain contracts. We want to make it easy to tell what kind of license a contract uses and who's responsible.

    Demo

    About

    `Tagged Contracts` imagines a composable metadata layer where free-form information can be stored on the blockchain in a consistent way that is easy for developers and users alike. *Think: Docker tags, for smart contracts, yet with a link to more info.* Tags are special data structures that contracts can inherit from, making it easy for developers to "bless" a contract as a tag. Furthermore, we show an example of how a contract can be deployed to describe a tag and complete the link back to the original contract by allowing contracts to purchase licenses for the tag. Contracts set tags like: setTag("license:cc0", "0x0221a85835DD42D82385146406c534A1f4Af5E6D"); // reference to more info setTag("author:lorem-labs"); // simple tag setTag("Example"); // simpler tag :), stored as lowercase We then expose a common interface for retrieving tags and showing them as a JSON representation.

    How it's made

    This project is mostly Solidity and tooling via Hardhat. The dApp has ethers and SvelteKit. It was re-factored down many times, (although not enough time!) in an effort to make the interface as clean as possible and easy for a developer to use. The initial motivating use case is to provide a uniform way to add license information to NFTs to help answer questions like "What rights do I have if I own this NFT?". There have been [numerous](https://www.nftlicense.org/) [attempts](https://www.nftstandards.wtf/NFT/NFT+License) to [standardize](https://eips.ethereum.org/EIPS/eip-5554) and clarify licensing rights for NFTs, however there remains a lack of consensus on how to locate the license for an NFT. We are inspired by conversations [we have had](https://twitter.com/creativecommons/status/1537242121647706112) with the Creative Commons organization, as well as existing work such as the [Royalties Registry](https://royaltyregistry.xyz/) and [EIP-2981](https://eips.ethereum.org/EIPS/eip-2981) which we implemented when we created our own NFT, [Kevin the Balloon](https://www.kevintheballoon.com/). Incidentally, the term `blessed` is inspired by Perl's [blessed refererents](https://www.perl.com/pub/1999/09/refererents.html/) which is inspirational for this design too. We also imagine that applications like Etherscan could use our tagging feature to display the properties of contracts instead of requiring [manual configuration of labels](https://info.etherscan.com/public-name-tags-labels/).