Skip to content

CLI Commands

limsandy edited this page Oct 3, 2022 · 37 revisions

To use the CLI:

cd mmx-node
source ./activate.sh

For Windows: Use the shortcut in the start menu or manually run mmx_cmd.cmd from a terminal/command prompt.

To run any mmx commands (except mmx wallet create), the node needs to be running. See Getting Started to read on how to start it.

Node CLI

To check on the node: mmx node info

To check on the peers: mmx node peers

To check on a transaction: mmx node tx <txid>

To show current node height: mmx node get height

To dump a transaction: mmx node get tx <txid>

To dump a contract: mmx node get contract <address>

To get balance for an address: mmx node get balance <address> -x <currency>

To get raw balance for an address: mmx node get amount <address> -x <currency>

To dump a block: mmx node get block <height>

To dump a block header: mmx node get header <height>

To show connected peers: mmx node get peers

To show estimated netspace: mmx node get netspace

To show circulating coin supply: mmx node get supply

To call a smart contract const function: mmx node call

To show smart contract state variables: mmx node read

To dump all storage of a smart contract: mmx node dump

To dump assembly code of a smart contract: mmx node dump_code

To fetch a block from a peer: mmx node fetch block <peer> <height>

To fetch a block header from a peer: mmx node fetch header <peer> <height>

To check the balance of an address: mmx node balance <address>

To check the history of an address: mmx node history <address> [since]

To show all offers: mmx node offers [open | closed]

To force a re-sync: mmx node sync

Wallet CLI

To show everything in a wallet: mmx wallet show

To show wallet balances: mmx wallet show balance

To show wallet contracts: mmx wallet show contracts

To show wallet offers: mmx wallet show offers

To get a specific wallet address: mmx wallet get address

To get a specific wallet balance: mmx wallet get balance

To get a specific raw wallet balance: mmx wallet get amount

To get a list of all contract addresses: mmx wallet get contracts

To get the mnemonic seed words of a wallet: mmx wallet get seed

To show wallet activity for last N heights: mmx wallet log -N

To transfer funds: mmx wallet send <options>

	-r <tx fee multiplier>
	-t <destination address>
	-x <currency>

To withdraw funds: mmx wallet send_from -s <source address>

To transfer an NFT, same as send with one satoshi: mmx wallet transfer

To create an offer on the chain: mmx wallet offer

	-a <bid amount> -b <ask amount>
	-x <bid currency> -z <ask currency>

To accept an offer: mmx wallet accept <address>

Clone this wiki locally