Path: blob/main/docs/versioned_docs/version-v0.25/guide/05-scavenge/09-play.md
1007 views
---
---
Play with your blockchain
Now that you have made the required updates to you new chain, it's time to test it.
Start the blockchain
To start your blockchain in development, run the following command:
The serve
command builds the chain binary file, initializes a data directory, and starts a node in development.
For all subsequent commands, you use a terminal window that is different from the window you started the chain in.
Create a scavenge
Follow the instructions and submit a new scavenge.
The first parameter is the solution
, but you should also know what the actual question is that your solution solves (the description
).
You can make the challenge question something family-friendly like What's brown and sticky?
. Of course, the only solution to this question is A stick
.
Next, you must specify the reward
. Give away 100token
as a reward for solving the scavenge.
Now you have all the pieces needed to create your message. Piece them all together in the command and add the flag --from
so the CLI knows who is sending it:
The results:
Replace the txhash
with your txhash
from the previous output:
The results:
Query for a list of scavenges
The results:
Commit a solution
Follow the instructions and submit the answer as a commit on behalf of bob
:
The results:
Query for a list of commits
The results:
You don't need to put the solutionHash
because it can be generated by hashing the actual solution.
Since all you need is the solution again, you can send and confirm the final message:
Reveal a solution
The results:
Query for a list of solved scavenges
The results:
Commit a solution again, expect to get an error
The results:
Congratulations, you have built and tested a scavenge hunt blockchain!