From 6dcffbaca666275a13bf01de1de303111240c95b Mon Sep 17 00:00:00 2001 From: dotneko <4761762+dotneko@users.noreply.github.com> Date: Thu, 1 Dec 2022 22:08:00 +0800 Subject: [PATCH] Add quickstart guide --- Quickstart.md | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++ 2 files changed, 119 insertions(+) create mode 100644 Quickstart.md diff --git a/Quickstart.md b/Quickstart.md new file mode 100644 index 0000000..1bde83c --- /dev/null +++ b/Quickstart.md @@ -0,0 +1,115 @@ +Quickstart Guide +================ + +## Installation from binary + +Download latest release from https://github.com/dotneko/omg/releases + +Archive contains: +* `omg` binary +* `.omgconfig.yaml` configuration file + +After extracting, ensure `omg` in path and move/copy `.omgconfig.yaml` to $HOME directory + +## Configuration in `.omgconfig.yaml` + +``` +app: + addrbook_path: '$HOME' + addrbook_filename: '.omg.json' + alias_length: 3 + +chain: + daemon: 'onomyd' + chain_id: 'onomy-testnet-1' + address_prefix: 'onomy' + valoper_prefix: 'onomyvaloper' + base_denom: 'anom' + token: 'nom' + decimals: 18 + +options: + default_fee: '1212anom' + gas_adjust: 1.2 + keyring_backend: 'test' + remainder: '1nom' +``` + +Important parameters: +* `chain_id`: configure to match current chain +* `default_fee`: fee configuration when executing transactions +* `keyring_backend`: set to keyring-store, e.g. 'pass' as alternative +* `remainder`: amount in *nom* or *anom* to be minimum left after restaking/delegating *all* + +## Basic Usage + +1. Import name/address from keyring + +``` +omg address import # omg a i +``` + +Import from keyring pass + +``` +omg a i --keyring pass # omg a i -k pass +``` + +2. Show addresses + +``` +omg address show # omg a s +``` + +3. Show active validators + +``` +omg validator show # omg v s +``` + +4. Get valoper address for validator moniker + +``` +omg validator show [moniker] # omg v s nomblocks +``` + +5. Check balances (all accounts in address book) + +``` +omg balances --all # omg b -a +``` + +6. Check rewards (all accounts in address book) + +``` +omg rewards --all # omg r -a +``` + +7. Withdraw all rewards + +``` +omg tx withdraw-rewards [delegator] # omg tx wd user1 +``` + +8. Delegate 10nom to validator + +``` +omg tx delegate [delegator] [moniker] 10nom +``` + +9. Delegate all leaving 1000000000000anom to validator + +``` +omg tx delegate [delegator] [moniker] --full --remainder 1000000000000anom +``` + +10. Restake all leaving 10nom (withdraw all then delegate) +``` +omg tx restake [delegator] [moniker] --remainder 10nom +``` + +11. Automatic confirm without prompt using `--auto` or `-a` flag + +``` +omg tx restake [delegator] [moniker] -r 10nom -a +``` \ No newline at end of file diff --git a/README.md b/README.md index 1d53e4d..d7c7fcf 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ A command line tool for common user/validator interactions with the [Onomy Proto * Locally running Onomy full node (see [Onomy Docs](https://docs.onomy.io/run-a-full-node/starting-a-full-node)) * User-owned keys already stored in the onomy keyring +## Quickstart + +Quick start instructions [here](Quickstart.md) + ## Installation Clone this repo