Guardians — Dynamic $ASH based NFT collection

0xJones
3 min readDec 30, 2022

--

Guardians is a collaboration between Chinfong and ktrby. NFTs in this collection change dynamically based on how much $ASH (ERC20) the owner holds in the same wallet.

To read about the development and tech stack for this project, skip ahead to Development & Tech Stack.

Learn more about Guardians on Chinfong’s website, or view the collection on OpenSea.

Narrative

Chinfong is a prominent NFT artist who has often catered to $ASH communities (fans of ERC20 token $ASH, created by legendary NFT creator Pak).

With Guardians, Chinfong wanted the NFT to change in appearance based on its owner’s $ASH balance. Chinfong’s idea was that the more $ASH the collector had, the more guardians they need to protect it.

The NFTs were sold for $ASH tokens, reenforcing Chinfong’s commitment to the target communities. This project, as well as being an access pass for future Chinfong projects, was very much fan-service for his $ASH-committed followers.

Holders of Guardians could influence the appearance of the NFT by collecting more $ASH.

Sale & Reception

The Guardians collection is made up of 100 ERC721 tokens. The collection quickly sold out.

Chinfong had chosen some community members to claim a token for free, some to purchase from a whitelist sale at a discounted price. All collectors were able to mint via the website. The website had a small bug preventing whitelisted users from minting, but I hot-fixed this issue in real-time as the sale went on — no funds or tokens were lost.

The collection was received positively by the target collector communities, with many sharing their new token on Twitter and Discord.

According to popular sentiment among collectors, the collection was generally not regarded as a flipping opportunity but an artwork to be treasured.

Development & Tech Stack

Smart Contract

The smart contract for Guardians was developed using Solidity and Remix IDE. View the Guardians smart contract on Etherscan here.

The smart contract handled several distinct use cases seamlessly:

  • some users were entitled to claim a token for free,
  • some users were entitled to purchase from the whitelist sale, earlier and at a discount,
  • and other users were able to purchase from a later public sale

Contract admins were able to begin the sale on command, and then the free claim, whitelist, and public sale phases all took place automatically one after the other.

The contract accepted an ERC20 token ($ASH) as payment for the minted tokens.

It also serves dynamic, on-chain token metadata for the tokens, allowing their appearance to change in step with its owner’s $ASH balance. The token metadata automatically queries the token owner’s $ASH balance on-chain for a dynamic result any time it is called.

Website

The Guardians website was developed using HTML, CSS, Javascript, and web3.js to interact with the blockchain. View the website’s minting page, developed by me, here.

The website is dynamic, and updates in response to a change in the user’s connected wallet or network. It was also optimised for mobile, so that users could mint tokens from their phone.

Chinfong requested that I embed the custom minting site I created into his Squarespace site. As a side effect, Metamask could not interact with the embedded site via the Squarespace site on mobile devices, so mobile users had to visit the embedded site directly. This is the solution Chinfong decided to go with in the end.

--

--