Implementation tutorial for loot contract on SmartWeave
This tutorial shows how to implement a simple loot contract on the SmartWeave protocol.
💡 The smart contract idea
We will implement a simple LOOT-like contract, which allows us to generate and transfer different magical assets, for example
black silver sword or
blue gold crown. Each asset will be unique and can belong to only one wallet at a time.
Initially there are no generated assets, but users will be able to generate and claim them. Users also will be able to transfer their assets to others.
🚀 Deployed version
Final implementation is available in the github repo.
🙋♂️ Need help?
Please feel free to contact us on Discord if you have any questions.
- Prepared Node.js environment
- Basic understanding of SmartWeave
📦 Install dependencies
# Install dependencies
$ yarn add email@example.com firstname.lastname@example.org
# Install dev dependencies
$ yarn add email@example.com jest -D