Beginners
October 22, 2023

Leo-Contributor: Starter Guide

Pre-requisites

Important Notice: You need to have a github account. If you already have a github account, you can proceed , but if you do not please to continue, create a github account following the link https://github.com/

Optional Pre requisite

Though this step is optionally, but it's advisable to go through with it cause this is best practice.

Create a new user

useradd danke 

You will be prompted to input your password, add your password

Then other name values like Full Name, Room Number, Work Phone etc. will request an input. Press enter to use the default values

Grant the user the permissions and switch to the user.

sudo usermod -aG sudo leo

Ensure to change to the user home directory

cd /home/danke

Update and install the necessary packages

sudo apt-get update && sudo apt-get install unzip && wget git -y

Create an access Token:
Follow the link: https://github.com/settings/tokens/new

Scroll down

Click on generate token

Note: Please save your token securely and never revel it to anyone

Variables

Next Set your variables

NICKNAME="Your_github_nickname" 
EMAIL="Your_github_email" 
TOKEN="Your_personal_access_token"

Replace "Your_github_nickname" with your github alias, replace "Your_github_email" with your email, and "Your_personal_access_token" with your saved secured token.

Configuration

Next configure your git

git config --global credential.helper store

configure your username and email

git config --global user.name $NICKNAME
git config --global user.email $EMAIL
git credential approve < <(echo "protocol=https host=github.com username=$NICKNAME password=$TOKEN")

Download the Aleo and Leo Binary

mkdir $HOME/aleo
wget https://github.com/AleoHQ/leo/releases/download/v1.9.5/leo-v1.9.5-x86_64-unknown-linux-musl.zip
unzip leo-v1.9.5-x86_64-unknown-linux-musl.zip -d $HOME/aleo

Add to $PATH and check

echo 'export PATH="$HOME/aleo:$PATH"' >> ~/.bashrc
source ~/.bashrc
leo --help

You will get an output like this:

Create the TicTacToe Game

Create the tictactoe game from the example given

leo example tictactoe

Change into the tictactoe directory

cd $HOME/tictactoe

Run a new game

leo run new

Make the script file executable

chmod +x run.sh

Start the game

./run.sh

Repo Preparation

Using git, prepare your repository

git init
git checkout -b main
git add .
git commit -m "My first commit"

Create a new Repository

Follow this link https://github.com/new

This repository should be empty without readme, license, gitignore files. Fill the repository name with any name you wish and then click on create repository

Next assign your repository link to a variable called LINK

LINK="https://github.com/user/.../.git"

Claim your badge

  1. Go to the Leo repo here
  2. Give the repo a ⭐
  3. Click "New Issue" in the top right corner
  4. Click "Get started" in the Leo Contributor Badge row
  5. Title your issue: "Add <your_github_username> to contributors"
  6. Enter the following as your issue description:
Hi Aleo team! I'm claiming my contributor badge for completing the New Developer Toolkit tutorial.Tutorial Repo: <GITHUB_REPO_URL>Requested badge: <BADGE_TYPE

7. Click "Submit new issue"

8. Once your issue is approved, we will add you to the Contributors section of the Leo README.md file.

Congratulations on becoming a Leo contributor!

Website: https://www.aleo.org/ T witter : https://twitter.com/AleoHQ G ithub : https://github.com/AleoHQ D iscord : https://discord.com/invite/aleohq