WorkThe Plague NFT Upgrade
Letting collectors customise a frog without breaking its rules.
Holders picked new traits for an Army frog. The site checked the combination still obeyed the collection, generated the artwork and metadata, and sent them on to the upgrade transaction.
Interface
The upgrade lab. A holder picks traits; the interface is where an illegal frog is supposed to get stopped.
Problem
A trait upgrade is easy to get wrong. Someone can pick a combination the artwork does not allow, and the token they already own still has to come out the other side as a legal frog.
What I did
I built the upgrade lab: trait selection, the rule check, generation of the new image and metadata, and the handoff into the transaction the holder submits. Updated files went to IPFS through Pinata. Sign-in was Sign-in with Ethereum, with delegated wallets for people who use them.
I built the web flow. Francis wrote the upgrade contract, and the tooling that prepared the trait and rule data the lab is seeded from. The collection and the brand are The Plague’s.
Constraints
The frogs already had a look, and the rules are not a style guide you can fudge. A lot of the holders were on a phone. The chain step had to stay visible: the site prepares the upgrade, the holder submits it.
Decisions
- Reject an illegal combination in the interface, before anyone is asked to sign. A transaction is a bad place to discover the frog does not exist.
- Generate the image and metadata as part of the product, then hand the holder a transaction, rather than pretending the chain was not there.
- Keep the lab in the collection’s own voice — laboratory, specimen, trait slots — instead of a generic trait form.
Result
The upgrade lab is public at upgrade.plaguebrands.io. Pons announced the launch on 17 July 2024. I replied that I had built the site. Holders posted about using it, including on a phone.
Sources
- Upgrade lab
The public upgrade lab. A holder picks traits, then submits the upgrade.
- Launch posts
Pons announced the trait upgrade. Holders posted about using the flow, including on a phone.
- My reply
My own reply on the launch thread, saying I built the site.
Reflection
The lab launched with one upgrade for each frog. At the start of August 2024 that limit came off, so a frog could be upgraded again. I had written the rule check against the frog as it was minted. A second upgrade has to be checked against the frog as it is now, and I changed the check to start from the latest version.
Technical notes
Next.js, TypeScript, Tailwind, wagmi and viem, WalletConnect, Alchemy, NextAuth with SIWE, Prisma and Postgres for the trait data, Pinata for IPFS, Delegate for delegated Ethereum wallets. Deployed on Vercel.
Skills
TypeScript, Next.js, Postgres, Ethereum, IPFS
