Inspiration

Reflect on your time in Minecraft, where a simple combination of four wood planks transformed into a handy workbench. The Witcher, Rocket League, CrossOut... All these games shares the same concept: crafting. This drove me to design a similar mechanism for the web3 universe with NFTs.

What It Does

Dive into Project Craftable, where the focus shifts from merely owning NFTs to actively crafting them. At its core, the standard introduces two pivotal contracts:

The Workbench - Think of this as your crafting hub. Here, you can design and manage blueprints, which are essentially your crafting recipes. Whether you wish to assemble new NFTs or disassemble existing ones, the blueprint serves as your guide. And if a particular recipe is no longer needed? Simply delete it from the Workbench permanently.

ERC1155 Collection - This is your reservoir of NFTs, both the ingredients and the outcomes. When you craft using the Workbench, it pulls from this collection and post-crafting, the new or modified NFTs are stored back here.

How I Built It

Relying on my expansive smart contract know-how, I first developed smart contracts, which I am proud of because they include:

  • clean code and clean naming
  • utilization of interfaces and abstracts for adaptability
  • security checks through Slither
  • full unit and integration testing coverage

Plus, to truly showcase the craftability in action, I've introduced a straightforward client demo. While this offers a taste of the crafting magic, the contracts hold much more potential and prospects for those eager to dive deep. link

Challenges

Choosing the optimal data structure for crafting blueprints wasn't trivial. After several attempts, I was able to find the most suitable data structure by consulting the Openzeppelin standards.

Why It's A Revolution

Project Craftable is more than just an NFT platform. It encapsulates the spirit of crafting from our cherished games. While gamers will naturally gravitate towards it, the implications ripple out further. This novel approach to NFT crafting can influence digital arts, introduce a new dimension to collectibles, and create unique opportunities for musicians, artists, and educators. At its core, Project Craftable is a standard. It has laid the foundation, but it’s designed for you to adapt, tweak, and shape according to your unique needs.

What's Next

Introducing craftable smart contracts into the first demo game (currently in development).

Notes

Make sure to view code of contracts! Especially IWorkBench, WorkBench and Collection. link

SOURCE.md can be found in both github repos. I, Ruslan Melnyk, am only team member of this project.

The project is built on top of Mantle Testnet and Celo Alfajores and supports both chains.

Mantle

Collection deployed to: link Workbench deployed to: link Tweet: link

Celo

Collection deployed to: link Workbench deployed to: link

My main Wallet

0xFB9fAe90E018003e5d4F733A56A6E64BbB0eFdd6

I recently realized that you won't be able to fully test the client because the Workbench contract uses AccessControl and only I, as the owner of the contract, can create crafting recipes. For the test, import the account using this private key 3b70aa04c3ec44a88ef29d0f45f2aa065ef2da2137e80d24c81610d2bca0a923

Built With

  • celo
  • chai/mocha
  • hardhat
  • mantle
  • mantle.xyz
  • next.js
  • radix.ui
  • react.js
  • shadcn.ui
  • slither
  • solidity
  • typescript
  • viem
  • wagmi
Share this project:

Updates

posted an update

I recently realized that you won't be able to fully test the client because the Workbench contract uses AccesControl and only I, as the owner of the contract, can create crafting recipes. For the test, import the account using this private key 3b70aa04c3ec44a88ef29d0f45f2aa065ef2da2137e80d24c81610d2bca0a923

Log in or sign up for Devpost to join the conversation.