More in https://medium.com/@ZXConnect

More in https://mirror.xyz/0xea5972905B98D55e819b3540877d111228bee83b

Installation

Use our script for installation:

wget -q -O 0g.sh <https://api.nodes.guru/0g.sh> && sudo chmod +x 0g.sh && ./0g.sh && source $HOME/.bash_profile

Creating a Wallet

Create a wallet and save the mnemonic phrase:

0gchaind keys add wallet --eth

Recover an existing wallet:

0gchaind keys add wallet --recover --eth

Public Address

Get the private key and import it into a wallet like Metamask:

0gchaind keys unsafe-export-eth-key wallet

Requesting Tokens and Checking Balance

Request tokens and check balance:

0gchaind q bank balances $(0gchaind keys show wallet -a)

Creating a Validator

Create a validator:

0gchaind tx staking create-validator \\
  --amount=1000000ua0gi \\
  --pubkey=$(0gchaind tendermint show-validator) \\
  --moniker="$VALIDATOR" \\
  --chain-id="zgtendermint_16600-2" \\
  --commission-rate="0.10" \\
  --commission-max-rate="0.20" \\
  --commission-max-change-rate="0.01" \\
  --min-self-delegation="1" \\
  --gas=auto \\
  --gas-adjustment=1 \\
  --from=wallet -y

Additional Commands