var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=1&rec=1&url=https://docs.terra.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

terrad gentx

Adds a genesis transaction to genesis.json.

Synopsis

Generate a genesis transaction that creates a validator with a self-delegation, that is signed by the key in the Keyring referenced by a given name. A node ID and Bech32 consensus pubkey may optionally be provided. If they are omitted, they will be retrieved from the priv_validator.json file. The following default parameters are included:

priv_validator.json
Copy

_5
delegation amount: 1000000000uluna
_5
commission rate: 0.1
_5
commission max rate: 0.2
_5
commission max change rate: 0.01
_5
minimum self delegation: 1

You can access the genesis.json file in Terrad's config folder.

Terrad
Copy

_1
code ~/.terra/config/genesis.json

Example

Terrad
Copy

_8
terrad gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=os --chain-id=test-chain-1 \
_8
--moniker="myvalidator" \
_8
--commission-max-change-rate=0.01 \
_8
--commission-max-rate=1.0 \
_8
--commission-rate=0.07 \
_8
--details="..." \
_8
--security-contact="..." \
_8
--website="..."

Usage

Terrad
Copy

_1
terrad gentx [key_name] [amount] [flags]

Options

Terrad
Copy

_38
-a, --account-number uint The account number of the signing account (offline mode only)
_38
--amount string Amount of coins to bond
_38
-b, --broadcast-mode string Transaction broadcasting mode (sync|async|block) (default "sync")
_38
--chain-id string The network chain ID
_38
--commission-max-change-rate string The maximum commission change rate percentage (per day)
_38
--commission-max-rate string The maximum commission rate percentage
_38
--commission-rate string The initial commission rate percentage
_38
--details string The validator's (optional) details
_38
--dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)
_38
--fee-account string Fee account pays fees for the transaction instead of deducting from the signer
_38
--fees string Fees to pay along with transaction; eg: 10uluna
_38
--from string Name or address of private key with which to sign
_38
--gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically (default 200000)
_38
--gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1)
_38
--gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uluna)
_38
--generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase is not accessible)
_38
-h, --help help for gentx
_38
--home string The application home directory (default "/Users/.terra")
_38
--identity string The (optional) identity signature (ex. UPort or Keybase)
_38
--ip string The node's public IP (default "10.0.0.198")
_38
--keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory) (default "os")
_38
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
_38
--ledger Use a connected Ledger device
_38
--min-self-delegation string The minimum self delegation required on the validator
_38
--moniker string The validator's (optional) moniker
_38
--node string <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
_38
--node-id string The node's NodeID
_38
--note string Note to add a description to the transaction (previously --memo)
_38
--offline Offline mode (does not allow any online functionality
_38
-o, --output string Output format (text|json) (default "json")
_38
--output-document string Write the genesis transaction JSON document to the given file instead of the default location
_38
--pubkey string The validator's Protobuf JSON encoded public key
_38
--security-contact string The validator's (optional) security contact email
_38
-s, --sequence uint The sequence number of the signing account (offline mode only)
_38
--sign-mode string Choose sign mode (direct|amino-json), this is an advanced feature
_38
--timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height
_38
--website string The validator's (optional) website
_38
-y, --yes Skip tx broadcasting prompt confirmation

See also

  • terrad - The Terra Blockchain's CLI and node daemon.