Skip to content

Instantly share code, notes, and snippets.

@suenot
Last active June 18, 2024 11:22
Show Gist options
  • Save suenot/3fdffae9effed27a774725d363695a43 to your computer and use it in GitHub Desktop.
Save suenot/3fdffae9effed27a774725d363695a43 to your computer and use it in GitHub Desktop.
deep-chain commands

Запуск валидаторской ноды

deepchain start --compute-gpu=false --search-api=false --home ./testnet

Список кошельков

deepchain keys list --home ./testnet --keyring-backend=test

Добавляем кошелек

Есть разные keyring-backend: https://docs.cosmos.network/v0.46/run-node/keyring.html#the-test-backend

deepchain keys add validator --recover --keyring-backend=test --home ./testnet

Добавить чужой кошелек по публичному ключу

deepchain keys add timax-validator --pubkey '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A9W9lHmi6l0x+E+6ORzvm2m7UWsRYZqgDFJ61v/BO9nS"}' --keyring-backend test --home ./testnet/

Баланс кошелька

deepchain query bank balances deep1qrehwsf9pcr5relawuqm8vf6zaz2r2epcukc9q --home ./testnet

Id валидатора

deepchain tendermint show-node-id --home ./testnet/

Адрес ноды

deepchain tendermint show-address --home ./testnet/

Адрес валидатора (на него будем стекать токены)

deepchain keys show validator --home ./testnet --keyring-backend=test --bech val

Отправка токенов

deepchain tx bank send validator deep1qrehwsf9pcr5relawuqm8vf6zaz2r2epcukc9q 1000000energy \
--from=validator \
--chain-id=deep \
--home ./testnet \
--keyring-backend=test

Stake

deepchain tx staking delegate deepvaloper1mfp24vn05w94ldw2qapk8jzp452swdhgqz072l 100000energy \
--from=validator \
--chain-id=deep \
--keyring-backend=test \
--home ./testnet/

Создать валидатора

deepchain tx staking create-validator \
  --amount=88888energy \
  --min-self-delegation "88888" \
  --pubkey=$(deepchain tendermint show-validator --home ./testnet/) \
  --moniker="validator" \
  --from=validator \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --chain-id=deep \
  --gas-prices=0.01energy \
  --gas=600000 \
  --keyring-backend=test \
  --home ./testnet/

Редактировать валидатора

deepchain tx staking edit-validator \
  --moniker="supervalidator" \
  --from=validator \
  --chain-id=deep \
  --keyring-backend=test \
  --home ./testnet/

Статус транзакции

deepchain query tx C12BA71961750B6DE9596FD7047550B4B921C33774721D8E5C5547E577597F46

Валидаторы

deepchain query staking validators

Входящие поднялючения

curl 'localhost:26657/net_info'

unjail

deepchain tx slashing unjail --from=validator --chain-id=deep --home ./testnet/ --gas-prices=0.01energy --gas=300000 --keyring-backend=test

Мультисиг документация

Мультисиг генерация транзакции

deepchain tx bank send deep1sw6z22wclsypnq97jw9g5ahjfxxmfmh2azs49t deep1wlgxj40ncap5n0up78ka4e42a8kk9avl958txp 42energy \
--from=deep1sw6z22wclsypnq97jw9g5ahjfxxmfmh2azs49t \
--chain-id=deep \
--keyring-backend=test \
--home ./testnet/ \
--generate-only > unsigned.json
deepchain tx sign unsigned.json --multisig=deep1sw6z22wclsypnq97jw9g5ahjfxxmfmh2azs49t \
--from=deep120cz8jrjk9n5rm09zpjnlrrtdgvwutg3ppv257 \
--output-document=sign1.json \
--chain-id=deep \
--keyring-backend=test \
--home ./testnet/ 
deepchain tx sign unsigned.json --multisig=deep1sw6z22wclsypnq97jw9g5ahjfxxmfmh2azs49t \
--from=deep1nafd0v7pe5f3933ta4h9rp47nkugzcrkc9asak \
--output-document=sign2.json \
--chain-id=deep \
--keyring-backend=test \
--home ./testnet/ 
deepchain tx multisign unsigned.json deep-cadets sign1.json sign2.json \
--chain-id=deep \
--keyring-backend=test \
--home ./testnet/ > signed.json
deepchain tx broadcast signed.json \
--chain-id=deep \
--keyring-backend=test \
--home ./testnet/

Мультисиг стейкинг

deepchain tx staking delegate deepvaloper1mfp24vn05w94ldw2qapk8jzp452swdhgqz072l 100000energy \
--from=deep1sw6z22wclsypnq97jw9g5ahjfxxmfmh2azs49t \
--chain-id=deep \
--keyring-backend=test \
--home ./testnet/ \
--generate-only > unsigned-staking.json

после подписываем и отправляем в сеть

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment