MetaNova Verse Documentation
  • MetaNova Verse Introduction
    • Metanovaverse
    • Tokens
    • Transactions
    • Inflation
    • Keys
      • Keyring
      • Multisig
    • Gas Fees
    • Wallet and Accounts
      • Adding Metanovaverse to Metamask
      • Adding Metanovaverse to Keplr
      • Transfers Between Wallets
      • Backup
    • Deploying Smart Contracts
      • Remix
      • Hardhat
  • Metanovaverse Summary
  • The MNV Token
  • Governance
    • Proposals
      • Proposal Tips
      • Submit a Proposal
    • Community Pool
    • Chain Parameters
  • Technical Concepts
    • Architecture
    • Accounts
    • Chain ID
    • Encoding
    • Pending State
  • dApp Developers
    • Establishing Connections
    • Metanovaverse Clients
    • Guides
      • Wallet Integration
      • Smart Contract Incentive Registration
      • Tracing Transactions
      • Query Balances
    • Testnet
      • Testnet Commands
    • Ethereum JSON-RPC
      • JSON-RPC Server
      • Running the Server
      • Namespaces
      • JSON-RPC Methods
      • Events
  • Protocol Developers
    • Modules
      • auth
        • Concepts
        • State
        • AnteHandlers
        • Keepers
        • Vesting
        • Parameters
        • Client Auth
      • bank
        • State
        • Keepers
        • Messages
        • Events
        • Parameters
        • Client
      • crisis
        • State
        • Messages
        • Events
        • Parameters
        • Client
      • distribution
        • Concepts
        • State
        • Begin Block
        • Messages
        • Hooks
        • Events
        • Parameters
        • Client
      • epochs
        • Concepts
        • State
        • Events
        • Keepers
        • Hooks
        • Queries
        • Future Improvements
      • erc20
        • Concepts
        • State
        • State Transitions
        • Transactions
        • Hooks
        • Events
        • Parameters
        • Clients
      • evidence
        • Concepts
        • State
        • Messages
        • Events
        • Parameters
        • BeginBlock
        • Client
      • evm
        • Concepts
        • State
        • State Transitions
        • Transactions
        • ABCI
        • Hooks
        • Events
        • Parameters
        • Client
      • feemarket
        • Concepts
        • State
        • Begin block
        • End block
        • AnteHandlers
        • Keeper
        • Events
        • Client
        • Future Improvements
        • Parameters
      • feesplit
        • Concepts
        • State
        • State Transitions
        • Transactions
        • Hooks
        • Events
        • Parameters
        • Clients
        • Future Improvements
      • gov
        • Concepts
        • State
        • Messages
        • Events
        • Future Improvements
        • Parameters
        • Client
      • incentives
        • Concepts
        • State
        • State Transitions
        • Transactions
        • Hooks
        • Events
        • Parameters
        • Clients
      • ibc-core
      • inflation
        • Concepts
        • State
        • Hooks
        • Events
        • Parameters
        • Clients
      • slashing
        • Concepts
        • State
        • Messages
        • BeginBlock
        • Hooks
        • Events
        • Staking Tombstone
        • Parameters
        • CLI
      • staking
        • State
        • State Transitions
        • Messages
        • Begin-Block
        • End-Block
        • Hooks
        • Events
        • Parameters
        • Client
      • upgrade
        • Concepts
        • State
        • Events
        • Client
        • Resources
      • vesting
        • Concepts
        • State
        • State Transitions
        • Transactions
        • AnteHandlers
        • Events
        • Clients
  • Validators
    • Quick Start
    • Telemetry
    • Security
      • Tendermint KMS
      • Tendermint KMS + Ledger
      • Validator Security Checklist
      • Validator Backup
    • Snapshots, Archive Nodes
    • FAQ
  • Delegators
    • Staking Process
  • Tokenomics
  • Block Explorers
Powered by GitBook
On this page
  • CLI
  • gRPC
  1. Protocol Developers
  2. Modules
  3. bank

Client

CLI

A user can query and interact with the bank module using the CLI.

Query

The query commands allow users to query bank state.

simd query bank --help

balances

The balances command allows users to query account balances by address.

simd query bank balances [address] [flags]

Example:

simd query bank balances cosmos1..

Example output:

balances:
- amount: "1000000000"
  denom: stake
pagination:
  next_key: null
  total: "0"

denom-metadata

The denom-metadata command allows users to query metadata for coin denominations. A user can query metadata for a single denomination using the --denom flag or all denominations without it.

simd query bank denom-metadata [flags]

Example:

simd query bank denom-metadata --denom stake

Example output:

metadata:
  base: stake
  denom_units:
  - aliases:
    - STAKE
    denom: stake
  description: native staking token of simulation app
  display: stake
  name: SimApp Token
  symbol: STK

total

The total command allows users to query the total supply of coins. A user can query the total supply for a single coin using the --denom flag or all coins without it.

simd query bank total [flags]

Example:

simd query bank total --denom stake

Example output:

amount: "10000000000"
denom: stake

send-enabled

The send-enabled command allows users to query for all or some SendEnabled entries.

simd query bank send-enabled [denom1 ...] [flags]

Example:

simd query bank send-enabled

Example output:

send_enabled:
- denom: foocoin
  enabled: true
- denom: barcoin
pagination:
  next-key: null
  total: 2 

Transactions

The tx commands allow users to interact with the bank module.

simd tx bank --help

send

The send command allows users to send funds from one account to another.

simd tx bank send [from_key_or_address] [to_address] [amount] [flags]

Example:

simd tx bank send cosmos1.. cosmos1.. 100stake

gRPC

A user can query the bank module using gRPC endpoints.

Balance

The Balance endpoint allows users to query account balance by address for a given denomination.

cosmos.bank.v1beta1.Query/Balance

Example:

grpcurl -plaintext \
    -d '{"address":"cosmos1..","denom":"stake"}' \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/Balance

Example output:

{
  "balance": {
    "denom": "stake",
    "amount": "1000000000"
  }
}

AllBalances

The AllBalances endpoint allows users to query account balance by address for all denominations.

cosmos.bank.v1beta1.Query/AllBalances

Example:

grpcurl -plaintext \
    -d '{"address":"cosmos1.."}' \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/AllBalancesn

Example output:

{
  "balances": [
    {
      "denom": "stake",
      "amount": "1000000000"
    }
  ],
  "pagination": {
    "total": "1"
  }
}

DenomMetadata

The DenomMetadata endpoint allows users to query metadata for a single coin denomination.

cosmos.bank.v1beta1.Query/DenomMetadata

Example:

grpcurl -plaintext \
    -d '{"denom":"stake"}' \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/DenomMetadata

Example output:

{
  "metadata": {
    "description": "native staking token of simulation app",
    "denomUnits": [
      {
        "denom": "stake",
        "aliases": [
          "STAKE"
        ]
      }
    ],
    "base": "stake",
    "display": "stake",
    "name": "SimApp Token",
    "symbol": "STK"
  }
}

DenomsMetadata

The DenomsMetadata endpoint allows users to query metadata for all coin denominations.

cosmos.bank.v1beta1.Query/DenomsMetadata

Example:

grpcurl -plaintext \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/DenomsMetadata

Example output:

{
  "metadatas": [
    {
      "description": "native staking token of simulation app",
      "denomUnits": [
        {
          "denom": "stake",
          "aliases": [
            "STAKE"
          ]
        }
      ],
      "base": "stake",
      "display": "stake",
      "name": "SimApp Token",
      "symbol": "STK"
    }
  ],
  "pagination": {
    "total": "1"
  }
}

DenomOwners

The DenomOwners endpoint allows users to query metadata for a single coin denomination.

cosmos.bank.v1beta1.Query/DenomOwners

Example:

grpcurl -plaintext \
    -d '{"denom":"stake"}' \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/DenomOwners

Example output:

{
  "denomOwners": [
    {
      "address": "cosmos1..",
      "balance": {
        "denom": "stake",
        "amount": "5000000000"
      }
    },
    {
      "address": "cosmos1..",
      "balance": {
        "denom": "stake",
        "amount": "5000000000"
      }
    },
  ],
  "pagination": {
    "total": "2"
  }
}

TotalSupply

The TotalSupply endpoint allows users to query the total supply of all coins.

cosmos.bank.v1beta1.Query/TotalSupply

Example:

grpcurl -plaintext \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/TotalSupply

Example output:

{
  "supply": [
    {
      "denom": "stake",
      "amount": "10000000000"
    }
  ],
  "pagination": {
    "total": "1"
  }
}

SupplyOf

The SupplyOf endpoint allows users to query the total supply of a single coin.

cosmos.bank.v1beta1.Query/SupplyOf

Example:

grpcurl -plaintext \
    -d '{"denom":"stake"}' \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/SupplyOf

Example output:

{
  "amount": {
    "denom": "stake",
    "amount": "10000000000"
  }
}

Params

The Params endpoint allows users to query the parameters of the bank module.

cosmos.bank.v1beta1.Query/Params

Example:

grpcurl -plaintext \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/Params

Example output:

{
  "params": {
    "defaultSendEnabled": true
  }
}

SendEnabled

The SendEnabled enpoints allows users to query the SendEnabled entries of the bank module.

Any denominations NOT returned, use the Params.DefaultSendEnabled value.

cosmos.bank.v1beta1.Query/SendEnabled

Example:

grpcurl -plaintext \
    localhost:9090 \
    cosmos.bank.v1beta1.Query/SendEnabled

Example output:

{
  "send_enabled": [
    {
      "denom": "foocoin",
      "enabled": true
    },
    {
      "denom": "barcoin"
    }
  ],
  "pagination": {
    "next-key": null,
    "total": 2
  }
}
PreviousParametersNextcrisis