Quickstart Guide
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. Install
Ensure you've installed and are running the latest SagaCLI version.
Latest version and download links for each supported platform can be found here.
Once you have the URL for your specific platform, you can download the file and extract it into a directory in your path:
# change the URL for your platform
URL=https://cassio-download.s3.amazonaws.com/macos-intel/sagacli-darwin-amd64.tar.gz
wget $URL -O cassio.tar.gz
tar -xzf cassio.tar.gz -C /usr/local/bin/
sagacli --version
2. Configure
Execute the following commands provided below to configure the sagacli
to communicate with the Saga Platform Chain:
sagacli config network-rpc https://spc.sp1.sagarpc.io
sagacli config controller https://controller.sp1.sagarpc.io
sagacli config platform-chain-id cassiospc-1
Once this is done, you can review your configuration by running sagacli config
:
{
"loglevel": "info",
"controller": "https://controller.sp1.sagarpc.io",
"output": "text",
"keyring-backend": "os",
"network-rpc": "https://spc.sp1.sagarpc.io",
"from": "mykey",
"platform-chain-id": "cassiospc-1",
"denom": "tsaga",
"broadcast-mode": "block",
"ledger": "false"
}
3. Verify
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. Key/Address
Next you'll setup your Key/Address.
sagacli keys add <keyname>
For example, if you want to generate a new key and call it mykey1 you would issue the command:
$ 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. Token Airdrop Request
Next you'll request your Token Airdrop using the Token Request Form from within the Saga Portal. If you're not already logged in, head over to https://portal.saga.xyz/
The Token Request Form is located in the left navigation menu inside the Saga Portal. After you provide your wallet address we'll then airdrop the tokens and message you when they're ready.
6. Confirm Token Airdrop
Once we message you to let you know the Token Airdrop is complete, you can verify using the sagacli
by issuing the command:
sagacli account balance
You should see 350 tsaga in your account.
7. Launch Chainlet
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 that1.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.
mpn
is just used for this example.
Then press Enter and your Chainlet will launch.
8. Obtain RPC Links and Block Explorer:
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>
Example:
$ sagacli chainlet apis coolapp_1682719845971475-1
Name Endpoint Status
---- -------- ------
jsonrpc coolapp-1682719845971475-1.jsonrpc.sp1.sagarpc.io Available
ws coolapp-1682719845971475-1.ws.sp1.sagarpc.io Available
explorer coolapp-1682719845971475-1.sp1.sagaexplorer.io 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 8https://coolapp-1682719845971475-1.jsonrpc.sp1.sagarpc.io
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
https://coolapp-1682719845971475-1.sp1.sagaexplorer.io
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