Personalize Command Examples
Fill in your details below. The command examples on this page will update automatically. Your data can be saved locally in your browser for your next visit.
General Chain Information
Basic Information
| Chain Name: | buycex |
| Chain ID: | bcx_323-1 |
| Network Type: | Mainnet |
| Status: | Live |
| Bech32 Prefix: | bcx |
| Website: | https://infinity.buycex.com |
Binary & Versions
| Binary Name: | bcxd |
| Node Home: | $HOME/.bcxd |
| Chain Registry Version: | v1.0.0 |
| Chain Registry Compatible Versions: | v1.0.0 |
| Repository: | GitHub |
SDK & Consensus
| SDK Version: | v0.45.16 |
| Consensus Engine: | Cometbft |
| Consensus Version: | N/A |
Token & Fees
| Token Symbol: | |
| Base Denom: | |
| Min Gas Price: | 0 |
Raw Chain Registry Data
Complete JSON data from the chain registry (for developers).
Show JSON Data
{
"$schema": "../chain.schema.json",
"chain_name": "buycex",
"chain_id": "bcx_323-1",
"pretty_name": "BuyCex Infinity Chain",
"status": "live",
"network_type": "mainnet",
"website": "https://infinity.buycex.com",
"bech32_prefix": "bcx",
"daemon_name": "bcxd",
"node_home": "$HOME/.bcxd",
"chain_type": "cosmos",
"slip44": 60,
"codebase": {
"genesis": {
"genesis_url": "https://buycex.net/genesis.json"
},
"git_repo": "https://github.com/cosvmlabs/buycex-chain",
"recommended_version": "v1.0.0",
"compatible_versions": [
"v1.0.0"
],
"sdk": {
"type": "cosmos",
"version": "v0.45.16"
},
"binaries": {
"linux/amd64": "https://buycex.net/bcxd-v1.0.0-linux-amd64.tar.gz"
}
},
"peers": {
"seeds": [],
"persistent_peers": []
},
"apis": {
"rpc": [
{
"address": "https://endpoint.buycex.net",
"provider": "buycex"
}
],
"rest": [
{
"address": "https://api.buycex.net",
"provider": "buycex"
}
],
"grpc": [
{
"address": "https://grpc.buycex.net",
"provider": "buycex"
}
]
},
"explorers": [
{
"kind": "pingpub",
"url": "https://cosmos.buycex.net",
"tx_page": "https://cosmos.buycex.net/tx/${txHash}"
}
],
"logo_URIs": {
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/buycex/images/bcx.png"
},
"images": [
{
"png": "https://raw.githubusercontent.com/cosmos/chain-registry/master/buycex/images/bcx.png"
}
],
"abs_meta": {
"slug": "buycex-bcx_323-1"
}
}
Complete Node Installation Guide for BuyCex Infinity Chain
Follow these comprehensive steps to install and configure your BuyCex Infinity Chain node.
Update System
Always start by updating your system to ensure you have the latest security patches and packages.
sudo apt update && sudo apt upgrade -y
Install Dependencies
Install essential packages required for building and running Cosmos SDK nodes.
sudo apt install git curl wget tar lz4 unzip jq build-essential pkg-config clang bsdmainutils make ncdu -y
Install Go
Go is the programming language for Cosmos SDK blockchains. For best results, please refer to the official documentation of the blockchain for the exact required version. You can check the latest Go versions on their download page.
cd $HOME
version="1.25.5"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
Verify Go Installation
Check that Go is correctly installed. The command below should output a version number.
go version
About Go (Golang)
Go is a statically typed, compiled programming language designed at Google. It is known for its simplicity, efficiency, and strong support for concurrent programming, making it an ideal choice for high-performance network services like blockchain nodes.
Key Features:
- Concurrency: Go's goroutines and channels make it easy to write highly concurrent and parallel programs.
- Performance: As a compiled language, Go applications are fast and have a low memory footprint.
- Simplicity: It has a clean and minimalistic syntax, making it easy to learn and maintain.
- Standard Library: A rich standard library provides robust tools for networking, cryptography, and more.
Why is it used in Cosmos SDK?
The Cosmos SDK is built entirely in Go. Its performance and concurrency features are critical for handling the demands of a decentralized network, processing transactions, and achieving consensus efficiently.
Clone Repository
Clone the official BuyCex Infinity Chain repository from GitHub.
cd $HOME
git clone https://github.com/cosvmlabs/buycex-chain.git
cd buycex-chain
Checkout Version
Warning: Live Version Unavailable
The following version v1.0.0 is a fallback from the Chain Registry and may be outdated.
We strongly recommend verifying the correct version yourself using the method below before proceeding.
How to Find the Current Live Version
Since we couldn't automatically verify the live version, you can do it yourself with one of the methods below. Choose a healthy RPC from the "Endpoints" tab to use in the examples.
Method 1: With a Web Browser (Easy)
Paste the RPC address into your browser's address bar and add /abci_info to the end. For example:
https://some-rpc.com/abci_info
Method 2: With the Command Line (Advanced)
Use the following curl command in your terminal. It performs an HTTP GET request and filters the JSON to get the version.
curl -s -X GET "RPC_URL/abci_info" | jq -r .result.response.version
In both cases, look for the "version" field in the JSON response. This is the version you should use for the installation steps below.
git checkout v1.0.0
Build Binary
Compile the binary from source. This may take several minutes.
make install
Verify Installation
This command will confirm the version you have installed.
bcxd version
What is a Binary?
A binary is the executable program that runs the blockchain node. It's the result of compiling the human-readable source code (written in Go) into machine code that the server can execute directly.
Why Compile from Source?
- Security: Compiling yourself ensures the code hasn't been tampered with and comes directly from the official repository.
- Compatibility: It guarantees the binary is optimized for your specific server architecture.
- Trust: It's a core principle of decentralization—don't trust, verify. Building from source is part of that verification.
Version Importance
Using the correct, recommended version is critical. Mismatched versions can lead to consensus failures, inability to sync with the network, or security vulnerabilities.
make install command often runs a series of build scripts defined by the developers to ensure the binary is compiled with the correct settings and dependencies.
Set Moniker
Define your moniker (node name). This name will appear in block explorers. Do not use spaces.
MONIKER="__MONIKER__"
Initialize Node
Initialize your node with the chain-id bcx_323-1. This creates the default configuration directory at $HOME/.bcxd.
bcxd init $MONIKER --chain-id bcx_323-1
Download Genesis File
The genesis file is the "birth certificate" of the blockchain, defining the initial state of the network.
curl -Ls https://buycex.net/genesis.json > $HOME/.bcxd/config/genesis.json
Configure Network Settings
Add seeds/peers to help your node discover other participants on the network.
Set Minimum Gas Price
Configure the minimum gas price to prevent spam transactions.
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0\"|" $HOME/.bcxd/config/app.toml
Configuration Explained
This stage sets up the foundational files that define your node's identity, security, and connection to the network.
Key Files Modified:
genesis.json: Contains the initial validator set, account balances, and chain parameters. Every node must have the identical genesis file to join the same network.config.toml: Tendermint config. Governs networking (P2P ports, seeds, peers).app.toml: Application config. Manages settings like gas prices, pruning, and API servers.
Seeds vs. Peers
Seeds are nodes that provide a list of other peers on the network. Your node connects to a seed, gets the list, and then disconnects.
Persistent Peers are nodes your node will always try to maintain a connection with, ensuring stable, long-term connectivity.
bcxd config .... This is useful for convenience but doesn't affect the node service itself.
Pruning Settings
Configure pruning to manage disk space. Select a strategy from the form above to see the corresponding command.
PRUNING="custom"
PRUNING_KEEP_RECENT="__PRUNING_KEEP_RECENT__"
PRUNING_INTERVAL="__PRUNING_INTERVAL__"
sed -i -e 's|^pruning *=.*|pruning = "'$PRUNING'"|' \
-e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "'$PRUNING_KEEP_RECENT'"|' \
-e 's|^pruning-interval *=.*|pruning-interval = "'$PRUNING_INTERVAL'"|' \
$HOME/.bcxd/config/app.toml
Indexer Settings
Disable the transaction indexer to save resources, or enable it if you need to query transaction history.
# To disable the indexer
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.bcxd/config/config.toml
# To enable the indexer
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.bcxd/config/config.toml
Custom Ports Configuration
Change default ports if you're running multiple nodes on the same machine. Example uses prefix '16'.
PORT_PREFIX=__PORT_PREFIX__
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${PORT_PREFIX}658\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${PORT_PREFIX}657\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${PORT_PREFIX}060\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${PORT_PREFIX}656\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${PORT_PREFIX}660\"%" $HOME/.bcxd/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${PORT_PREFIX}317\"%; s%^address = \":8080\"%address = \":${PORT_PREFIX}080\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${PORT_PREFIX}090\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${PORT_PREFIX}091\"%; s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:${PORT_PREFIX}545\"%; s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:${PORT_PREFIX}546\"%" $HOME/.bcxd/config/app.toml
Advanced Settings Explained
These settings help you optimize your node for specific use cases, such as reducing hardware costs or running multiple nodes.
What is Pruning?
Pruning is the process of deleting old blockchain data to save disk space. A full, unpruned archive node can take up terabytes of space. Pruning keeps your node lightweight.
- Default: A safe balance for most users.
- Nothing: Creates an archive node (requires huge disk space).
- Everything: Aggressive pruning, minimum disk space.
What is the Indexer?
The indexer catalogues all transactions, allowing you to query them. Disabling it is a major performance boost.
- Disable (`null`): Recommended for validators who don't need to query transaction history. Saves significant CPU and disk resources.
- Enable (`kv`): Required for public RPC endpoints, block explorers, or if you need to look up historical transaction data.
Create Systemd Service File
Create a service file to tell the system how to run the node. This ensures it can run in the background and restart automatically.
sudo tee /etc/systemd/system/bcxd.service > /dev/null <<EOF
[Unit]
Description=BuyCex Infinity Chain Node
After=network.target
[Service]
Type=simple
User=$USER
ExecStart=$(which bcxd) start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Manage the Service
Enable the service to start on boot and then start it manually. Use the other commands to check status or view logs.
# Enable service to start automatically on boot
sudo systemctl enable bcxd
# Reload the systemd daemon to recognize the new service
sudo systemctl daemon-reload
# Start the node service
sudo systemctl start bcxd
# View Only logs in real-time
journalctl -u bcxd -f --no-hostname -o cat
# Start the node service + logs in real-time
sudo systemctl start bcxd && sudo journalctl -u bcxd -f --no-hostname -o cat
What is Systemd?
systemd is the standard service manager in modern Linux. It's responsible for starting, stopping, and monitoring background processes (daemons), like your blockchain node.
Why Use a Service?
- Automation: Automatically starts your node when the server boots.
- Resilience: Automatically restarts the node if it crashes.
- Management: Provides simple commands (
start,stop,status) to manage the process. - Logging: Centralizes log collection, which you can view with
journalctl.
Common Commands
sudo systemctl stop bcxd
sudo systemctl start bcxd
sudo systemctl restart bcxd
sudo systemctl status bcxd
systemd service is essential for any production validator to ensure maximum uptime.
Step 1: Create or Recover Wallet
Create a new wallet to store your tokens or recover an existing one using your mnemonic phrase.
# Create a new wallet
bcxd keys add __WALLET_NAME__
# Recover an existing wallet
bcxd keys add __WALLET_NAME__ --recover
Step 2: Synchronize your node
Now is the time to synchronize !
You have two options available: Snapshot or State Sync. Please follow the link above to complete the process, then return to this page
Before creating a validator, ensure your node is fully synchronized with the network. The result of this command must be false.
bcxd status 2>&1 | jq .SyncInfo.catching_up
catching_up is false.
Creating a validator while unsynced will result in your validator being "jailed" (inactivated and penalized).
Step 3: Create Validator
Once your wallet is funded and your node is fully synced, run this command to put your validator on the blockchain.
bcxd tx staking create-validator \
--amount="__DELEGATION_AMOUNT__" \
--pubkey=$(bcxd tendermint show-validator) \
--moniker="__MONIKER__" \
--identity="__KEYBASE_ID__" \
--website="__WEBSITE__" \
--details="__DETAILS__" \
--from=__WALLET_NAME__ \
--chain-id="bcx_323-1" \
--commission-rate="0.10" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.01" \
--min-self-delegation="1" \
--gas-prices="0" \
--gas-adjustment=1.5 \
--gas=auto \
-y
Wallet & Validator Concepts
This is the final and most critical step, where you transition from running a simple node to actively participating in the network's consensus.
Your Wallet
The wallet you create holds the keys to your funds. The mnemonic phrase (12 or 24 words) is the master key to this wallet. Losing it means losing access to your funds forever.
The Validator
A validator is a special type of node that proposes and votes on new blocks. By staking tokens, validators earn rewards for securing the network. They also risk losing a portion of their stake (slashing) if they misbehave (e.g., go offline for too long).
Synchronization is Key
A node must be fully caught up with the latest block before it can become a validator. If it's still syncing, it cannot participate in consensus and will be jailed by the network as a protective measure.
Cosmos SDK Commands Reference
Comprehensive command reference for BuyCex Infinity Chain node operators and validators.
Check Balance
Query the balance of a wallet address.
bcxd q bank balances __WALLET_ADDRESS__
Check Sync Status
Verify if your node is synchronized. Must return false when synced.
bcxd status 2>&1 | jq .SyncInfo.catching_up
View Logs
Monitor your node's logs in real-time.
journalctl -u bcxd -f --no-hostname -o cat
Restart Service
Restart your node service.
sudo systemctl restart bcxd
Vote on Proposal
Vote YES on a governance proposal.
bcxd tx gov vote 1 yes --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Unjail Validator
Unjail your validator after downtime.
bcxd tx slashing unjail --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Withdraw All Rewards
Claim all staking rewards from all validators.
bcxd tx distribution withdraw-all-rewards --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Send Tokens
Transfer tokens to another address.
bcxd tx bank send __WALLET_ADDRESS__ __RECIPIENT_ADDRESS__ __DELEGATION_AMOUNT__ --chain-id bcx_323-1 --gas-prices 0 -y
Operator's Common Workflow
These commands represent the daily toolkit for node operators. They cover three main activities:
1. Node Monitoring
Keeping your node healthy is the top priority. You'll constantly use these commands to check its status: Check Sync Status ensures you're connected, View Logs helps you spot errors, and Restart Service is the first step to resolving many issues.
2. Validator Duties
As a validator, your core responsibilities are participating in governance (Vote on Proposal), maintaining uptime (Unjail Validator after downtime), and managing your earnings (Withdraw All Rewards).
3. Wallet Management
These are the fundamental commands for handling funds: Check Balance to view your assets and Send Tokens to transfer them.
Create New Wallet
Create a new wallet. Save the mnemonic securely!
bcxd keys add __WALLET_NAME__
Recover Wallet
Restore a wallet from mnemonic phrase.
bcxd keys add __WALLET_NAME__ --recover
Create Multisig Wallet
Create a multisig wallet requiring multiple signatures.
bcxd keys add multisig_name --multisig key1,key2,key3 --multisig-threshold 2
List All Wallets
Show all wallets stored in keyring.
bcxd keys list
Show Wallet Address
Display the address of a wallet.
bcxd keys show __WALLET_NAME__ -a
Show Validator Address
Display the validator operator address.
bcxd keys show __WALLET_NAME__ --bech val -a
Show Public Key
Display the public key of a wallet.
bcxd keys show __WALLET_NAME__ -p
Export Private Key
Export private key in hex format. Use with extreme caution!
bcxd keys export __WALLET_NAME__ --unarmored-hex --unsafe
Delete Wallet
Permanently delete a wallet from keyring.
bcxd keys delete __WALLET_NAME__
Key Management Concepts
These commands interact with the keyring, a secure database for your private keys.
The Mnemonic is Your Master Key
When you create a wallet, you get a 12 or 24-word mnemonic phrase. This is the only backup of your private key. Never store it on your server. If you lose it, you lose your funds forever.
What is the Keyring?
The keyring is the storage backend for your keys. By default (--keyring-backend test), it's a simple, unencrypted file, which is convenient for testing but not secure for production. For validators, using the os backend is highly recommended as it leverages the server's secure credential storage.
Bech32 Address Types
A single key pair has multiple address representations, identified by their "bech32" prefix. The command show --bech val demonstrates this by converting the standard address into its validator operator (valoper) equivalent.
export and delete commands are extremely dangerous. export will expose your private key on the screen. Use these commands with extreme caution.
Send Tokens
Transfer tokens between addresses.
bcxd tx bank send __WALLET_ADDRESS__ __RECIPIENT_ADDRESS__ __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Send with Fee Granter
Send tokens using a fee grant.
bcxd tx bank send __WALLET_ADDRESS__ RECIPIENT __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --fee-account __GRANTER_ADDRESS__ --chain-id bcx_323-1 -y
Query Balance
Check the balance of an address.
bcxd query bank balances __WALLET_ADDRESS__
Query Spendable Balances
Check balances available for spending (excluding locked tokens).
bcxd query bank spendable-balances __WALLET_ADDRESS__
Query Total Supply
View the total token supply of the chain.
bcxd query bank total
Query Supply by Denom
Check total supply of a specific denomination.
bcxd query bank total --denom
The "Bank" Module
The Bank module is the core of any Cosmos SDK chain, responsible for all token transfers and balance tracking.
Transactions (tx) vs. Queries (query)
tx commands, like tx bank send, are write operations. They change the state of the blockchain, require a signature from a private key, and consume gas (fees).
query commands, like query bank balances, are read-only operations. They do not change the state, require no signature, and are free to use.
What is Fee Grant?
Fee Grant is a feature allowing one account to pay for another account's transaction fees. This is useful for onboarding new users who may not have tokens to pay for their first transactions. Learn more in the Feegrant tab .
Total Supply vs. Balance
Total Supply refers to the total amount of a token that exists on the entire blockchain. Balance refers to the amount of a token held by a single, specific address.
Create Validator
Create your validator. Only do this when fully synced!
bcxd tx staking create-validator \
--amount=__DELEGATION_AMOUNT__ \
--pubkey=$(bcxd tendermint show-validator) \
--moniker="__MONIKER__" \
--identity="__KEYBASE_ID__" \
--website="__WEBSITE__" \
--details="__DETAILS__" \
--chain-id=bcx_323-1 \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--from=__WALLET_NAME__ \
--gas-prices=0 \
--gas-adjustment=1.5 \
--gas=auto \
-y
Edit Validator
Update validator information.
bcxd tx staking edit-validator \
--new-moniker="NEW_MONIKER" \
--identity=YOUR_KEYBASE_ID \
--details="New description" \
--chain-id=bcx_323-1 \
--commission-rate=0.1 \
--from=__WALLET_NAME__ \
--gas-prices=0 \
-y
Delegate Tokens
Delegate tokens to a validator.
bcxd tx staking delegate __VALOPER_ADDRESS__ __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Unbond Tokens
Unbond (unstake) tokens from a validator.
bcxd tx staking unbond __VALOPER_ADDRESS__ __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Redelegate Tokens
Move delegation from one validator to another.
bcxd tx staking redelegate SRC_VALOPER DST_VALOPER __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
List All Validators
Show all validators on the network.
bcxd query staking validators
Query Validator Info
Get detailed information about a specific validator.
bcxd query staking validator __VALOPER_ADDRESS__
List Active Validators (Sorted)
Show bonded validators sorted by voting power.
bcxd q staking validators -oj --limit=3000 | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")' | jq -r '(.tokens|tonumber/pow(10; 6)|floor|tostring) + " \t " + .description.moniker' | sort -gr | nl
Query Validator Signing Info
Check your validator's signing information and missed blocks.
bcxd query slashing signing-info $(bcxd tendermint show-validator)
Proof-of-Stake Concepts
The Staking module is the heart of the Proof-of-Stake consensus. It manages validators, delegations, and the overall security of the network.
Validators vs. Delegators
Validators operate the nodes that run the blockchain. They are responsible for proposing and voting on new blocks.
Delegators are token holders who "stake" their tokens to a validator. They share in the staking rewards and help secure the network without running a node themselves.
The Delegation Lifecycle
- Delegate: Lock your tokens to a validator to start earning rewards.
- Redelegate: Instantly move your staked tokens from one validator to another without waiting for the unbonding period.
- Unbond: Start the process of unstaking your tokens. This initiates an "unbonding period" (e.g., 21 days) during which your tokens earn no rewards and cannot be transferred.
create-validator, you MUST be fully synced. Check with bcxd status. Creating a validator while unsynced will get you jailed.
Withdraw Rewards from Validator
Claim rewards from a specific validator.
bcxd tx distribution withdraw-rewards __VALOPER_ADDRESS__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Withdraw Rewards + Commission
Claim rewards and commission (for validators).
bcxd tx distribution withdraw-rewards __VALOPER_ADDRESS__ --from __WALLET_NAME__ --commission --chain-id bcx_323-1 --gas-prices 0 -y
Withdraw All Rewards
Claim all staking rewards from all validators at once.
bcxd tx distribution withdraw-all-rewards --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Query Rewards
Check pending rewards for an address.
bcxd query distribution rewards __WALLET_ADDRESS__
Query Commission
Check validator commission earnings.
bcxd query distribution commission __VALOPER_ADDRESS__
Query Community Pool
View the community pool balance.
bcxd query distribution community-pool
Change Withdraw Address
Set a different address to receive rewards.
bcxd tx distribution set-withdraw-addr NEW_ADDRESS --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
How Rewards Work
The "Distribution" module handles the allocation of staking rewards from two main sources: block inflation and transaction fees.
Sources of Rewards
- Block Inflation: New tokens created by the protocol with each block to incentivize validators and delegators for securing the network.
- Transaction Fees: Fees paid by users for every transaction, which are distributed to the validators who include those transactions in a block.
Withdraw vs. Compound
Rewards accumulate but are not automatically added to your stake. You must manually claim them using a withdraw command. To maximize your earnings, you can "compound" by withdrawing your rewards and then delegating them back to a validator.
The Community Pool
A portion of all rewards is sent to the Community Pool, a treasury that can be used to fund projects and initiatives that benefit the ecosystem. Spending from this pool is controlled by governance.
Submit Text Proposal
Create a governance proposal (legacy format).
bcxd tx gov submit-proposal \
--title="Your Proposal Title" \
--description="Detailed description of your proposal" \
--type="Text" \
--deposit=__DELEGATION_AMOUNT__ \
--from __WALLET_NAME__ \
--chain-id bcx_323-1 \
--gas-prices 0 \
-y
Deposit on Proposal
Add deposit to reach minimum deposit for voting period.
bcxd tx gov deposit 1 __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Vote YES
Vote in favor of a proposal.
bcxd tx gov vote 1 yes --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Vote NO
Vote against a proposal.
bcxd tx gov vote 1 no --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Vote NO_WITH_VETO
Vote against with veto (burns deposit if >33.4% vote this way).
bcxd tx gov vote 1 no_with_veto --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Vote ABSTAIN
Abstain from voting (counts toward quorum but not toward yes/no).
bcxd tx gov vote 1 abstain --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
List All Proposals
Show all governance proposals.
bcxd query gov proposals
Query Proposal Details
Get detailed information about a specific proposal.
bcxd query gov proposal 1
Query Votes
See all votes on a proposal.
bcxd query gov votes 1
Query Tally
View current vote tally for a proposal.
bcxd query gov tally 1
On-Chain Governance
The Governance module is the blockchain's democratic system, allowing staked token holders to decide the future of the protocol.
The Proposal Lifecycle
- Deposit Period: A proposal is submitted. It must collect a minimum deposit (
min_deposit) from the community to enter the voting period. - Voting Period: Once the deposit is met, a voting window (e.g., 14 days) opens. Only staked tokens can vote, and voting power is proportional to the amount staked.
- Tallying: For a proposal to pass, it must meet quorum (minimum participation) and a threshold of "Yes" votes.
The 4 Voting Options
- Yes: You approve the proposal.
- No: You disapprove the proposal.
- NoWithVeto: A powerful "No". If the Veto threshold (e.g., 33.4%) is reached, the proposal is rejected and the depositors lose their funds (they are burned). This prevents spam or harmful proposals.
- Abstain: You contribute to the voting quorum but do not influence the Yes/No outcome.
Unjail Validator
Unjail your validator after being jailed for downtime.
bcxd tx slashing unjail --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Query Signing Info
Check validator signing information and jail status.
bcxd query slashing signing-info $(bcxd tendermint show-validator)
Query All Signing Infos
List signing info for all validators.
bcxd query slashing signing-infos
Query Slashing Params
View slashing parameters (downtime threshold, slash fractions, etc.).
bcxd query slashing params
Slashing & Jailing Explained
The Slashing module is the enforcement mechanism of Proof-of-Stake, punishing validators for misbehavior to ensure network security.
Jailing vs. Slashing
Jailing: A temporary penalty, typically for being offline (downtime). The validator is removed from the active set and earns no rewards. They must send an unjail transaction to become active again.
Slashing: A severe, permanent penalty for serious offenses like double-signing. A percentage of the validator's (and their delegators') stake is destroyed.
Common Offenses
- Downtime: Missing too many blocks in a row. This leads to jailing.
- Double Signing: Signing two different blocks at the same height. This is the most serious offense and leads to slashing.
unjail: This command can only be submitted after the validator's minimum jailing period has passed. It's used to signal that the validator is back online and ready to participate in consensus.
Grant Basic Allowance
Grant fee allowance to another address to pay for their transactions.
bcxd tx feegrant grant __GRANTER_ADDRESS__ GRANTEE_ADDRESS --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Grant with Spending Limit
Grant allowance with a maximum spending limit.
bcxd tx feegrant grant GRANTER GRANTEE --spend-limit __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Revoke Allowance
Revoke a previously granted fee allowance.
bcxd tx feegrant revoke GRANTER GRANTEE --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Query Allowance
Check if an allowance exists between granter and grantee.
bcxd query feegrant grant GRANTER GRANTEE
Query All Allowances (Grantee)
List all allowances granted to a grantee.
bcxd query feegrant grants-by-grantee GRANTEE_ADDRESS
What is Feegrant?
Feegrant is a module that allows one account (the "granter") to pay the transaction fees for another account (the "grantee").
Key Roles
- Granter: The account that pays the fees.
- Grantee: The account whose fees are being paid.
Common Use Cases
Onboarding Users: A project can grant a small fee allowance to new users, allowing them to start using the application without needing to acquire tokens first.
Automated Services: A user can grant a fee allowance to a "bot" account to perform automated tasks like compounding staking rewards on their behalf.
--spend-limit flag when creating a feegrant. This ensures the grantee cannot drain the granter's wallet by broadcasting an unlimited number of transactions.
Grant Generic Authorization
Grant authorization to execute transactions on your behalf.
bcxd tx authz grant GRANTEE_ADDRESS generic --msg-type /cosmos.bank.v1beta1.MsgSend --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Grant Send Authorization
Allow grantee to send tokens on your behalf.
bcxd tx authz grant GRANTEE send --spend-limit __DELEGATION_AMOUNT__ --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Grant Delegate Authorization
Allow grantee to delegate tokens on your behalf.
bcxd tx authz grant GRANTEE delegate --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Execute Authorized Transaction
Execute a transaction using granted authorization.
bcxd tx authz exec tx.json --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Revoke Authorization
Revoke a previously granted authorization.
bcxd tx authz revoke GRANTEE /cosmos.bank.v1beta1.MsgSend --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Query Grants
List all authorizations for a granter/grantee pair.
bcxd query authz grants GRANTER GRANTEE
What is Authz?
The "Authorization" (Authz) module allows one account (the "granter") to grant another account (the "grantee") the permission to execute specific transactions on its behalf.
Authz vs. Feegrant
Feegrant: "I will pay the gas fees for your transactions."
Authz: "You can execute transactions as if you were me, using my funds and permissions."
Common Use Case: Hot & Cold Wallets
A secure "cold" wallet holding a large amount of tokens can grant authorization to a "hot" wallet (used for daily operations) to perform only specific actions, like staking or voting. The hot wallet can't transfer the funds, minimizing risk if it's compromised.
--msg-type) that are absolutely necessary.
Create Group
Create a group for multi-party governance.
bcxd tx group create-group ADMIN_ADDRESS "metadata" members.json --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Create Group Policy
Create a decision policy for the group.
bcxd tx group create-group-policy ADMIN GROUP_ID "metadata" policy.json --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Submit Group Proposal
Submit a proposal for group voting.
bcxd tx group submit-proposal GROUP_POLICY_ADDRESS proposers.json "metadata" proposal.json --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Vote on Group Proposal
Cast your vote on a group proposal.
bcxd tx group vote PROPOSAL_ID VOTER yes "metadata" --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Execute Group Proposal
Execute a passed group proposal.
bcxd tx group exec PROPOSAL_ID --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
On-Chain Multisig & DAOs
The "Group" module is a powerful tool for creating and managing on-chain multi-signature accounts and Decentralized Autonomous Organizations (DAOs).
Key Concepts
- Group: A collection of member accounts, each with a defined voting weight.
- Group Policy: The rules of the group, defining the voting threshold required to pass a proposal (e.g., "more than 50% of the total weight must vote YES").
- Proposal: An on-chain action (like a `MsgSend` transaction) that members of the group can vote on.
Main Use Case: Flexible Multisig
This module allows you to create a shared treasury where, for example, 3 out of 5 members must approve any spending. Unlike traditional multisigs, the group's membership and policies can be updated over time through its own proposal system, offering much greater flexibility.
members.json, policy.json) to define the complex parameters for group creation and proposals.
Create Vesting Account
Create a continuous vesting account.
bcxd tx vesting create-vesting-account TO_ADDRESS __DELEGATION_AMOUNT__ END_TIME --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Create Delayed Vesting Account
Create an account with delayed vesting (cliff).
bcxd tx vesting create-delayed-vesting-account TO_ADDRESS __DELEGATION_AMOUNT__ END_TIME --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Create Periodic Vesting Account
Create an account with periodic vesting schedule.
bcxd tx vesting create-periodic-vesting-account TO_ADDRESS START_TIME periods.json --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
What is Vesting?
Vesting is a process of locking tokens and releasing them over a predetermined schedule. It's a key tool for managing a project's tokenomics.
Primary Use Case
Vesting is commonly used to distribute tokens to team members and early investors. It prevents large token holders from selling all their tokens at once, ensuring long-term alignment with the project's success.
Vesting Types
- Continuous: Tokens unlock linearly over time.
- Delayed (Cliff): All tokens unlock at once on a specific date.
- Periodic: Tokens unlock in portions at regular intervals.
Query Current Upgrade Plan
Check if there's a scheduled upgrade.
bcxd query upgrade plan
Query Applied Upgrades
List all upgrades that have been applied.
bcxd query upgrade applied
Query Module Versions
Check versions of all modules.
bcxd query upgrade module_versions
On-Chain Upgrades
The Upgrade module facilitates on-chain coordination of software upgrades. The blockchain itself dictates the exact moment of the upgrade via a governance proposal.
The Upgrade Process
- A governance proposal defines an upgrade name and a target block height.
- If passed, validators have until that block height to place the new binary in the correct location.
- The chain automatically halts at the target block.
- Validators restart their nodes with the new binary, and the chain resumes.
The Role of Cosmovisor
While this module provides the on-chain signal, the Cosmovisor tool automates the server-side process (stopping the node, switching binaries, and restarting). It is the standard tool for managing upgrades.
query upgrade plan command is essential. It allows you to see upcoming upgrades and prepare your node well in advance.
Submit Evidence
Submit evidence of misbehavior.
bcxd tx evidence EVIDENCE_FILE --from __WALLET_NAME__ --chain-id bcx_323-1 --gas-prices 0 -y
Query All Evidence
List all submitted evidence.
bcxd query evidence
What is the Evidence Module?
The Evidence module provides a way to punish validators for serious offenses (like double-signing) that are discovered after the fact.
How it Works
Normally, misbehavior is caught and punished by the consensus mechanism in real-time. However, this module acts as a "safety net". If a validator commits a serious offense and then unbonds before being punished, anyone can submit evidence of that past offense to the chain.
The Consequence
If the submitted evidence is valid, the validator is retroactively slashed, ensuring that no one can escape the consequences of threatening the network's integrity.
Add Genesis Account
Add an account to the genesis file during chain initialization.
bcxd add-genesis-account __WALLET_ADDRESS__ __DELEGATION_AMOUNT__
Create Gentx
Create a genesis transaction for an initial validator.
bcxd gentx __WALLET_NAME__ __DELEGATION_AMOUNT__ --chain-id bcx_323-1
Collect Gentxs
Collect all genesis transactions to create the final genesis file.
bcxd collect-gentxs
Validate Genesis
Validate the final genesis file before launch.
bcxd validate-genesis
Export State
Export the current chain state to a new genesis file.
bcxd export > exported_genesis.json
Blockchain Launch Commands
These commands are used exclusively for the coordinated launch of a new blockchain, often called a "genesis ceremony".
The Launch Process
- Each initial validator creates their "genesis transaction" using
gentxand sends it to a coordinator. - The coordinator gathers all these transactions and uses
collect-gentxsto merge them into the finalgenesis.jsonfile. - Everyone uses
validate-genesisto confirm the final file is correct before starting their nodes.
What is `export` for?
The export command is different. It takes a snapshot of an existing blockchain's state at a certain height and creates a new genesis file from it. This is useful for chain upgrades or for creating a new testnet based on a mainnet state.
Query Account
Get account information.
bcxd query account __WALLET_ADDRESS__
Query Transaction
Look up a transaction by hash.
bcxd query tx TX_HASH
Search Transactions by Events
Find transactions matching specific events.
bcxd query txs --events 'message.sender=__WALLET_ADDRESS__'
Query Block
Get block information at specific height.
bcxd query block 1000
Encode Transaction
Encode a transaction to Amino binary format.
bcxd tx encode tx.json
Decode Transaction
Decode a transaction from Amino binary format.
bcxd tx decode ENCODED_TX
General Blockchain Interaction
These are fundamental commands for reading data from the blockchain and handling raw transaction data.
Finding On-Chain Information
query tx [hash] is the command-line equivalent of a block explorer, allowing you to verify transaction details.
query txs --events is a powerful search tool. It lets you find past transactions based on attributes, like all transfers from a specific address. Note: This requires the node's indexer to be enabled .
Offline & Advanced Signing
The encode and decode commands are advanced tools for offline signing. The typical workflow is:
- Create a transaction as a JSON file.
encodeit into a binary string.- Transfer this string to a secure, offline machine for signing.
- Broadcast the signed transaction from an online machine.
Start Node
Start the node daemon in the foreground (for debugging).
bcxd start
Query Node Status
Get comprehensive node status information.
bcxd status
Check Sync Status
Verify if node is fully synchronized.
bcxd status 2>&1 | jq .SyncInfo.catching_up
Show Validator Public Key
Display the validator consensus public key.
bcxd tendermint show-validator
Show Node ID
Display the node's unique identifier.
bcxd tendermint show-node-id
Show Validator Address
Display validator consensus address.
bcxd tendermint show-address
Check Binary Version
Display the binary version.
bcxd version
Stop Service
Stop the node service.
sudo systemctl stop bcxd
View Logs
Monitor node logs in real-time.
journalctl -u bcxd -f --no-hostname -o cat
Managing the Node Process
These commands allow you to interact directly with the node's process, check its health, and retrieve its network identities.
start vs. systemctl start
bcxd start runs the node in the foreground, attached to your terminal. It's useful for debugging but will stop if you close your session.
sudo systemctl start ... runs the node as a background service . This is the correct method for production environments.
A Validator's Three Identities
- Node ID: The P2P network address. Used by other nodes to find and connect to yours.
- Validator Public Key: The consensus key. Used to sign blocks and participate in voting.
- Consensus Address: A shorter address derived from the public key, used for on-chain identification.
status and journalctl commands are your most important tools for daily health checks of your node.
Unsafe Reset All
Reset blockchain data (keeps node_key and priv_validator_key).
bcxd tendermint unsafe-reset-all --home $HOME/.bcxd
Reset Keeping Addrbook
Reset data but keep addrbook for faster peer discovery.
bcxd tendermint unsafe-reset-all --home $HOME/.bcxd --keep-addr-book
Tendermint Version
Check Tendermint/CometBFT version.
bcxd tendermint version
Show Network Info
Display information about connected peers.
curl -s localhost:26657/net_info | jq
Rollback Last Block
Rollback state to the previous block height (use with caution!).
bcxd rollback
Interacting with the Consensus Engine
These commands interact directly with Tendermint/CometBFT, the underlying consensus and networking engine of the blockchain.
The `unsafe-reset-all` Command
This command deletes all blockchain data from your node. Its primary use is to start fresh before syncing from a snapshot or state sync .
The `rollback` Command
This advanced command reverts the blockchain state by one block. It's a debugging tool and should only be used in emergencies, as improper use can corrupt your node's database.
unsafe-reset-all on a validator node, ALWAYS back up your priv_validator_key.json file. Failure to do so can lead to permanent loss of your validator.
Debug Address
Convert between address formats.
bcxd debug addr __WALLET_ADDRESS__
Debug Public Key
Convert and display public key information.
bcxd debug pubkey PUBKEY
Backup Validator Key
Backup your validator private key. Keep it secure!
cp $HOME/.bcxd/config/priv_validator_key.json $HOME/.bcxd/priv_validator_key.json.backup
Backup Node Key
Backup your node key.
cp $HOME/.bcxd/config/node_key.json $HOME/.bcxd/node_key.json.backup
Debugging & Key Backups
These commands are for advanced troubleshooting and essential maintenance tasks like backing up critical validator files.
The `debug addr` Command
This utility allows you to convert a given address into all its other Bech32 formats (account, validator, consensus). It's very useful for finding the account address that controls a specific validator.
Critical Validator Files
priv_validator_key.json is the most important file for a validator. It contains the private key used to sign blocks. If you lose this file, you lose your validator. If it is stolen, the attacker can cause you to be slashed for double-signing.
node_key.json contains the key that determines your node's ID on the P2P network. Losing it is less critical, but your node's ID will change.
Get Your Peer String
Generate your node's peer connection string.
echo $(bcxd tendermint show-node-id)'@'$(curl -s ifconfig.me)':'$(cat $HOME/.bcxd/config/config.toml | sed -n '/Address to listen for incoming connection/{n;p;}' | sed 's/.*://; s/".*//')
Get Peers from RPC
Fetch live peers from the network.
curl -sS https://endpoint.buycex.net/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}'
Test RPC Connection
Verify RPC endpoint is responding.
curl -s localhost:26657/status | jq
Configure UFW Firewall
Basic firewall configuration for node.
sudo ufw allow 22/tcp
sudo ufw allow 26656/tcp
sudo ufw enable
Complete Node Removal
Completely remove the node. BACKUP YOUR KEYS FIRST!
sudo systemctl stop bcxdsudo systemctl disable bcxdsudo rm /etc/systemd/system/bcxd.service
sudo systemctl daemon-reload
rm -f $(which bcxd)
rm -rf $HOME/.bcxdrm -rf ~/buycex-chain
Server & Node Utilities
This is a collection of useful scripts and commands for server administration and network management.
Sharing Your Peer Identity
The Get Your Peer String command is a handy script that combines your unique Node ID with your server's public IP to create a connection string. You can share this with other node operators to help strengthen the P2P network.
Basic Firewall Setup
UFW (Uncomplicated Firewall) is a standard firewall for Ubuntu. The example commands provide a minimal secure setup: it allows SSH access (port 22) for you to manage your server and the default P2P port (26656) for the node to communicate, while blocking everything else.
Complete Node Removal script is irreversible. It deletes the service, the binary, and all blockchain data. Before running it, ensure you have backed up your mnemonic phrases and your priv_validator_key.json.
params module is deprecated in newer SDK versions. These commands may not work on all chains.
Query Params Subspaces
List all parameter subspaces.
bcxd query params subspaces
Query Mint Params
View minting parameters.
bcxd query mint params
Query Inflation
Check current inflation rate.
bcxd query mint inflation
Query Annual Provisions
View annual token provisions.
bcxd query mint annual-provisions
Inflation & Chain Parameters
These commands allow you to inspect the modules responsible for token inflation and global chain parameters.
The "Mint" Module
The Mint module is responsible for creating new tokens in each block, a process known as inflation. These newly minted tokens are then passed to the Distribution module to be paid out as staking rewards.
- Inflation: The current annual rate at which new tokens are being created.
- Annual Provisions: The total number of tokens that will be minted over the next year at the current inflation rate.
The (Deprecated) "Params" Module
The params module was a centralized hub for managing all chain parameters. It has been deprecated in modern versions of the Cosmos SDK. Now, each module (e.g., staking, gov) manages its own parameters, which can be modified via specific governance proposals. This is why query params commands may no longer work.
Query Balance via gRPC
Query account balance using gRPC.
grpcurl -plaintext -d '{"address":"__WALLET_ADDRESS__"}' localhost:9090 cosmos.bank.v1beta1.Query/AllBalances
Query Validator via gRPC
Get validator info via gRPC.
grpcurl -plaintext -d '{"validator_addr":"__VALOPER_ADDRESS__"}' localhost:9090 cosmos.staking.v1beta1.Query/Validator
Query Proposals via gRPC
List governance proposals via gRPC.
grpcurl -plaintext localhost:9090 cosmos.gov.v1beta1.Query/Proposals
List gRPC Services
Show all available gRPC services.
grpcurl -plaintext localhost:9090 list
List Service Methods
Show methods for a specific service.
grpcurl -plaintext localhost:9090 list cosmos.bank.v1beta1.Query
What is gRPC?
gRPC is a modern, high-performance framework for making remote procedure calls. It's designed for efficiency and is ideal for developers building applications that require fast and reliable data streams from the blockchain.
gRPC vs. REST
gRPC is generally much faster and more efficient than REST because it uses a binary protocol (Protobuf) instead of text-based JSON. It is the preferred method for high-throughput applications.
The `grpcurl` Tool
grpcurl is a command-line tool that lets you interact with gRPC servers, much like curl does for HTTP APIs. It's an essential tool for testing and debugging gRPC endpoints.
Query Node Info via REST
Get node information using REST API.
curl -s https://api.buycex.net/cosmos/base/tendermint/v1beta1/node_info | jq
Query Balances via REST
Check account balances via REST API.
curl -s https://api.buycex.net/cosmos/bank/v1beta1/balances/__WALLET_ADDRESS__ | jq
Query Validator via REST
Get validator info via REST API.
curl -s https://api.buycex.net/cosmos/staking/v1beta1/validators/__VALOPER_ADDRESS__ | jq
Query Proposals via REST
List governance proposals via REST API.
curl -s https://api.buycex.net/cosmos/gov/v1beta1/proposals | jq
Query Supply via REST
Check total token supply via REST API.
curl -s https://api.buycex.net/cosmos/bank/v1beta1/supply | jq
What is the REST API?
The REST (or LCD) API provides a simple, standard HTTP interface for querying the blockchain. It's easy to use with tools like curl or directly in a web browser.
REST vs. RPC
The REST API is a user-friendly layer built on top of the node's core functionalities. The RPC interface is lower-level and more complex. For most simple data queries (balances, validators), REST is the easiest method.
Common Clients
Block explorers, wallets, and dashboards are the primary consumers of REST APIs, as it allows them to easily fetch and display on-chain data.
Network Configuration
Configure your node's network connectivity with seeds and persistent peers for BuyCex Infinity Chain.
What are Persistent Peers?
Persistent peers are nodes that your node will always try to maintain a connection with. Unlike regular peers that come and go, your node will actively attempt to reconnect to persistent peers if the connection is lost. This ensures stable connectivity to the network.
Fetch Live Peers via RPC
Query real-time connected peers directly from a network node using the /net_info RPC endpoint. This returns fresh, currently active peers instead of the static list from Chain Registry.
/net_info endpoint for security reasons (it exposes peer IPs). If the command returns an error or empty result, try another RPC or use your own node with localhost:26657.
Quick Test
First, check if the RPC exposes /net_info:
curl -s https://endpoint.buycex.net/net_info | jq '.result.peers | length'
If it returns a number → the endpoint is available. If null or error → endpoint is blocked.
Get All Connected Peers
Extract the full peer list in id@ip:port format:
curl -s https://endpoint.buycex.net/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"'
Using Your Own Node
If you have a running node, use localhost for guaranteed access:
curl -s localhost:26657/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr | split(":") | last)"'
No Persistent Peers
Note: After changing persistent peers, restart your node for the changes to take effect:
sudo systemctl restart bcxd
- For validators requiring stable connections
- When your node frequently loses peer connections
- For production nodes that need reliable uptime
Add Custom Peer
You can manually add a specific persistent peer.
CUSTOM_PEER="node_id@ip_address:port"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$CUSTOM_PEER\"|" $HOME/.bcxd/config/config.toml
View Current Peers
Check which persistent peers are configured in your node.
grep "^persistent_peers" $HOME/.bcxd/config/config.toml
Clear Peers
Remove all persistent peers from your configuration.
sed -i -e 's|^persistent_peers *=.*|persistent_peers = ""|' $HOME/.bcxd/config/config.toml
/net_info with the static list below for optimal connectivity. Live peers are verified online, while static peers provide fallback options.
What are Seeds?
Seed nodes are bootstrap nodes used for initial peer discovery. When your node starts, it contacts seed nodes to discover other peers on the network. Unlike persistent peers, connections to seed nodes are temporary - once your node has discovered enough peers, it disconnects from the seeds.
Seeds vs Persistent Peers
Understanding the difference between these two connectivity options.
| Feature | Seeds | Persistent Peers |
|---|---|---|
| Purpose | Initial peer discovery | Maintain stable connections |
| Connection | Temporary | Permanent |
| Use Case | Fresh node startup | Validators, production |
No Seeds Available
Note: After changing seeds, restart your node for the changes to take effect:
sudo systemctl restart bcxd
- When starting a fresh node without any known peers
- When your node can't find enough peers to connect to
- For initial network discovery (seeds are temporary connections)
Add Custom Seed
You can manually add a specific seed node.
CUSTOM_SEED="node_id@ip_address:port"
sed -i -e "s|^seeds *=.*|seeds = \"$CUSTOM_SEED\"|" $HOME/.bcxd/config/config.toml
View Current Seeds
Check which seed nodes are configured in your node.
grep "^seeds" $HOME/.bcxd/config/config.toml
Clear Seeds
Remove all seeds from your configuration.
sed -i -e 's|^seeds *=.*|seeds = ""|' $HOME/.bcxd/config/config.toml
Configuration Files
Essential configuration files for your BuyCex Infinity Chain node.
Download Genesis (using curl)
Download the official genesis file using curl.
curl -Ls https://buycex.net/genesis.json > $HOME/.bcxd/config/genesis.json
Download Genesis (using wget)
Alternative method using wget.
wget -O $HOME/.bcxd/config/genesis.json "https://buycex.net/genesis.json"
Validate Genesis File
Verify that your genesis file is valid and correctly formatted.
bcxd validate-genesis
Validate Genesis (Modern Syntax)
Alternative validation command for newer SDK versions.
bcxd genesis validate-genesis
What is the Genesis File?
The genesis file contains the initial state of the blockchain. It includes the initial token distribution, validator set, and chain parameters. Every node must have the correct genesis file to connect to the network.
Backup Your Addrbook
It's a good practice to backup your addrbook periodically, especially if you have good, stable peers.
cp $HOME/.bcxd/config/addrbook.json $HOME/.bcxd/config/addrbook.json.backup
Download directly one Addrbook
Replace by your URL to download the addrbook
curl -Ls YOUR_URL/addrbook.json > $HOME/.bcxd/config/addrbook.json.backup
Reset Addrbook
If you're having peer connection issues, you can reset your addrbook and let your node rebuild it from seeds.
rm $HOME/.bcxd/config/addrbook.json
sudo systemctl restart bcxd
What is the Addrbook?
The address book (addrbook.json) contains a list of known peers that your node has previously connected to. Using an up-to-date addrbook helps your node quickly find and connect to active peers when starting.
Fast Synchronization Methods
Skip syncing from genesis by using one of these fast synchronization methods for BuyCex Infinity Chain.
Using Snapshot (.lz4 compression)
Same optimized approach with lz4 compression (smaller file size, faster decompression). Download and verify first, then apply.
Step 1 - Prepare temporary directory
mkdir -p $HOME/snapshot_tmp
Step 2 - Check available disk space
df -h $HOME/snapshot_tmp
Step 3 - Set snapshot URL
Set the snapshot download URL. Replace with the latest URL from your snapshot provider.
SNAPSHOT="https://your-snapshot-provider.com/snapshot.lz4"
Step 4 - Download snapshot (node stays online)
wget -c $SNAPSHOT -O $HOME/snapshot_tmp/snapshot.lz4
Step 5 - Verify file size
ls -lah $HOME/snapshot_tmp/snapshot.lz4
Step 6 - Extract and verify content
mkdir -p $HOME/snapshot_tmp/extracted
lz4 -c -d $HOME/snapshot_tmp/snapshot.lz4 | tar -x -C $HOME/snapshot_tmp/extracted/
ls -lah $HOME/snapshot_tmp/extracted/
Step 7 - Backup validator state
cp $HOME/.bcxd/data/priv_validator_state.json $HOME/snapshot_tmp/priv_validator_state.json.backup
Step 8 - Stop node (downtime starts here)
sudo systemctl stop bcxd
Step 9 - Reset data
bcxd tendermint unsafe-reset-all --home $HOME/.bcxd --keep-addr-book
Step 10 - Move snapshot data into place
Check your extracted content from Step 6. Use the appropriate command depending on the snapshot structure.
# If extracted content contains a data/ folder:
mv $HOME/snapshot_tmp/extracted/data/* $HOME/.bcxd/data/
# If extracted content is flat (no data/ subfolder):
# mv $HOME/snapshot_tmp/extracted/* $HOME/.bcxd/data/
Step 11 - Restore validator state and cleanup
mv $HOME/snapshot_tmp/priv_validator_state.json.backup $HOME/.bcxd/data/priv_validator_state.json
rm -rf $HOME/snapshot_tmp
Step 12 - Start node and monitor logs
sudo systemctl start bcxd
sudo journalctl -u bcxd -f --no-hostname -o cat
Check Snapshot Information
Before downloading, check the snapshot's size and block height to ensure it's recent.
curl -sI $SNAPSHOT | grep -i content-length
Verify Snapshot Extraction
After extraction, verify that the data directory contains blockchain data.
ls -lah $HOME/.bcxd/data
What is a Snapshot?
A snapshot is a compressed backup of the blockchain data directory at a specific block height. Using a snapshot allows you to quickly sync your node without downloading the entire blockchain history from genesis.
Disadvantages: Large file download (can be several GB), requires disk space during extraction.
priv_validator_state.json before resetting! This file prevents double-signing if you're a validator.
$HOME/snapshot_tmp is cleaned up at Step 11.
Clean Previous State Sync (Optional)
If you've used State Sync before, clean the previous configuration. Recommended to avoid issues when restarting later.
sed -i "/\[statesync\]/, /^enable =/ s/=.*/= false/;\
/^rpc_servers =/ s|=.*|= \"\"|;\
/^trust_height =/ s/=.*/= 0/;\
/^trust_hash =/ s/=.*/= \"\"/" $HOME/.bcxd/config/config.toml
Configure State Sync
Stop your node and configure State Sync parameters.
sudo systemctl stop bcxd
SNAP_RPC="https://endpoint.buycex.net"
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height)
BLOCK_HEIGHT=$((LATEST_HEIGHT - 1000))
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash)
Verify Variables
Check that the variables were set correctly. You should see three numbers/hashes.
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH
Apply Configuration
Write the State Sync configuration to your config.toml file.
sed -i "/\[statesync\]/, /^enable =/ s/=.*/= true/;\
/^rpc_servers =/ s|=.*|= \"$SNAP_RPC,$SNAP_RPC\"|;\
/^trust_height =/ s/=.*/= $BLOCK_HEIGHT/;\
/^trust_hash =/ s/=.*/= \"$TRUST_HASH\"/" $HOME/.bcxd/config/config.toml
Reset Data and Start
Reset your node's data and start the service. State Sync will begin automatically.
bcxd tendermint unsafe-reset-all --home $HOME/.bcxd --keep-addr-book
sudo systemctl start bcxd
Monitor Logs
Watch the logs. State Sync can take 5-15 minutes. Be patient!
journalctl -u bcxd -f --no-hostname -o cat
Disable State Sync After Sync (Recommended)
Once synced, disable State Sync to prevent issues on next restart.
sed -i "/\[statesync\]/, /^enable =/ s/=.*/= false/;\
/^rpc_servers =/ s|=.*|= \"\"|;\
/^trust_height =/ s/=.*/= 0/;\
/^trust_hash =/ s/=.*/= \"\"/" $HOME/.bcxd/config/config.toml
What is State Sync?
State Sync is a protocol feature that allows a node to rapidly sync by downloading only the current state snapshot from the network, rather than replaying all historical blocks. This is the fastest sync method but requires trusted RPC endpoints.
Disadvantages: Requires trusted RPC servers, you don't have historical blocks, may fail if RPC is unreliable.
Troubleshooting State Sync
- Verify the RPC server is responding:
curl -s https://endpoint.buycex.net/status - Try using multiple different RPC servers in the configuration
- Restart the node and monitor logs carefully
- As a last resort, use Snapshot instead
LATEST_HEIGHT, BLOCK_HEIGHT, and TRUST_HASH.
- Ensure
jqis installed:sudo apt install jq -y - Check the RPC URL is correct and responding
- Try using a different RPC endpoint
Public Endpoints
Access BuyCex Infinity Chain network through these public endpoints.
What is RPC?
RPC (Remote Procedure Call) endpoints allow you to interact with the blockchain node directly. You can query blockchain state, broadcast transactions, and access Tendermint/CometBFT specific data.
Public RPC Endpoints
Community-provided RPC endpoints, sorted by performance based on the last check.
| Provider | Endpoint URL | Status |
|---|---|---|
| buycex |
|
Offline |
- Querying detailed blockchain state
- Broadcasting transactions (send, stake, vote)
- Accessing low-level Tendermint/CometBFT data
- Subscribing to real-time events
Common RPC Queries
Useful RPC queries you can perform.
Get Node Status
curl -s https://endpoint.buycex.net/status | jq
Get Latest Block
curl -s https://endpoint.buycex.net/block | jq
What is REST API?
REST API (also called LCD - Light Client Daemon) provides HTTP endpoints to query the blockchain state. It's easier to use than RPC and returns formatted JSON responses.
Public REST API Endpoints
Community-provided REST API endpoints.
| Provider | Endpoint URL |
|---|---|
| buycex |
|
- Querying account balances
- Getting validator information
- Viewing governance proposals
- Checking staking rewards
Common REST API Queries
Useful REST API queries you can perform.
Get Node Info
curl -s API_URL/cosmos/base/tendermint/v1beta1/node_info | jq
Get Account Balance
curl -s API_URL/cosmos/bank/v1beta1/balances/YOUR_ADDRESS | jq
Get All Validators
curl -s API_URL/cosmos/staking/v1beta1/validators | jq
Get Governance Proposals
curl -s API_URL/cosmos/gov/v1beta1/proposals | jq
Get Total Supply
curl -s API_URL/cosmos/bank/v1beta1/supply | jq
What is gRPC?
gRPC is a high-performance RPC framework that uses Protocol Buffers. It's faster and more efficient than REST API, but requires specialized tools like grpcurl to interact with it.
Public gRPC Endpoints
Community-provided gRPC endpoints.
| Provider | Endpoint URL |
|---|---|
| buycex |
|
- High-performance blockchain queries
- Programmatic access via SDKs
- Building custom blockchain applications
- Automated monitoring and analytics
Common gRPC Queries
Useful gRPC queries using grpcurl.
List All Services
grpcurl -plaintext GRPC_URL list
List Methods for Bank Service
grpcurl -plaintext GRPC_URL list cosmos.bank.v1beta1.Query
Query Account Balance
grpcurl -plaintext -d '{"address":"YOUR_ADDRESS"}' GRPC_URL cosmos.bank.v1beta1.Query/AllBalances
Install grpcurl
grpcurl is a command-line tool to interact with gRPC servers.
go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
Query Validator Info
grpcurl -plaintext -d '{"validator_addr":"YOUR_VALOPER"}' GRPC_URL cosmos.staking.v1beta1.Query/Validator
Query All Validators
grpcurl -plaintext GRPC_URL cosmos.staking.v1beta1.Query/Validators
localhost:9090
Cosmovisor Setup
Cosmovisor is a process manager for Cosmos SDK blockchains that automates upgrades.
What is Cosmovisor?
Cosmovisor is a process manager that monitors governance proposals and automatically handles chain upgrades. When an upgrade proposal passes, Cosmovisor will automatically switch to the new binary at the specified block height without manual intervention.
Install Cosmovisor Binary
Install the latest version of Cosmovisor using Go.
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
Verify Installation
Check that Cosmovisor is correctly installed.
cosmovisor version
Create Cosmovisor Directory Structure
Set up the required directory structure for Cosmovisor.
mkdir -p $HOME/.bcxd/cosmovisor/genesis/bin
mkdir -p $HOME/.bcxd/cosmovisor/upgrades
Copy Current Binary to Cosmovisor
Copy your current daemon binary to the genesis folder.
cp $(which bcxd) $HOME/.bcxd/cosmovisor/genesis/bin/
Verify Binary in Cosmovisor
Check that the binary is correctly placed.
ls -la $HOME/.bcxd/cosmovisor/genesis/bin/
Create Cosmovisor Systemd Service
Create a systemd service file for Cosmovisor.
sudo tee /etc/systemd/system/bcxd.service > /dev/null <<EOF
[Unit]
Description=BuyCex Infinity Chain Node (Cosmovisor)
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=3
LimitNOFILE=65535
Environment="DAEMON_NAME=bcxd"
Environment="DAEMON_HOME=$HOME/.bcxd"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=false"
[Install]
WantedBy=multi-user.target
EOF
Enable and Start Service
Enable the service and start your node with Cosmovisor.
sudo systemctl daemon-reload
sudo systemctl enable bcxdsudo systemctl start bcxd
Check Service Status
Verify that the service is running correctly.
sudo systemctl status bcxd
View Logs
Monitor your node's logs in real-time.
journalctl -u bcxd -f --no-hostname -o cat
Environment Variables
Cosmovisor uses environment variables for configuration. These should be set in your systemd service file.
| Variable | Value | Description |
|---|---|---|
DAEMON_NAME |
bcxd |
Name of the binary to run |
DAEMON_HOME |
$HOME/.bcxd |
Location of the node's data directory |
DAEMON_ALLOW_DOWNLOAD_BINARIES |
false |
Auto-download binaries (not recommended) |
DAEMON_RESTART_AFTER_UPGRADE |
true |
Auto-restart after upgrade |
UNSAFE_SKIP_BACKUP |
false |
Skip automatic backup (not recommended) |
Prepare for an Upgrade
When an upgrade proposal is approved, you need to prepare the new binary.
Step 1: Build the New Binary
Clone the repo and checkout the upgrade version tag.
cd $HOME
git clone https://github.com/cosvmlabs/buycex-chaincd buycex-chaingit checkout UPGRADE_VERSION_TAG
make install
Step 2: Create Upgrade Directory
Create a folder for the upgrade using the exact upgrade name from the proposal.
mkdir -p $HOME/.bcxd/cosmovisor/upgrades/UPGRADE_NAME/bin
Step 3: Copy New Binary
Copy the new binary to the upgrade folder.
cp $(which bcxd) $HOME/.bcxd/cosmovisor/upgrades/UPGRADE_NAME/bin/
Step 4: Verify Binary
Check the version of the new binary.
$HOME/.bcxd/cosmovisor/upgrades/UPGRADE_NAME/bin/bcxd version
Verify Cosmovisor is Ready
Check that Cosmovisor sees the upgrade binary.
ls -la $HOME/.bcxd/cosmovisor/upgrades/
Manual Upgrade (Without Cosmovisor)
If you prefer to upgrade manually without Cosmovisor:
# Stop the service at the upgrade height
sudo systemctl stop bcxd
# Replace the binary
cp NEW_BINARY_PATH $(which bcxd)
# Restart the service
sudo systemctl start bcxd
How Cosmovisor Handles Upgrades
When a governance upgrade proposal passes, Cosmovisor automatically:
- Monitors for the upgrade height specified in the proposal
- Stops the current binary at the upgrade height
- Backs up the current data (if UNSAFE_SKIP_BACKUP=false)
- Switches to the new binary in the upgrades folder
- Restarts the node with the new binary
Troubleshooting Upgrades
- Verify the upgrade folder name matches exactly (case-sensitive)
- Check that the binary is in
upgrades/UPGRADE_NAME/bin/ - Verify the binary is executable:
chmod +x BINARY_PATH - Check Cosmovisor logs for specific error messages
- Check logs:
journalctl -u bcxd -n 100 - Verify you're using the correct binary version
- Ensure the binary was built correctly for your system
- Check if there are any migration steps required for this upgrade
sudo systemctl stop bcxd# Restore from backup location
cosmovisor rollback
sudo systemctl start bcxd
Block Explorers for BuyCex Infinity Chain.
We verify all explorers at least every 24 hours. Only online explorers are displayed below.
Upgrade Binary
Commands to upgrade your BuyCex Infinity Chain node binary to a new version.
Find Active Systemd Services
Search for all systemd service files that use the bcxd binary.
grep -l "bcxd" /etc/systemd/system/*.service
List All Custom Services
Display all custom service files (not system symlinks) in the systemd directory.
find /etc/systemd/system -maxdepth 1 -type f -name "*.service" -exec basename {} \;
Check Service Status
Verify if the service is currently running before upgrading.
sudo systemctl status bcxd
View Service Configuration
Display the content of your service file to check the binary path.
cat /etc/systemd/system/bcxd.service
Check Version with Commit
Display detailed version info including commit hash. Useful for debugging apphash errors during difficult node startups.
bcxd version --long
Why Find Services First?
Before upgrading, you need to identify which systemd services are using the binary you want to upgrade. This ensures you restart the correct service after the upgrade and avoid downtime on the wrong node.
bcxd, bcxd-validator, bcxd-sentry).
Download New Binary
Download the pre-compiled binary from the official release URL.
wget -O $HOME/go/bin/bcxd_new https://YOUR_BINARY_URL
Make Binary Executable
Grant execution permissions to the downloaded binary.
chmod +x $HOME/go/bin/bcxd_new
Verify New Binary Version with Commit
Check that the downloaded binary has the expected version with the right commit before replacing.
$HOME/go/bin/bcxd_new version --long
Replace Binary and Restart
Replace the old binary with the new one and restart the service.
sudo mv $HOME/go/bin/bcxd_new $HOME/go/bin/bcxdsudo systemctl restart bcxd && sudo journalctl -u bcxd -f --no-hostname -o cat
Upgrade Without Compilation
This method is faster as it uses pre-compiled binaries. It's ideal when official releases provide ready-to-use binaries for your architecture (usually linux/amd64).
_linux_amd64 or similar.
version --long on the new binary confirms you downloaded the correct file with the right commit.
YOUR_BINARY_URL with the actual download URL from the official release page. Never download binaries from untrusted sources.
Navigate to Source Directory
Go to the cloned repository directory.
cd $HOME/buycex-chain
Pull Latest Changes
Fetch the latest code from the remote repository.
git pull
Checkout Target Version
Switch to the specific version tag you want to compile.
git checkout v1.0.0
Compile the Binary
Build the binary from source code.
make build
Verify Compiled Binary Version
Confirm the newly compiled binary has the correct version.
$HOME/buycex-chain/build/bcxd version --long
Replace Binary and Restart
Move the compiled binary to your PATH and restart the service.
sudo mv $HOME/buycex-chain/build/bcxd $HOME/go/bin/bcxdsudo systemctl restart bcxd && sudo journalctl -u bcxd -f --no-hostname -o cat
Compile from Source
Compiling from source ensures you have a binary built specifically for your system. This is the recommended method when pre-compiled binaries are not available or when you need custom build flags.
make build command requires Go and other build dependencies.
v1.0.0 with the target version if different. Check the releases page for available version tags.
journalctl command will show live logs so you can verify the node is syncing correctly with the new binary.
Check Disk Space
Verify available disk space before compiling. Compilation requires several GB of free space.
df -h $HOME
Check Go Version
Ensure your Go version meets the minimum requirements for compilation.
go version
Check Go Build Cache Size
View the current size of your Go build cache before deciding to clean it.
du -sh $(go env GOCACHE)
Clean Go Build Cache
Free up disk space by cleaning the Go build cache if you're running low on storage.
go clean -cache
Check Memory Usage
Compilation can be memory-intensive. Check available RAM before building.
free -h
Before You Compile
These commands help you verify your system is ready for compilation. Running out of disk space or memory during build can cause failures and leave your system in an inconsistent state.
Troubleshooting Common Issues
A guide to diagnosing and solving the most common errors encountered when running a Cosmos SDK node.
Transaction Errors
Cause: The gas limit provided was too low for the transaction's complexity.
Solution: Use --gas auto and add a buffer with --gas-adjustment 1.5.
Cause: Your node is out of sync or you sent multiple transactions too quickly.
Solution: Wait a moment, or get the correct sequence number from a synced RPC and use the --sequence flag.
Cause: Your wallet can't cover the transaction amount plus the gas fees.
Solution: Check your balance and ensure it's sufficient for both the amount and the fees.
Cause: You submitted the same transaction twice.
Solution: Wait for the first transaction to be included in a block. Check its status on a block explorer.
Cause: You used a shorthand like `1atom` instead of the base denomination `1000000uatom`.
Solution: Always use the smallest unit. Find the "Base Denom" in the Chain Info tab .
Node & Sync Issues
Cause: Your local node is stopped, syncing, or a public RPC is offline.
Solution: Check your service status. If stopped, restart it. If using a public RPC, try another from the Endpoints tab .
Cause: Lack of reliable peers.
Solution: Update `seeds` and `persistent_peers` from the Network tab , then restart your node.
Cause: A software upgrade occurred, and your node is running an old binary.
Solution: Install the new binary and restart. Using Cosmovisor is highly recommended.
Cause: The transaction indexer is likely enabled, or pruning is disabled.
Solution: For validators, disable the indexer. See the Advanced Config tab.
Validator & Server Issues
Cause: Your validator was offline for too long (downtime).
Solution: Ensure your node is synced, then send an `unjail` transaction. See the Slashing tab .
Cause: High server resource usage or poor network connectivity.
Solution: Optimize your node (e.g., disable indexer) and ensure you have stable `persistent_peers`.
Cause: The command requires administrator privileges, or file permissions are incorrect.
Solution: Prefix with sudo, or fix file ownership with sudo chown -R ....
Cause: A firewall is blocking the P2P port (default: 26656).
Solution: Allow incoming TCP connections on the P2P port (e.g., sudo ufw allow 26656/tcp).
Command Flags Reference
Complete reference of commonly used flags for bcxd commands.
Transaction Flags
These flags are used when broadcasting transactions (tx commands).
--from
Name or address of the wallet signing the transaction.
--from my_wallet--chain-id
The chain ID of the network.
--chain-id bcx_323-1--gas-prices
Gas price per unit of gas. Sets the fee for the transaction.
--gas-prices 0--gas
Gas limit. Use 'auto' to estimate automatically.
--gas auto--gas-adjustment
Multiplier for gas estimation.
--gas-adjustment 1.5--fees
Alternative to gas-prices. Specify exact fee.
--fees 500utoken-y, --yes
Skip transaction confirmation prompt.
-y--broadcast-mode
Broadcast mode: 'sync', 'async', or 'block'.
--broadcast-mode block--node
Custom RPC node URL to broadcast through.
--node https://rpc.example.com:443--keyring-backend
Keyring backend: 'os', 'file', 'test'.
--keyring-backend test--memo
Add a memo/note to the transaction.
--memo "My first transaction"--dry-run
Simulate the transaction without broadcasting.
--dry-run--account-number
Manual account number (advanced).
--account-number 123--sequence
Manual sequence number (advanced).
--sequence 456--offline
Build transaction in offline mode.
--offline--generate-only
Generate unsigned tx for later use.
--generate-only > unsigned_tx.json--sign-mode
Signature mode: direct, amino-json.
--sign-mode direct--fee-granter
Address that will pay for tx fees.
--fee-granter <address>--fee-payer
Address that will pay fees.
--fee-payer <address>--timeout-height
Block height timeout for validity.
--timeout-height 1234567Common Transaction Examples
Basic Transaction
Minimal required flags for most transactions.
bcxd tx bank send wallet_name recipient_address 1000000utoken \
--from wallet_name \
--chain-id bcx_323-1 \
--gas-prices 0 \
-y
Transaction with Auto Gas Estimation
Let the node estimate the required gas automatically.
bcxd tx staking delegate valoper_address 1000000utoken \
--from wallet_name \
--chain-id bcx_323-1 \
--gas-prices 0 \
--gas auto \
--gas-adjustment 1.5 \
-y
Transaction with Custom Node
Broadcast through a specific RPC endpoint.
bcxd tx gov vote 1 yes \
--from wallet_name \
--chain-id bcx_323-1 \
--gas-prices 0 \
--node https://rpc.example.com:443 \
-y
Generate Unsigned Transaction
Create transaction for signing later (offline signing).
bcxd tx bank send wallet_name recipient 1000000utoken \
--from wallet_name \
--chain-id bcx_323-1 \
--gas-prices 0 \
--generate-only > unsigned_tx.json
--gas auto --gas-adjustment 1.5 to avoid out-of-gas errors.
The gas-adjustment adds a 50% safety buffer to the estimated gas.
Query Flags
These flags are used when querying blockchain state (query commands).
--node
RPC node URL to query from.
--node https://rpc.example.com:443--height
Query state at a specific block height.
--height 1234567-o, --output
Output format: 'text' or 'json'.
--output json--limit
Maximum number of results to return.
--limit 100--page
Page number for paginated results.
--page 2--count-total
Include total count in paginated response.
--count-total--offset
Number of results to skip (pagination).
--offset 20--page-key
Pagination key from previous query.
--page-key "eyJjb2..."--reverse
Reverse the order of results.
--reverse--home
Node home directory (if not default).
--home /path/to/.daemon--chain-id
Chain ID (usually auto-detected).
--chain-id bcx_323-1--indent
Indent JSON output for readability.
--indentCommon Query Examples
Basic Query (Text Output)
Default human-readable output format.
bcxd query bank balances your_address
Query with JSON Output
Get machine-readable JSON for scripting or parsing.
bcxd query bank balances your_address -o json
Query with JSON + jq Parsing
Parse JSON output with jq for specific fields.
bcxd query bank balances your_address -o json | jq '.balances[0].amount'
Query at Specific Height
View historical state at a particular block.
bcxd query bank balances your_address --height 1000000
Query with Pagination
Get limited results for large datasets.
bcxd query staking validators --limit 50 --offset 0 -o json
Query from Custom Node
Query a specific RPC endpoint instead of localhost.
bcxd query bank balances your_address --node https://rpc.example.com:443
Advanced Query Techniques
Count Total Results
Include the total count in paginated results.
bcxd query staking validators --count-total -o json | jq '.pagination.total'
Get Only Bonded Validators
Filter validators by status using jq.
bcxd query staking validators -o json | jq '.validators[] | select(.status=="BOND_STATUS_BONDED")'
Sort Validators by Voting Power
Get validators sorted by tokens descending.
bcxd query staking validators -o json | jq '.validators | sort_by(.tokens | tonumber) | reverse | .[0:10]'
-o json when scripting or automating queries. Combine with jq for powerful JSON parsing and filtering. bcxd query bank balances --help