Transactions

Cosmos-SDK Staking module transactions commands

The tx commands allow users to interact with the staking module.

sged tx staking --help

Create Validator

The command create-validator allows users to create new validator initialized with a self-delegation to it.

Usage:

sged tx staking create-validator [flags]

Example:

sged tx staking create-validator \
  --amount=1000000usge \
  --pubkey=$(sged tendermint show-validator) \
  --moniker="my-moniker" \
  --website="https://myweb.site" \
  --details="description of your validator" \
  --chain-id="name_of_chain_id" \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1" \
  --gas="auto" \
  --gas-adjustment="1.2" \
  --gas-prices="0.025usge" \
  --from=mykey

Delegate

The command delegate allows users to delegate liquid tokens to a validator.

Usage:

sged tx staking delegate [validator-addr] [amount] [flags]

Example:

sged tx staking delegate sgevaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 1000usge --from mykey

Edit Validator

The command edit-validator allows users to edit an existing validator account.

Usage:

sged tx staking edit-validator [flags]

Example:

sged tx staking edit-validator --moniker "new_moniker_name" --website "new_webiste_url" --from mykey

Redelegate

The command redelegate allows users to redelegate illiquid tokens from one validator to another.

Usage:

aged tx staking redelegate [src-validator-addr] [dst-validator-addr] [amount] [flags]

Example:

sged tx staking redelegate sgevaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj sgevaloper1l2rsakp388kuv9k8qzq6lrm9taddae7fpx59wm 100usge --from mykey

Unbond

The command unbond allows users to unbond shares from a validator.

Usage:

sged tx staking unbond [validator-addr] [amount] [flags]

Example:

sged tx staking unbond sgevaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100usge --from mykey

Cancel Unbond

The command cancel-unbond allow users to cancel the unbonding delegation entry and delegate back to the original validator.

Usage:

sged tx staking cancel-unbond [validator-addr] [amount] [creation-height]

Example:

sged tx staking cancel-unbond sgevaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 100usge 123123 --from mykey

For detailed information see the original document.

Last updated