The modern way to learn blockchain

Mission #3

Yeah, your game is picking up traction and your users love the cute little Dappies! Together with the product team, you have decided to let users collect Dappies in their personal collection. But to achieve this, you have to interact with the smart contracts using transactions.

Liza Dappy

Senior Developer

Hey! Let's give our users the chance to collect Dappies! ๐ŸŽ

Users will purchase Dappies in our store. For this, they need to enable a collection.

I think we need to transactions for that - could you take a look?

Thanks ๐Ÿ™ By the way, great work so far!

The mission brief

This mission takes you from advanced scripts to making transactions.

The starting branch for this mission is mission-3

Primer: resources and collections

In order to collect Dappies, your users need to enable their personal collection. But why is that the case, and how is this connected to Cadence's resource-oriented paradigm? Here's a high-level overview to give some answers to these questions.

Scripts with arguments

After you have already queried the Flow blockchain with a script in the last mission, it's now time to take the next step and write queries that take arguments. In this video, you'll learn how to check for a Dappy collection on any given user's account.

Your first transaction

While scripts are good for quickly querying publicly available information on the blockchain, transactions are the heart of any interaction that changes state. That being said, transactions are also more complex to implement than scripts, but we've got your back with the following video:

Housekeeping: collection deletion

After you've mastered the implementation of scripts and transactions, it's now time to wrap things up for this mission with some housekeeping: allowing for deleting a collection.