SIX CLI and SIX Protocol chain are building on cosmos-sdk then all basic command and flags of command pretty much the similar to cli of other chain.
Basic Command
Must Know Flags
# Point the six-testnet rpc endpoint--nodehttps://rpc1.fivenet.sixprotocol.net:443# Point the six-mainnet endpoint--nodehttps://sixnet-rpc.sixprotocol.net:443# Specify who is signing message--from<address># Specify where can we get the private key to sign // os means local os device--keyring-backend=os# Gas limit to set per-transaction--gasauto# Adjustment factor to be multiplied against the estimate returned by the tx simulation--gas-adjustment# Gas prices in decimal format to determine the transaction fee--gas-prices# Skip tx broadcasting prompt confirmation-y
You can start using cli by typing 'sixd -h' or 'sixd --help' to list the common available commands of sixd. It will show the results.
sixd -h
sixd -h
Six Daemon
Usage:
sixd [command]
Available Commands:
add-genesis-account Add a genesis account to genesis.json
collect-gentxs Collect genesis txs and output a genesis.json file
config Create or query an application CLI configuration file
debug Tool for helping with debugging your application
export Export state to JSON
gentx Generate a genesis tx carrying a self delegation
help Help about any command
init Initialize private validator, p2p, genesis, and application configuration files
keys Manage your application keys
migrate Migrate genesis to a specified target version
query Querying subcommands
rollback rollback cosmos-sdk and tendermint state by one height
rosetta spin up a rosetta server
start Run the full node
status Query remote node for status
tendermint Tendermint subcommands
testnet subcommands for starting or configuring local testnets
tx Transactions subcommands
validate-genesis validates the genesis file at the default location or at the location passed as an arg
version Print the application binary version information
Flags:
-b, --broadcast-mode string Transaction broadcasting mode (sync|async|block) (default "sync")
--chain-id string Specify Chain ID for sending Tx (default "testnet")
--fees string Fees to pay along with transaction; eg: 10aphoton
--from string Name or address of private key with which to sign
--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)
--gas-prices string Gas prices to determine the transaction fee (e.g. 10aphoton)
-h, --help help for sixd
--home string directory for config and data (default "/Users/hamdeeduere/.six")
--keyring-backend string Select keyring's backend (default "os")
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--node string <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
--trace print out full stack trace on errors
Use "sixd [command] --help" for more information about a command.
You can list other available child options by using -h or --help.
such as ‘sixd query -h’
sixd query -h
sixd query -h
Querying subcommands
Usage:
sixd query [flags]
sixd query [command]
Aliases:
query, q
Available Commands:
account Query for account by address
auth Querying commands for the auth module
authz Querying commands for the authz module
bank Querying commands for the bank module
block Get verified data for a the block at given height
distribution Querying commands for the distribution module
erc20 Querying commands for the erc20 module
evidence Query for evidence by hash or for all (paginated) submitted evidence
evm Querying commands for the evm module
feegrant Querying commands for the feegrant module
feemarket Querying commands for the fee market module
gov Querying commands for the governance module
ibc Querying commands for the IBC module
ibc-transfer IBC fungible token transfer query subcommands
mint Querying commands for the minting module
nftadmin Querying commands for the nftadmin module
nftmngr Querying commands for the nftmngr module
nftoracle Querying commands for the nftoracle module
params Querying commands for the params module
protocoladmin Querying commands for the protocoladmin module
slashing Querying commands for the slashing module
staking Querying commands for the staking module
tendermint-validator-set Get the full tendermint validator set at given height
tokenmngr Querying commands for the tokenmngr module
tx Query for a transaction by hash, "<addr>/<seq>" combination or comma-separated signatures in a committed block
txs Query for paginated transactions that match a set of events
upgrade Querying commands for the upgrade module
Flags:
-h, --help help for query
Global Flags:
-b, --broadcast-mode string Transaction broadcasting mode (sync|async|block) (default "sync")
--chain-id string Specify Chain ID for sending Tx (default "testnet")
--fees string Fees to pay along with transaction; eg: 10aphoton
--from string Name or address of private key with which to sign
--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)
--gas-prices string Gas prices to determine the transaction fee (e.g. 10aphoton)
--home string directory for config and data (default "/Users/hamdeeduere/.six")
--keyring-backend string Select keyring's backend (default "os")
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--node string <host>:<port> to tendermint rpc interface for this chain (default "tcp://localhost:26657")
--trace print out full stack trace on errors
Use "sixd query [command] --help" for more information about a command.
Create Account
To create a fresh new account on SIX Protocol, you can follow this example.
Alice is just assume name you can change to whatever you want
sixdkeysaddalice# RESULT-name:alicetype:localaddress:6x123456789012345678912344567890123456789pubkey:'{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"SoMeThInGhUmAnDoNoTuNdErStAnD"}'mnemonic:""**Important** write this mnemonic phrase in a safe place.Itistheonlywaytorecoveryouraccountifyoueverforgetyourpassword.seedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseedseed
Important write this mnemonic phrase in a safe place. It is the only way to recover your account if you ever forget your password.
Keyring-backend
The private key of your address will be saved locally as a keyring file. There are three types of keyring files: test, os, and file.
The default keyring file will be saved as "test" and located at $home/.six/keyring-test.
The second option for saving the keyring file is 'file'. With this option, the keyring will be saved to $home/.six/keyring-file by default. However, you can save it to any path by using the following command:
sixdkeysaddalice--keyring-backendfile--home<input_path># this step you have to enter your password for security # when you trying to sign txs
Finally, we have the 'os' keyring file. This option binds your key to the device(s).
To use this option, change "keyring-backed" to "os".
sixdkeysaddalice--keyring-backendos# this step you have to enter your password for security # when you trying to sign txs
Query Command
Due to the large number of available query commands, we will provide examples of some commonly used commands.
Tip: You can check your balance by running a query like this.
sixd q bank balances $(sixd keys show -a alice --keyring-backend os) --node https://rpc1.fivenet.sixprotocol.net:443
Query your individual node reward
sixdqdistributionrewards<your_address><validator_address> \--nodehttps://rpc1.fivenet.sixprotocol.net:443# example for fivnet# sixd q distribution rewards 6x1pe9u6dx3s6tajag2qrnnexm3muh4dp7qdunvgd 6xvaloper13dwxflzhc3qlkcy9syfnhr8tu2kdvuavhzdf9f --node https://rpc1.fivenet.sixprotocol.net:443
Tx Command
Due to the large number of available tx commands, we will provide examples of some commonly used commands for perform transaction.
If you create an address with the keyring-backed os or file option, you may need to specify the keyring-backend.
## EXAMPLEsixd tx bank send $(sixd keys show -a alice) 6x10lf5hppazn0l7pxq2guv58g3w6sffqc7ra0u4a 19000000usix --chain-id fivenet --gas auto --gas-prices 1.25usix --gas-adjustment 1.5 --from alice --node https://rpc1.fivenet.sixprotocol.net:443 --keyring-backed test -y
Sending token to EVM account (0x) [EVMxCosmos Transfer]
To use the SIX Protocol EVM with Metamask, you need to wrap your USIX tokens and send them to your EVM account. Please ensure that you have USIX tokens in your account before proceeding.
After you wrapped usix token it will turn into asix.
1 six = 1000000 usix
1 usix = 1000000000000 asix
1 six = 1000000000000000000 asix
We provide 2 way to send token from Cosmos to EVM: Wrap and Send to EVM and Send to EVM