Simple command line tool for interacting with the Metaverse VM.
NAME:
mvs-vm-cli - Metaverse Hyperspace VM
USAGE:
mvs-vm-cli [global options] command [command options] [arguments...]
VERSION:
0.11.3
COMMANDS:
block, bl Block details for a block number (decimal integer) or hash (hexadecimal with 0x prefix). Omit for latest.
transaction, tx Transaction details for a tx hash
receipt, rc Transaction receipt for a tx hash
address, addr Account details for a specific address, or the one corresponding to the private key.
balance Get balance for your private key or an address passed in. eg: `balance 0xABC123`
contract, c Contract operations
myaddress Returns the address associated with MVS_PRIVATE_KEY
account, a Account operations
transfer, send Transfer ETP or MST tokens to another account. eg: `mvs-vm-cli transfer 10.1 to 0xADDRESS`
env List environment variables
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--network value, -n value The name of the network. Options: hyperspace/testnet/localhost. (default: "localhost") [$MVS_NETWORK]
--testnet Shorthand for '-network testnet'.
--rpc-url value The network RPC URL [$MVS_RPC_URL]
--verbose Enable verbose logging
--format value, -f value Output format. Options: json. Default: human readable output.
--help, -h show help
--version, -v print the version
If you just plan to read from the blockchain, you do not need any ETP and you do not need to set your MVS_PRIVATE_KEY
. If you plan to deploy contracts or write anything to the blockchain, you'll need ETP and you'll need to set your MVS_PRIVATE_KEY
for the account that has those tokens.
This option is the default. It will try to connect to a local node on http://localhost:9933 which is the default of a locally running fullnode.
Set the environment variable
# To use the mainnet
export MVS_NETWORK=hyperspace
# OR
export MVS_RPC_URL=https://vm.mvs.org/mainnet_rpc/
Or add the parameter --network hyperspace to your mvs-vm-cli command
# To use the mainnet
export MVS_NETWORK=testnet
# OR
export MVS_RPC_URL=https://vm.mvs.org/testnet_rpc/
export MVS_RPC_URL=http://IP_ADDRESS:PORT
Required if you plan to deploy contracts or sign transactions.
# set environment variable
export MVS_PRIVATE_KEY=0x...
mvs-vm-cli balance
mvs-vm-cli transfer 0.1 to 0x67683dd2a499E765BCBE0035439345f48996892f
mvs-vm-cli tx TX_HASH
mvs-vm-cli block BLOCK_ID
Parameters:
- BLOCK_ID - id of a block (omit for
latest
)
mvs-vm-cli transaction ADDRESS_HASH
Parameters:
- ADDRESS_HASH - hash of the address
Clone this repo:
git clone https://github.com/mvs-org/metaverse-vm-cli
cd mvs-vm-cli
make install
# or just `make build` to build it into current directory
mvs-vm-cli help