-
Notifications
You must be signed in to change notification settings - Fork 33
CLI Commands
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.
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
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>
-a <amount to send, 1.23>
-r
-t
-x
To withdraw funds from -s
To transfer an NFT, same as send with one satoshi: mmx wallet transfer
To create an offer on the chain: mmx wallet offer
(-x / -z default MMX)
-a -b
-x -z
To accept an offer: mmx wallet accept <address>
To mint tokens: mmx wallet mint
-a
-t
-x
To deploy a contract: mmx wallet deploy <file>
To mutate a contract: mmx wallet mutate <function> <args>
-x
To execute a smart contract function: mmx wallet exec <function> <args>
-x
To create a new wallet: mmx wallet create <options>
-f [file_name]
-mnemonic [word1 word2 word3....]
To restore a wallet from a seed hash: mmx wallet create [seed hash]
To show all wallets and their index: mmx wallet accounts
To get farmer / pool keys for plotting: mmx wallet keys
To lock a wallet if passphase enabled: mmx wallet lock
To unlock a wallet with passphrase: mmx wallet unlock
*To use a non-default wallet, specify -j in combination with the above commands. start at 0, which is the default.
To check on the farm: mmx farm info
To add plot directories: mmx farm add <dir>
To remove plot directories: mmx farm remove <dir>
To show plot directories: mmx farm get dirs
To get total space in bytes: mmx farm get space
To reload plots: mmx farm reload