Mainnet 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.
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: https://docs.saga.xyz/getting-started/download-saga-cli
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 sagacli
on MacOS or Linux, then issue the full command: sudo chmod +x /usr/local/bin/sagacli
Lastly, before you start to use sagacli
, please ensure that you have installed the correct version. You may not be able to access all of the features in sagacli
if you are using an incorrect version.
Note: Latest sagacli
version is: 0.4.11
to check your version, run command: sagacli -v
2. Configure SagaCLI
Execute the following commands provided below to configure the sagacli
to communicate with the Saga Platform Chain:
If you've used sagacli in the past on Cassiopeia, we recommend carefully verifying that all of the config parameters below are set correctly otherwise your CLI might fail.
Once this is done, you can review your configuration by running
The "keyring-backend" in your config may 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:
You should see the following output:
4. Generate Key/Address with SagaCLI
Next you'll setup your Key/Address. This is where you'll receive your upsaga
tokens so you can launch your chainlet.
Example: To generate a new key and call it mykey1
you would issue the command:
You'll then be prompted with:
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.)
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.
After you have the passphrase from your Saga contact, tokens from the Saga Faucet can be requested into your Saga account using the Saga Web App or using the sagacli
Example: If you were provided with the Faucet Airdrop Key named "projectx-1" then issue this command and press enter:
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:
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:
You should see a minimum of 350,000,000 upsaga
(350 PSAGA) in your account.
7. Launch Chainlet using SagaCLI
Ensure you have sufficient funds in the launcher's wallet. To launch a chainlet of type SagaOS, you need at least 310,000,000 upsaga (310 PSAGA)
. See the chainlet billing section for more details.
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
:
Now let's break down this command:
sagacli chainlet launch
The base command to launch chainlet
SagaOS
The chainlet type to launch. You can see the full list of chainlet types by running
sagacli chainlet list-types
0.5.17
The chainlet stack version to launch. Run the command:
sagacli chainlet list-types
and you'll see that0.5.17
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
--fees 2500upsaga
The fee to pay for this chainlet launch transaction
--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.
8. Obtain RPC Links and Block Explorer using SagaCLI
Typically, a chainlet is launched within one minute of issuing a chainlet launch command as described above.
However, it can take longer, sometimes up to 2 to 3 minutes. So, if no data is returned by the commands in this section, please try again.
To obtain your URL's you'll first need your ChainID.
To get your ChainID, simply issue the command:
You will see similar output. You'll want to take note of your ChainID. In this example, my ChainID is coolapp_1682719845971475-1
Next you'll run the following command. Make sure to replace <ChainID> with your actual ChainID
It may take a few minutes for these endpoints to become available, and the Status will display as Unavailable until they do.
Example:
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 JSON-RPC endpoint from the
sagacli chainlet apis
command we executed in Step 8Chain ID: Here you need to input the middle numerical part of the ChainID. First, issue the command
sagacli chainlet list
Second, use the middle numerical part of the ChainID (make sure to drop the '-1') Example below
Currency Symbol: This is your Chainlet currency symbol. You can get that by calling the
sagacli chainlet get <ChainID>
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.
Last updated