Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ npm install -g gnet
```
Send transaction

$ gnet send <priv_key> <address> <fee>
$ gnet send <address> <amount> <priv_key>

```

Expand Down Expand Up @@ -59,7 +59,7 @@ Be sure you launch the Gallactic and put all contracts on the contract folder be
```
Call smart contract's functions:

$ gnet call <contract_name> <function_name> <parameters_list>
$ gnet call <contract_name> <function_name> <parameters_list> // Yet to be implemented
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use TODO for remarking future plans. It's easy to search them in future


The parameters are pretty clear the only thing you need to care is parameters_list, its format must be like this: var1,var2,...,varK (comma separated)

Expand Down Expand Up @@ -141,19 +141,19 @@ The parameters are pretty clear the only thing you need to care is parameters_li
(Unsafe!) Do regular transaction to a contract, you need pass the private key of sender and address of contract
you need to initialize a project before using this command.

bond|bnd [options] <public_key> <address> <amount> <fee> <priv_key>
(safe) Do Bond transaction, you need pass the private key of sender and address of reciever
bond|bnd [options] <public_key> <stakes> <fee> <priv_key>
(safe) To do Bond transaction, you need pass the validator publickey, stake amount, transaction fee, and private key of sender
you may need to initialize a project before using this command.

unbond|ubnd [options] <address> <amount> <fee> <priv_key>
(safe) Do Unbond transaction, you need pass the private key of sender and address of reciever
unbond|ubnd [options] <address> <stakes> <fee> <priv_key>
(safe) To do Unbond transaction, you need pass account address, stake amount, transaction fee and private key of the validator
you may need to initialize a project before using this command.

send|snd [options] <address> <amount> <priv_key>
(safe) Do regular transaction, you need pass the private key of sender and address of reciever
(safe) To do regular transaction, you need to pass the address of the receiver, amount and the private key of sender
you need to initialize a project before using this command.

call|calf <contract_name> <function_name> [parameters_list]
call|calf <contract_name> <function_name> [parameters_list] //Yet to be implemented
Calls the function of specefic contract, you need to pass the list of parameters like this var1,var2,...,varK ,comma separated,
You need to initialize a project before using this command.

Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,21 @@ program
.action((priv_key,data,address,fee,gas_limit,cmd) => actions.transact(priv_key,data,address,fee,gas_limit,cmd.unsafe));

program
.command('bond <public_key> <amount> <fee> <priv_key>')
.command('bond <public_key> <stakes> <fee> <priv_key>')
.option('-u, --unsafe', 'unsafe transaction') //TODO (unsafe should be implemented using privatekey)
.alias('bnd')
.description('\n(safe) Do Bond transaction, you need pass the validator publickey, stake amount, transaction fee, and private key of sender \
\nyou may need to initialize a project before using this command.\n\n')
.action((public_key,amount,fee,priv_key) => actions.broadcastBond(public_key,parseInt(amount),parseInt(fee),priv_key));
.action((public_key,stakes,fee,priv_key) => actions.broadcastBond(public_key,parseInt(stakes),parseInt(fee),priv_key));

program
.command('unbond <address> <amount> <fee> <priv_key>')
.command('unbond <address> <stakes> <fee> <priv_key>')
.option('-u, --unsafe', 'unsafe sending transaction')
.alias('ubnd')
.description('\n(safe) Do Unbond transaction, you need pass account address, stake amount, transaction fee and private key of the validator \
\nyou may need to initialize a project before using this command.\
\nNote: you should be a validator to do unbond transaction.\n\n')
.action((address,amount,fee,priv_key) => actions.broadcastUnbond(address,parseInt(amount),parseInt(fee),priv_key));
.action((address,stakes,fee,priv_key) => actions.broadcastUnbond(address,parseInt(stakes),parseInt(fee),priv_key));

program
.command('send <address> <amount> <priv_key>')
Expand Down