The Plasma CLI is used to interact with the OMG network from the command line. Technical details about Ethereum and Plasma are abstracted from the user.
Plasma CLI enables the user to:
- deposit ETH to the Plasma contract
- create transactions
- exit ETH from the OMG Network back to Ethereum
Connectivity to Ethereum via a local RPC node or Infura is supported.
ERC20 tokens are not currently supported.
plasma_cli
is available as binaries at https://github.com/omisego/plasma-cli/releases. Download the binary that matches your operating system.
After downloading the binary file (on macOS):
- rename the file
$ mv "plasma-cli-v0.0.2-darwin-amd64" plasma_cli
- set execute permissions
$ chmod u+x ./plasma_cli
- run it
$ ./plasma_cli --help
plasma_cli create account
plasma_cli deposit --privatekey=<private key> --client=<local rpc server or Infura URL> --contract=<contract address> --amount=<amount in wei> --owner=<public key of the owner>
plasma_cli get utxos --watcher=<watcher URL> --address=<public_address>
plasma_cli get balance --watcher=<watcher URL> --address=<public_address>
NOTE: This function will either
- Send the entire UTXO to an address, or
- Split the UTXO to destination address and send the change to the owner
Support for more complex payment transactions will come later.
plasma_cli transaction --fromutxo=<UTXO position> --fromowner=<from address> --privatekey=<from privatekey> --toowner=<to address> --toamount=<to amount> --watcher=<watcher url>
plasma_cli exit --utxo=<utxo ID> --privatekey=<private key> --contract=<contract address> --watcher=<watcher url> --client=<local rpc server or Infura URL>