Skip to content

Commit

Permalink
Add quickstart guide
Browse files Browse the repository at this point in the history
  • Loading branch information
dotneko committed Dec 1, 2022
1 parent 0f2c2f1 commit 6dcffba
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
115 changes: 115 additions & 0 deletions Quickstart.md
Original file line number Diff line number Diff line change
@@ -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
```
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6dcffba

Please sign in to comment.