Quickstart Guide

This quickstart guide will walk you through the necessary steps to download, install & configure the SagaCLI, request your tokens and launch your chainlet.
IMPORTANT: Cassiopeia is for testing purposes only. It's our first private testnet. Future testnets will be coming in the summer on the way to mainnet in late 2023. As such, this should be used for testing ONLY, not production deployments.

1. Download & Install SagaCLI

Download the SagaCLI or check if you're running the latest SagaCLI version.
Download link & latest version can be found here:
After you download the correct version for your OS, open up your command line terminal, CD to the directory where you downloaded it, then install it with the following command:
tar -xzf sagacli-operatingsystem.tar.gz -C /usr/local/bin/
Example: If you downloaded the MacOS version of the SagaCLI you would run the command:
tar -xzf sagacli-darwin-arm64.tar.gz -C /usr/local/bin/
Note: If you encounter an error and you're on MacOS or Linux, try using 'sudo' in the command and enter your computers password when prompted
sudo tar -xzf sagacli-darwin-arm64.tar.gz -C /usr/local/bin/
Then test that you can run the SagaCLI by typing sagacli at your command prompt. You should see the usage and available commands appear.
Note: If you encounter 'permission denied' when trying to run sagaclion MacOS or Linux, then issue the full command: sudo chmod +x /usr/local/bin/sagacli

2. Configure SagaCLI

Execute the following commands provided below to configure the sagacli to communicate with the Saga Platform Chain:
sagacli config network-rpc
sagacli config controller
sagacli config platform-chain-id cassiospc-1
Once this is done, you can review your configuration by running
sagacli config
"loglevel": "info",
"controller": "",
"output": "text",
"keyring-backend": "os",
"network-rpc": "",
"from": "mykey",
"platform-chain-id": "cassiospc-1",
"denom": "tsaga",
"broadcast-mode": "block",
"ledger": "false"
**Note: The "keyring-backend" in your config my show "os" or "file", this does NOT need to match with what's displayed above.

3. Verify SagaCLI

After completing Steps 1 & 2 run the following command to verify the sagacli is communicating with the Saga Platform Chain:
sagacli status
You should see the following output:
$ sagacli status
Saga Platform Chain Controller
------------------- ----------
Online Online

4. Generate Key/Address with SagaCLI

Next you'll setup your Key/Address. This is where you'll receive your tSaga tokens so you can launch your chainlet.
sagacli keys add <keyname>
Example: To generate a new key and call it mykey1 you would issue the command:
$ sagacli keys add mykey1
You'll then be prompted with:
$ Enter keyring passphrase:
The keyring passphrase can be anything you want but you'll you need to remember it as you'll need it to launch, manage and work with your chainlet.
Once completed, you should see this output. (The keyname will be different for your as well as the mnemoic phrase.)
$ sagacli keys add mykey1
- address: saga17tz488sq54l72mpt3ntl95gc50qtwta9l986u6
name: mykey1
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AnxGYN/vnFJ0L6PXJr5aaUE+zGI+AKvNc7U+vPhu5joM"}'
type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.

5. Faucet Airdrop Key

Your contact at Saga will send you a Faucet Airdrop Key which will auto-fund your wallet address. If you don't have your Faucet Airdrop Key, reach out to your contact at Saga.
sagacli account get-tokens <faucet airdrop key>
Example: If you were provided with the Faucet Airdrop Key named "projectx-1" then issue this command and press enter:
$ sagacli account get-tokens projectx-1
Next, you'll be prompted to enter your keyring passphrase which is the same keyring passphrase you setup in Step#4.
After a few seconds, you will see a response similar to this:
$ Success! Faucet funded wallet saga1f7at0lnkd89t69eltkvcvuydq9enwsa942nqw6. Tx: A581EE27B208BFDC8F497A3416B942B8BB25BB7761BF13F4258E0C7A9F8D3D3D

6. Confirm Token Airdrop

Once you receive the "Success! Faucet funded wallet" message, the Token Airdrop is complete and you can verify using the sagacli by issuing the command:
sagacli account balance
You should see a minimum of 350 tSAGA in your account.

7. Launch Chainlet using SagaCLI

There are several different options for launching a Chainlet. Details can be found here.
Here's an example command that launches a chainlet called myprojectname:
sagacli chainlet launch sagaevm 1.0 myprojectname --genesis-account 0xFd54E1809f031727AD392445351ca2e02cA15c2A:100000000 --denom mpn
Now let's break down this command:
  • sagacli chainlet launch
    • The base command to launch chainlet
  • sagaevm
    • The chainlet type to launch. You can see the full list of chainlet types by running sagacli chainlet list-types
  • 1.0
    • The chainlet stack version to launch. Run the command: sagacli chainlet list-types and you'll see that 1.0 is the "Version"
  • myprojectname
    • The name of your project, ie. if your project name is "Cool Web3 Game" then name it coolweb3game
  • --genesis-account 0xFd54E1809f031727AD392445351ca2e02cA15c2A:100000000
    • The genesis-account flag is composed of your EVM address, along with the number of full tokens you want in your account, separated by a colon. The address can be copied directly from Metamask
  • --denom mpn
    • The currency symbol you'll create. This should be between 2 and 6 characters. mpn is just used for this example.
Then press Enter and your Chainlet will launch.
To obtain your URL's you'll first need your ChainID.
To get your ChainID, simply issue the command:
sagacli chainlet list
You will see similar output. You'll want to take note of your ChainID. In this example, my ChainID is coolapp_1682719845971475-1
$ sagacli chainlet list
ChainId Name StackName StackVersion Status EscrowBalance
------- ---- --------- ------------ ------ -------------
coolapp_1682719845971475-1 coolapp sagaevm 1.0 Online 230tsaga
Next you'll run the following command. Make sure to replace <ChainID> with your actual ChainID
sagacli chainlet apis <ChainID>
$ sagacli chainlet apis coolapp_1682719845971475-1
Name Endpoint Status
---- -------- ------
jsonrpc Available
ws Available
explorer Available

9. Configuring Metamask Network:

Navigate to Metamask -> Settings -> Networks -> Add Network
The settings screen will look something like this:
From here, click on "Add a network manually" and type in the following settings in the required fields:
  • Network Name: This will be your Chainlet name (in this example I'm using "coolapp")
  • New RPC URL: This will be your chainlet's jsonrpc endpoint from the sagacli chainlet apis command we executed in Step 8
  • Chain ID: Here you need to input the middle numerical part of the ChainID. First, issue the command sagacli chainlet list
  • $ sagacli chainlet list
    ChainId Name StackName StackVersion Status EscrowBalance
    ------- ---- --------- ------------ ------ -------------
    coolapp_1682719845971475-1 coolapp sagaevm 1.0 Online 230tsaga
  • Second, use the middle numerical part of the ChainID (make sure to drop the '-1') Example below
  • 1682719845971475
  • Currency Symbol: This is your Chainlet currency symbol. You can get that by calling the sagacli chainlet get <ChainID>
  • $ sagacli chainlet get coolapp_1682719845971475-1
    ChainId Name StackName StackVersion Launcher Mantainers CurrencySymbol Status
    ------- ---- --------- ------------ -------- ---------- -------------- ------
    coolapp_1682719845971475-1 coolapp sagaevm 1.0 saga1f7at0lnkd89t69eltkvcvuykq9enwsa942nqw6 [saga1f7at0lnkd89t69eltkvcvuykq9enwsa942nqw6] coolcoin STATUS_ONLINE
  • Block Explorer URL
Taken together, the output will look similar with what you see in the following image below:
Once this final step is complete, you're ready to deploy any EVM-based smart contract. You can deploy with tools such as Remix, Truffle, even Thirdweb.