Saga

Prerequisites

  1. Install Go (version ≥ 1.19) Download and install Go from https://golang.org/dl/.

  2. Install Git Install Git to clone repositories.


Step 1: Install Saga CLI

  1. Clone the Saga repository:

    git clone https://github.com/saga-protocol/saga.git
    cd saga
  2. Build the CLI:

    make install

    After successful installation, verify the version:

    sagad version

Step 2: Configure the CLI for Testnet

  1. Initialize the configuration:

    sagad init <your-node-name> --chain-id=saga-testnet
  2. Add the Saga testnet configuration: Download the genesis.json:

    curl -O https://docs.saga.xyz/testnet/genesis.json
    mv genesis.json ~/.sagad/config/
  3. Set seeds and peers: Edit config.toml:

    nano ~/.sagad/config/config.toml

    Add the following in the persistent_peers section:

    persistent_peers = "<peer-list>"
  4. Configure minimum-gas-prices: Open app.toml:

    nano ~/.sagad/config/app.toml

    Set:

    minimum-gas-prices = "0.025usaga"

Step 3: Start the Node

Run the node:

sagad start

If successful, the node begins syncing with the testnet.


Step 4: Create a Wallet

  1. Generate a wallet:

    sagad keys add <wallet-name>

    Save the mnemonic securely.

  2. Retrieve your wallet address:

    sagad keys show <wallet-name> -a
  3. Request testnet tokens: Use a faucet (check https://faucet.saga.xyz or similar sources).


Step 5: Perform Transactions

  1. Check your balance:

    sagad query bank balances <wallet-address>
  2. Send tokens:

    sagad tx bank send <your-address> <recipient-address> 100000usaga --chain-id=saga-testnet --fees=5000usaga

Step 6: Query Network Information

  1. Check the latest block:

    sagad query block
  2. Query transaction history:

    sagad query txs --events 'message.sender=<wallet-address>'

Troubleshooting

  • Logs: Check logs in real-time:

    tail -f ~/.sagad/logs/sagad.log
  • Sync Issues: Ensure the node is fully synced before performing transactions:

    sagad status

Last updated