Skip to content

briwylde08/soroban-quest--pioneer

 
 

Repository files navigation

Soroban Pioneer Quest

Stellar-Quest-email

Open in Gitpod

Table of Contents

Welcome

Welcome to the Pioneer Quest for our upcoming Soroban Quest! We are beyond excited you've joined us. These quests are going to be fun, exciting, and interesting to be sure! There's a lot to go through so you are up to speed, so let's jump in!

Gitpod

You are reading this from inside a Gitpod development environment. You heard right! A freshly baked, automated environment built just for you! A couple things you should know about Gitpod:

VS Code

Gitpod is built around a fully-functional copy of the VS Code IDE. Entirely in your browser! All the things you can do in the local version of VS Code, you can do here. Just about ny extension you have in your local copy, you can install it here. You get the idea.

Docker Container'd

That's right, Gitpod is running on a Docker-ized container so that we can be certain your setup for these Soroban Quests is exactly the same as our setup! We have a few tasks configured to run on your Gitpod's startup. They're briefly explained below, but you can also read through .gitpod.yml and .gitpod.Dockerfile to get a sense of what is happening at what point during the build process.

Gitpod CLI

Gitpod has its very own CLI that you can use to manage a running Gitpod workspace. It's got loads of useful features, and tons of ways you can use it. Preat neat, huh!? You can learn all about it here!

Stellar Quest CLI

Would you belive that we've made, specifically for our Soroban Quest, a Stellar Quest CLI?! No joke! It's super awesome, and absolutely essential for you to understand, if you want to succeed in this live series. It's (awesomely) called "squirtle" but you'll become more familiar with invoking it as sq. The code for it lives in the _squirtle/ directory, but you won't need to bother with anything in there.

It exists as a command line tool that can connect your Gitpod instance with our existing SQ infrastructure. You can use it to:

  • login to your Stellar Quest account using discord (or logout),
  • get information about the currently logged in user,
  • visit the Stellar Quest website,
  • fetch new quests when they become available,
  • generate a keypair to play a particular quest,
  • check and/or verify the quests you've completed,
  • get rewards from completing a quest successfully

You can invoke sq from within any of the bash shells in this Gitpod workspace. The output of sq --help is shown below, for your convenience. You can also invoke sq <command> --help to get more information on how to use a particular command.

gitpod /workspace/soroban-pioneer-quest (main) $ sq --help
sq <command>

Commands:
  sq login   Connect your Stellar Quest account to Gitpod
  sq logout  Disconnect your Stellar Quest account from Gitpod
  sq user    Print out information about yourself                  [aliases: me]
  sq open    Open the Stellar Quest website
  sq pull    Pull any new or missing Quests into the /quests directory
  sq play    Generate a Quest Keypair to play a Quest           [aliases: quest]
  sq check   Check your Quest answer                           [aliases: verify]
  sq submit  Submit a signed reward XDR to the Stellar Quest backend

Options:
  -h, --help     Show help                                             [boolean]
      --version  Show version number                                   [boolean]

Getting New Quests

We're confident you'll be able to figure out how to use sq on your own, but there is one part that deserves some extra attention: the mechanics around getting a new quest when it becomes available. When we release a new quest, there are two ways you can pull in the new information: the "easy" sq way, or the "hard" git way.

The Easy Way

All you'll need to do is run sq pull from within any of the bash shells in the workspace, and it will pull in all the new information for you. The CLI will attempt to save any changes you've made to the directory, as well.

The Hard Way

If you're a git pro, this might be right up your alley. Essentially, what you need to do is fetch from the origin and incorporate the changes within the quests/ directory into your working tree. If you want to use the same sequence of git commands that the SQ CLI uses, here's what it does:

git stash
git fetch --all
git checkout origin/main --theirs /workspace/<the-workspace-name>/quests/
git stash pop

There may be some conflict cleanup required, depending on the current state of your working tree when you run those commands. You could also skip the stash steps if you don't care to save existing changes within the quests/ directory.

Rust Environment

Crucially toward the goal of writing smart contracts for Soroban, your workspace contains a fully configured, ready to go Rust development environment. We have all the tooling, compilers, build processes, and anything else you'll need to hit the ground running. This includes:

  • An up-to-date version of the Rust programming language
  • This pre-configured VS Code editor, with the required extensions
  • The Cargo package manager for Rust crates
  • The wasm32-unknown-unknown target for compiling your contracts

You have enough pre-installed to write, debug, test, build, and deploy Soroban smart contracts from right within this Gitpod workspace. We even have an example contract ready for you to look through in the quests/0-hello-world/ directory.

Check out the Makefile

You may have noticed the Makefile present in this repository. In it, there are comments explaining all the pre-configured build rules. To get started quickly, you can simply run make, make build, or make test from within your root workspace directory.

Soroban CLI

Your workspace includes the Soroban CLI, as well. The Soroban CLI can execute Soroban contracts in the same environment the contract will execute on network, however in a local sandbox. This tool is in active development. So, conventions and usage should be expected to change. You can always find the latest about the Soroban CLI here!

Futurenet

Did you know you have access to a Stellar network node right now!? Yeah, right here in your browser, in this workspace there's a Stellar node connected to the "Futurenet" testing network. We've taken care of all the work so you don't have to worry about docker images, starting the service, or anything besides learning to make contracts!

This will come in very handy when you are ready to deploy and share your contracts outside of the sandbox.

Good Luck

Now that you're (at least somewhat) familiar with the lay of the land, you're ready to get questing! Open up that Gitpod, and get to work! Most importantly, have fun!!

Open in Gitpod

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 74.8%
  • Makefile 25.2%