This repo is currently being maintained here
This is an example plugin for swanky-cli, meant to demonstrate how to build one.
It adds phala node download
commands to swanky-cli's swanky
command.
When called, it downloads phala-node from https://github.com/Phala-Network/phala-blockchain/releases/download/poc2-3.0-alpha1/phala-node and puts it in bin/
folder.
Install swanky-cli globally:
npm i -g @astar-network/swanky-cli
Clone this repo, run yarn install
then run yarn build
, and link it to swanky-cli:
swanky plugins:install [PATH_TO_REPO]
NOTE This does not work currently. Use dev commands instead by executing
./bin/dev phala [command]
instead.
Now you can run swanky phala init
Most of the core functionality has been extracted to swanky-core package so it can be reused:
https://oclif.io/docs/introduction https://oclif.io/docs/plugins https://github.com/oclif/plugin-plugins
$ npm install -g @astar-network/swanky-plugin-phala
$ phala COMMAND
running command...
$ phala (--version)
@astar-network/swanky-plugin-phala/0.2.0 linux-x64 node-v18.12.1
$ phala --help [COMMAND]
USAGE
$ phala COMMAND
...
phala --help [COMMAND]
phala phala compile [CONTRACTNAME]
phala phala init [PROJECTNAME]
phala phala stack
phala phala stack-setup
phala phala test [FILE]
phala phala typings [CONTRACTNAME]
Display help for phala.
USAGE
$ phala --help [COMMAND] [-n]
ARGUMENTS
COMMAND Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for phala.
See code: @oclif/plugin-help
Compile Phala Phat Contract
USAGE
$ phala phala compile [CONTRACTNAME] [-w <value>] [-r]
FLAGS
-r, --force compile in release mode
-w, --name=<value> watch for changes
DESCRIPTION
Compile Contract
EXAMPLES
$ phala phala compile
Generate a new Phat Contract environment and download local testnet binares.
USAGE
$ phala phala init [PROJECTDIR]
FLAGS
-v, --verbose
DESCRIPTION
Generate a new Phat Contract environment
EXAMPLES
$ phala phala init my_new_project
Starting local stack (node + pruntime + pherry)
USAGE
$ phala phala stack
DESCRIPTION
Starting local stack (node + pruntime + pherry)
EXAMPLES
$ phala phala stack
Configuring the local testnet
USAGE
$ phala phala stack-setup
DESCRIPTION
Configuring the local testnet
EXAMPLES
$ phala phala stack-setup
TODO
USAGE
$ phala phala test [FILE] [-n <value>] [-f]
FLAGS
-f, --force
-n, --name=<value> name to print
DESCRIPTION
TODO
EXAMPLES
$ phala phala test
USAGE $ phala phala init [PROJECTNAME]
FLAGS -v, --verbose
DESCRIPTION describe the command here
EXAMPLES $ phala phala init my_new_project
## `phala phala stack`
Starting local stack (node + pruntime + pherry)
USAGE $ phala phala stack
DESCRIPTION Starting local stack (node + pruntime + pherry)
EXAMPLES $ phala phala stack
## `phala phala stack-setup [FILE]`
TODO
## `phala phala typings [CONTRACTNAME]`
Typings for the Phat Contract
USAGE $ phala phala typings [CONTRACTNAME] -w
FLAGS -w, --watch
DESCRIPTION Typings
EXAMPLES $ phala phala typings
<!-- commandsstop -->